Is there a way to detect OOM when allocating memory with:
#pragma omp target enter data map(alloc:ptr[0:size])
I didn’t succeed with a try/catch, it seems that it exits without throwing an exception…
Out of memory allocating 1977963936 bytes of device memory Failing in Thread:1 total/free CUDA memory: 85007794176/1577975808 Present table dump for device: NVIDIA Tesla GPU 0, compute capability 8.0, threadid=1 ...empty... call to cuMemAlloc returned error 2: Out of memory Out of memory allocating 1978018512 bytes of device memory
I ask this, cause in my MPI code, only one process has a OOM, and the code hangs unhappily.