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

Build error with branch xgcp_mesh #33

Closed zhangchonglin closed 4 years ago

zhangchonglin commented 4 years ago

When switching to the xgcp_mesh branch and building the code, I encountered the following issue:

[ 28%] Building CXX object xgcp/CMakeFiles/xgcp.dir/xgcp_gyro_scatter.cpp.o
[ 28%] Building CXX object xgcp/CMakeFiles/xgcp.dir/xgcp_input.cpp.o
[ 28%] Building CXX object xgcp/CMakeFiles/xgcp.dir/xgcp_mesh.cpp.o
[ 30%] Building CXX object xgcp/CMakeFiles/xgcp.dir/xgcp_elliptical_push.cpp.o
/space/pumi-pic/pumi-pic/xgcp/xgcp_elliptical_push.cpp:2:10: fatal error: PS_Macros.h: No such file or directory
 #include <PS_Macros.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [xgcp/CMakeFiles/xgcp.dir/xgcp_elliptical_push.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/space/pumi-pic/pumi-pic/xgcp/xgcp_gyro_scatter.cpp(74): error: no instance of function template "pumipic::search_mesh_2d" matches the argument list
            argument types are: (Omega_h::Mesh, xgcp::<unnamed>::SCSpt *, particle_structs::Segment<double [3], Kokkos::Cuda>, particle_structs::Segment<double [3], Kokkos::Cuda>, particle_structs::Segment<int, Kokkos::Cuda>, Omega_h::Write<Omega_h::LO>, int)

1 error detected in the compilation of "/tmp/tmpxft_00004a4f_00000000-6_xgcp_gyro_scatter.cpp1.ii".
make[2]: *** [xgcp/CMakeFiles/xgcp.dir/xgcp_gyro_scatter.cpp.o] Error 1
make[1]: *** [xgcp/CMakeFiles/xgcp.dir/all] Error 2
make: *** [all] Error 2

What't the reason for this failure? Which particle_structures branch should I use?

diamog commented 4 years ago

Some of the work in the xgcp branch uses some major changes to particle_structs which is currently only in the generalize_structures branch. We are currently in the process of merging particle structures into pumipic which will include merging these particle structure changes into master.

zhangchonglin commented 4 years ago

Thanks for the clarification. I actually tried using the generalize_structure branch you mentioned for particle_structures. After rebuilding pumipic, I am now encountering the following error:

[ 19%] Building CXX object src/CMakeFiles/pumipic.dir/pumipic_profiling.cpp.o
In file included from /space/pumi-pic/pumi-pic/src/pumipic_kktypes.cpp:1:0:
/space/pumi-pic/pumi-pic/src/pumipic_kktypes.hpp:6:10: fatal error: psTypes.h: No such file or directory
 #include <psTypes.h>
          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/pumipic.dir/pumipic_kktypes.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/pumipic.dir/all] Error 2
make: *** [all] Error 2

Is this because psTypes.h does not exist and is in a different name (PS_Types.h) in `particle_structures?

diamog commented 4 years ago

The merge is completed, I'll send an email out soon to everyone with more details, but I fixed this error in the new merge as well. You should be able to build master now which has the xgcp_mesh and generalize_structure updates in as well.

zhangchonglin commented 4 years ago

@diamog When I rebuild pumi-pic using the modified script (with deleting ps related text), I encountered the following issue:

-- The CXX compiler identification is GNU 7.3.0
-- Check for working CXX compiler: /opt/scorec/spack/install/linux-rhel7-x86_64/gcc-7.3.0/mpich-3.3-diz4f6ieln25ouifyc7ndtqlfksom6nb/bin/mpicxx
-- Check for working CXX compiler: /opt/scorec/spack/install/linux-rhel7-x86_64/gcc-7.3.0/mpich-3.3-diz4f6ieln25ouifyc7ndtqlfksom6nb/bin/mpicxx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_VERSION: 3.15.4
-- pumipic_VERSION: 1.0.0
-- BUILD_TESTING: OFF
-- CMAKE_INSTALL_PREFIX: /space/pumi-pic/install/pumi-pic/install
-- IS_TESTING: ON
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
-- Found Omega_h: 9.29.2
-- pumipic_USE_Omega_h: ON
-- Omega_h_CONFIG: /space/pumi-pic/install/omega_h/install/lib/cmake/Omega_h/Omega_hConfig.cmake
-- Omega_h_VERSION: 9.29.2
-- CMAKE_CXX_FLAGS   
-- PS_IS_TESTING: OFF
-- Could NOT find KOKKOS (missing: KOKKOS_LIBRARY KOKKOS_INCLUDE_DIR) 
CMake Error at particle_structs/CMakeLists.txt:19 (include):
  include could not find load file:

    KOKKOS_INCLUDE_DIR-NOTFOUND/../kokkos_generated_settings.cmake

-- Kokkos enabled - Overriding compiler flags for consistency with Kokkos install
-- Kokkos CMAKE_CXX_FLAGS 
-- pumipic_USE_Kokkos: OFF
-- CMAKE_CXX_FLAGS   
-- FP64: ON
-- FP32: OFF
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/space/pumi-pic/pumi-pic/particle_structs/support/KOKKOS_INCLUDE_DIR
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
KOKKOS_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/support
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
   used as include directory in directory /space/pumi-pic/pumi-pic/particle_structs/src
KOKKOS_LIBRARY (ADVANCED)
    linked by target "support" in directory /space/pumi-pic/pumi-pic/particle_structs/support

-- Configuring incomplete, errors occurred!
See also "/space/pumi-pic/install/pumi-pic/build/CMakeFiles/CMakeOutput.log".
make: *** No rule to make target `install'.  Stop.
*********************************
No test configuration file found!
*********************************
Usage

  ctest [options]

could you take a look? Thanks!

diamog commented 4 years ago

Looks like it failed to find Kokkos. Check to see if kokkos is being added to CMAKE_PREFIX_PATH. This might have been unnecessary before as it was picked up from the particle_structures install

zhangchonglin commented 4 years ago

This issue is fixed with the help of @diamog:

The fix is updated in the wiki page with changing export CMAKE_PREFIX_PATH=${kk}/lib/CMake/Kokkos/:$oh:$CMAKE_PREFIX_PATH to export CMAKE_PREFIX_PATH=$kk:$oh:$CMAKE_PREFIX_PATH in the build instruction: Building and Running on SCOREC RHEL7