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 14 forks source link

Issue build with enabling Cabana #115

Closed zhangchonglin closed 9 months ago

zhangchonglin commented 9 months ago

I hit the following error building PUMIPic when enabling Cabana library in CMake config:

-DENABLE_CABANA=ON
[ 40%] Built target write_particles
[ 41%] Building CXX object src/CMakeFiles/pumipic-core.dir/pumipic_lb.cpp.o
/hdd1/xgcm/pumi-pic/particle_structs/test/test_structure.cpp(170): error: return value type does not match the function type
        return new ps::DPS<Types, Kokkos::HostSpace>(policy, num_elems, num_ptcls, ppe,
               ^

1 error detected in the compilation of "/hdd1/xgcm/pumi-pic/particle_structs/test/test_structure.cpp".
make[2]: *** [particle_structs/test/CMakeFiles/test_structure.dir/build.make:76: particle_structs/test/CMakeFiles/test_structure.dir/test_structure.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:579: particle_structs/test/CMakeFiles/test_structure.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

When using -DENABLE_CABANA=OFF, the build was fine.

Looks like a minor issue where the test was not updated.

cwsmith commented 9 months ago

What version of Kokkos and Cabana were you using? IIRC, we dropped support for older (< 0.6.0?) cabana versions. @Angelyr Is that correct?

zhangchonglin commented 9 months ago

@cwsmith: Cabana master branch with latest commit and Kokkos 4.2.00.

zhangchonglin commented 9 months ago

PUMIPic is configured enabling test. See below for the cmake part of the script:

cmake $pumipicsrc -DCMAKE_BUILD_TYPE=Release \                                  
                  -DBUILD_SHARED_LIBS=OFF \                                     
                  -DCMAKE_CXX_COMPILER=mpicxx \                                 
                  -DENABLE_CABANA=ON \                                         
                  -DPS_IS_TESTING=ON \                                          
                  -DIS_TESTING=ON \                                             
                  -DTEST_DATA_DIR=$pumipicsrc/pumipic-data \                    
                  -DCMAKE_INSTALL_PREFIX=$pumipic \                             
                  -DCMAKE_CXX_FLAGS="-fPIC" \                                   
Angelyr commented 9 months ago

I am aware of this issue. It will be fixed in the next patch. For now if you need to use Cabana you can set -DPS_IS_TESTING=OFF and -DIS_TESTING=OFF