Grid icon indicating copy to clipboard operation
Grid copied to clipboard

Memory issues after deallocating shared memory region (Cori GPU)

Open giltirn opened this issue 5 years ago • 1 comments

In my CPS A2A code I have always deallocated Grid's shared memory region using Grid::GlobalSharedMemory::SharedMemoryFree() after I am done using the library (the remaining code is pure CPS) in order to save memory. On Cori GPU this appears to be causing future memory allocations performed using CudaMallocManaged to fail for allocs >~ 32MB. Looking at the code it seems the free is universally being performed using munmap whereas under the GPU compile the alloc is being performed with CudaMalloc, and this is likely completely messing up the managed memory!

giltirn avatar Sep 26 '19 19:09 giltirn

Will take a look; normally I expect this region to be live the whole run time of application - especially given the huge page issues etc...

paboyle avatar Oct 26 '19 13:10 paboyle