SCOREC / pumi-pic

support libraries for unstructured mesh particle in cell simulations on GPUs and CPUs
BSD 3-Clause "New" or "Revised" License
34 stars 14 forks source link

measuring device memory usage #71

Closed cwsmith closed 1 year ago

cwsmith commented 3 years ago

The particle_structs/test/destroy_test.cpp and test/pseudoXGCm.cpp call cudaMemGetInfo to check device memory usage:

https://github.com/SCOREC/pumi-pic/blob/dcf019a5ff28832ba275fe0b21fe59b0a7bbb9a3/particle_structs/test/destroy_test.cpp#L63

There are two issues with this:

The first issue results in the destroy_test failing when another process uses device memory during execution of the region we monitor for no leaks.

The Kokkos developers suggested trying to register a callback as shown here:

https://github.com/kokkos/kokkos/blob/1fb0c284d458c75370094921d9f202c287502325/core/unit_test/tools/TestLogicalSpaces.hpp#L63-L71

This capability exists in Kokkos 3.2.00 and newer.

Angelyr commented 1 year ago

This has been replaced with memory testing.