devito icon indicating copy to clipboard operation
devito copied to clipboard

openmp offloading memory leak

Open rhodrin opened this issue 3 years ago • 2 comments

When offloading to GPU via openmp a memory leak occurs. More details will follow after I've had chance to conduct further tests, but take the following example:

When running:

DEVITO_PLATFORM=nvidiaX DEVITO_ARCH=clang DEVITO_LANGUAGE=openmp OMPI_CC=clang mpirun -np 2 pytest -vv elastic_example.py

The memory usage seems to top out at a bit over 4Gb. This has been seen on setups with both clang 9 and clang 11. Both setups were using openmpi 4.0.4.

Running each of the tests included in the above example individually results in a far lower peak memory usage (~1Gb).

To do:

  • MFE
  • Does this occur only with MPI?
  • ?

rhodrin avatar Dec 17 '20 14:12 rhodrin

update: the following command is enough to reproduce:

py.test elastic_example.py -r f -vv -x

that is, no need for MPI

FabioLuporini avatar Jan 04 '21 09:01 FabioLuporini

Update: these appear to be leaks inside the OMP runtime more than a devito issue

FabioLuporini avatar Jan 06 '21 11:01 FabioLuporini

gone with latest clang and as of rocm5.4.2, hence closing

FabioLuporini avatar Mar 07 '23 10:03 FabioLuporini