Merge release-2018 into master
[alexxy/gromacs.git] / src / gromacs / gpu_utils / gpu_utils.cu
index ed4d7e06cdb314e156c2a1cc2e9933dba63a1780..4f2656b18cdd1dfb7bacc44ca6074132260fc146 100644 (file)
@@ -137,7 +137,7 @@ static void checkCompiledTargetCompatibility(const gmx_device_info_t *devInfo)
     }
 }
 
-bool isHostMemoryPinned(void *h_ptr)
+bool isHostMemoryPinned(const void *h_ptr)
 {
     cudaPointerAttributes memoryAttributes;
     cudaError_t           stat = cudaPointerGetAttributes(&memoryAttributes, h_ptr);
@@ -254,7 +254,10 @@ static int do_sanity_checks(int dev_id, cudaDeviceProp *dev_prop)
     }
 
     /* try to execute a dummy kernel */
-    k_dummy_test<<< 1, 512>>> ();
+    KernelLaunchConfig config;
+    config.blockSize[0] = 512;
+    const auto         dummyArguments = prepareGpuKernelArguments(k_dummy_test, config);
+    launchGpuKernel(k_dummy_test, config, nullptr, "Dummy kernel", dummyArguments);
     if (cudaThreadSynchronize() != cudaSuccess)
     {
         return -1;