From 66005929af0eba50e811f2e0a96a3262dd665753 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Fri, 19 Jun 2020 12:50:54 -0400 Subject: [PATCH] Set up the cache size on all ranks --- Grid/threads/Accelerator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Grid/threads/Accelerator.cc b/Grid/threads/Accelerator.cc index d049fd2f..ca46f119 100644 --- a/Grid/threads/Accelerator.cc +++ b/Grid/threads/Accelerator.cc @@ -37,9 +37,10 @@ void acceleratorInit(void) #define GPU_PROP_FMT(canMapHostMemory,FMT) printf("AcceleratorCudaInit: " #canMapHostMemory ": " FMT" \n",prop.canMapHostMemory); #define GPU_PROP(canMapHostMemory) GPU_PROP_FMT(canMapHostMemory,"%d"); cudaGetDeviceProperties(&gpu_props[i], i); + cudaDeviceProp prop; + prop = gpu_props[i]; + totalDeviceMem = prop.totalGlobalMem; if ( world_rank == 0) { - cudaDeviceProp prop; - prop = gpu_props[i]; printf("AcceleratorCudaInit: ========================\n"); printf("AcceleratorCudaInit: Device Number : %d\n", i); printf("AcceleratorCudaInit: ========================\n"); @@ -49,7 +50,6 @@ void acceleratorInit(void) GPU_PROP(managedMemory); GPU_PROP(isMultiGpuBoard); GPU_PROP(warpSize); - totalDeviceMem = prop.totalGlobalMem; // GPU_PROP(unifiedAddressing); // GPU_PROP(l2CacheSize); // GPU_PROP(singleToDoublePrecisionPerfRatio);