SCOREC / pumi-pic

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

bug-fix - move thrust sort assertion inside CUDA #125

Closed Fuad-HH closed 6 months ago

Fuad-HH commented 6 months ago

If compiled with Kokkos SERIAL, /particle_structs/test/sortTest.cpp doesn't compile and throws the following error:

/lore/hasanm4/wsources/pumirelated/pumi-pic/particle_structs/test/sortTest.cpp: In lambda function:
/lore/hasanm4/wsources/pumirelated/pumi-pic/particle_structs/test/sortTest.cpp:80:12: error: 'thrustSorted' was not declared in this scope
   80 |     assert(thrustSorted(i) == kokkosSorted(i));
      |            ^~~~~~~~~~~~
gmake[2]: *** [particle_structs/test/CMakeFiles/sortTest.dir/build.make:76: particle_structs/test/CMakeFiles/sortTest.dir/sortTest.cpp.o] Error 1

I have moved this assertion inside the PP_USE_CUDA section.