This fixes the bug introduced with StatePropagatorDataGpu (Commit
092a8f68):
In PME-only ranks, the GPU context and stream were mixed up and passed to
the constructor of StatePropagatorDataGpu in the wrong order. This caused
failure in OpenCL builds with error -34 (CL_INVALID_CONTEXT). Did not
affect the CUDA builds, since the context is not relevant in CUDA.
Change-Id: I5e070e361c7bdef3168887dcac4869bb71c6c5ed
auto pme_pp = gmx_pme_pp_init(cr);
//TODO the variable below should be queried from the task assignment info
const bool useGpuForPme = (runMode == PmeRunMode::GPU) || (runMode == PmeRunMode::Mixed);
- const void *commandStream = useGpuForPme ? pme_gpu_get_device_context(pme) : nullptr;
- const void *gpuContext = useGpuForPme ? pme_gpu_get_device_stream(pme) : nullptr;
+ const void *commandStream = useGpuForPme ? pme_gpu_get_device_stream(pme) : nullptr;
+ const void *gpuContext = useGpuForPme ? pme_gpu_get_device_context(pme) : nullptr;
const int paddingSize = pme_gpu_get_padding_size(pme);
if (useGpuForPme)
{