Commit a17eda29 authored by Ana Gainaru's avatar Ana Gainaru
Browse files

Adding functionality to set the device id for HIP memory space

parent b9a811c6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -111,6 +111,15 @@ void KokkosInit()
    int device_id;
    cudaGetDevice(&device_id);
    settings.set_device_id(device_id);
#endif
#ifdef ADIOS2_HAVE_KOKKOS_HIP
    int device_id;
    hipError_t ret;
    ret = hipGetDevice(&device_id);
    if (ret == hipSuccess)
    {
        settings.set_device_id(device_id);
    }
#endif
    Kokkos::initialize(settings);
}