ORNL/CabanaPD

Neighbor View access on host in Solver

dineshadepu opened this issue · 3 comments

I encountered an error when trying to run the ElasticWave example from the CabanaPD package on my machine, which has CUDA availability. The error appears to be related to an inaccessible memory space in Kokkos::View.

I used the following commands to run the example:

./examples/mechanics/ElasticWave ../examples/mechanics/inputs/elastic_wave.json

The program terminates with the following error message:

|  HPC LAB UoS => ./examples/mechanics/ElasticWave ../examples/mechanics/inputs/elastic_wave.json 
Kokkos::OpenMP::initialize WARNING: OMP_PROC_BIND environment variable not set
  In general, for best performance with OpenMP 4.0 or better set OMP_PROC_BIND=spread and OMP_PLACES=threads
  For best performance with OpenMP 3.1 set OMP_PROC_BIND=true
  For unit testing set OMP_PROC_BIND=false


Kokkos::View ERROR: attempt to access inaccessible memory space (label="num_neighbors")
Backtrace:
[0x651644381459] 
[0x651644355a40] 
[0x6516442afe5a] 
[0x651644353afe] 
[0x6516442c1460] 
[0x6516442ab57a] 
[0x7b92fc229d90] 
[0x7b92fc229e40] __libc_start_main
[0x6516442acb95] 

ElasticWave:3367424 terminated with signal 6 at PC=7b92fc2969fc SP=7fff28d2e560.  Backtrace:
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7b92fc2969fc]
/lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7b92fc242476]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7b92fc2287f3]
./examples/mechanics/ElasticWave(+0xbfa4d)[0x651644355a4d]
./examples/mechanics/ElasticWave(+0x19e5a)[0x6516442afe5a]
./examples/mechanics/ElasticWave(+0xbdafe)[0x651644353afe]
./examples/mechanics/ElasticWave(+0x2b460)[0x6516442c1460]
./examples/mechanics/ElasticWave(+0x1557a)[0x6516442ab57a]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7b92fc229d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7b92fc229e40]
./examples/mechanics/ElasticWave(+0x16b95)[0x6516442acb95]
Kokkos::Cuda ERROR: Failed to call Kokkos::Cuda::finalize()

The installation of all the dependent packages, such as kokkos, cabana are successful, as I am able to run ExaMPM codes with all the backends.

Any idea on how to resolve this?

Many thanks.

You're right, this is a bug - thanks for reporting. I thought this was fixed, but it never made it to main. I'll put in a PR shortly

@dineshadepu let me know if you still have issues with the linked PR

It works now, thanks @streeve .