KaHIP, GNU, OpenMP compiler errors

Hello, guys. I meet some errors during I compile the mpm (cbgeo).
The following steps are what I did:
1). download the code form github. and tar the file in my /home/openource
2). follow the suggested steps from the guide, where I use 'mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ …", but there is the error “-- Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_LIBRARIES)
– Checking for package ‘KaHIP’
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:137 (message):
KaHIP could not be found/configured. (missing: KAHIP_LIBRARIES
KAHIP_INCLUDE_DIRS KAHIP_TEST_RUNS)
Call Stack (most recent call first):
cmake/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
cmake/FindKaHIP.cmake:140 (find_package_handle_standard_args)
CMakeLists.txt:106 (find_package)”.
So I tried ignore the KaHIP and use “cmake -DNO_KAHIP=TRUE …”, it shows"configure done and Generate done". and then I did the next step
3). So I use command “make clean && make -j2” in the terminal and it shows"CMakeFiles/Makefile2:181: recipe for target ‘CMakeFiles/mpmtest.dir/all’ failed
make[1]: *** [CMakeFiles/mpmtest.dir/all] Error 2
Makefile:113: recipe for target ‘all’ failed
make: *** [all] Error 2.
also some errors occurred in the process, looks like “/home/fengzk/opensource/mpm-develop/include/mesh.tcc:1110:3: error: invalid controlling predicate
In file included from /home/fengzk/opensource/mpm-develop/include/solvers/mpm_base.h:24:0”

I am confused about the compiling. Could you please help me figure out the problem?Thanks.
By the way, I noticed that the MKL is an optional, so I didn’t install it.

The OS is the Ubuntu 18.04. and the BOOST Eigen HDF5 has been installed.
Thanks a lot.
@jgiven100

Just to be certain I’m following the steps above, you’re using

mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ -DNO_KAHIP=True ..

as 1 command when ignoring KAHIP?

Update/edit:

I just checked, and I am able to compile fine without MKL. I get the same warning that you describe

-- Could NOT find MKL (missing:  MKL_INCLUDE_DIR MKL_LIBRARIES) 

but I’m still able to make mpm and mpmtest no problem.

After I use " ```
cmake -DCMAKE_CXX_COMPILER=g++ -DNO_KAHIP=True …

there will be 
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Could NOT find MKL (missing:  MKL_INCLUDE_DIR MKL_LIBRARIES) 
-- Checking for package 'KaHIP'
-- KaHIP could not be found/configured. (missing:  KAHIP_LIBRARIES KAHIP_INCLUDE_DIRS KAHIP_TEST_RUNS) 
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "pvtk" references the file
   "/usr/bin/pvtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- Checking for package 'Partio'
-- Partio could not be found/configured. (missing:  PARTIO_LIBRARIES PARTIO_INCLUDE_DIRS) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fengzk/opensource/mpm-develop/build

And the, if I use"make" or “make mpm”, there will be errors:

[  4%] Checking the git repository for changes...
[  4%] Built target check_git
[ 12%] Built target git
[ 16%] Building CXX object CMakeFiles/mpm.dir/src/main.cc.o
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:268:45: warning: specialization of ‘template<unsigned int Tdim> bool mpm::Cell<Tdim>::point_in_cartesian_cell(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 1, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:174:15: warning:   from definition of ‘template<unsigned int Tdim> bool mpm::Cell<Tdim>::point_in_cartesian_cell(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline bool point_in_cartesian_cell(
               ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:279:45: warning: specialization of ‘template<unsigned int Tdim> bool mpm::Cell<Tdim>::point_in_cartesian_cell(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 2, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:174:15: warning:   from definition of ‘template<unsigned int Tdim> bool mpm::Cell<Tdim>::point_in_cartesian_cell(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline bool point_in_cartesian_cell(
               ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:293:45: warning: specialization of ‘template<unsigned int Tdim> bool mpm::Cell<Tdim>::point_in_cartesian_cell(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 3, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:174:15: warning:   from definition of ‘template<unsigned int Tdim> bool mpm::Cell<Tdim>::point_in_cartesian_cell(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline bool point_in_cartesian_cell(
               ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:368:45: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::local_coordinates_point(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 1, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:191:41: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::local_coordinates_point(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline Eigen::Matrix<double, Tdim, 1> local_coordinates_point(
                                         ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:403:45: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::local_coordinates_point(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 2, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:191:41: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::local_coordinates_point(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline Eigen::Matrix<double, Tdim, 1> local_coordinates_point(
                                         ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:472:45: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::local_coordinates_point(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 3, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:191:41: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::local_coordinates_point(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline Eigen::Matrix<double, Tdim, 1> local_coordinates_point(
                                         ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:528:45: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::transform_real_to_unit_cell(const Eigen::Matrix<double, Tdim, 1>&)’ in different namespace [-fpermissive]
     const Eigen::Matrix<double, 1, 1>& point) {
                                             ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:198:41: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, Tdim, 1> mpm::Cell<Tdim>::transform_real_to_unit_cell(const Eigen::Matrix<double, Tdim, 1>&)’ [-fpermissive]
   inline Eigen::Matrix<double, Tdim, 1> transform_real_to_unit_cell(
                                         ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:751:43: warning: specialization of ‘template<unsigned int Tdim> void mpm::Cell<Tdim>::compute_normals()’ in different namespace [-fpermissive]
 inline void mpm::Cell<2>::compute_normals() {
                                           ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:205:8: warning:   from definition of ‘template<unsigned int Tdim> void mpm::Cell<Tdim>::compute_normals()’ [-fpermissive]
   void compute_normals();
        ^
In file included from /home/fengzk/opensource/mpm-develop/include/cell.h:272:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:27,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.tcc:779:43: warning: specialization of ‘template<unsigned int Tdim> void mpm::Cell<Tdim>::compute_normals()’ in different namespace [-fpermissive]
 inline void mpm::Cell<3>::compute_normals() {
                                           ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:27:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/cell.h:205:8: warning:   from definition of ‘template<unsigned int Tdim> void mpm::Cell<Tdim>::compute_normals()’ [-fpermissive]
   void compute_normals();
        ^
In file included from /home/fengzk/opensource/mpm-develop/include/particles/particle.h:412:0,
                 from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.tcc:588:51: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, 6, 1> mpm::Particle<Tdim>::compute_strain_rate(const MatrixXd&, unsigned int)’ in different namespace [-fpermissive]
     const Eigen::MatrixXd& dn_dx, unsigned phase) noexcept {
                                                   ^
In file included from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.h:329:38: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, 6, 1> mpm::Particle<Tdim>::compute_strain_rate(const MatrixXd&, unsigned int)’ [-fpermissive]
   inline Eigen::Matrix<double, 6, 1> compute_strain_rate(
                                      ^
In file included from /home/fengzk/opensource/mpm-develop/include/particles/particle.h:412:0,
                 from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.tcc:604:51: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, 6, 1> mpm::Particle<Tdim>::compute_strain_rate(const MatrixXd&, unsigned int)’ in different namespace [-fpermissive]
     const Eigen::MatrixXd& dn_dx, unsigned phase) noexcept {
                                                   ^
In file included from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.h:329:38: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, 6, 1> mpm::Particle<Tdim>::compute_strain_rate(const MatrixXd&, unsigned int)’ [-fpermissive]
   inline Eigen::Matrix<double, 6, 1> compute_strain_rate(
                                      ^
In file included from /home/fengzk/opensource/mpm-develop/include/particles/particle.h:412:0,
                 from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.tcc:624:51: warning: specialization of ‘template<unsigned int Tdim> Eigen::Matrix<double, 6, 1> mpm::Particle<Tdim>::compute_strain_rate(const MatrixXd&, unsigned int)’ in different namespace [-fpermissive]
     const Eigen::MatrixXd& dn_dx, unsigned phase) noexcept {
                                                   ^
In file included from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.h:329:38: warning:   from definition of ‘template<unsigned int Tdim> Eigen::Matrix<double, 6, 1> mpm::Particle<Tdim>::compute_strain_rate(const MatrixXd&, unsigned int)’ [-fpermissive]
   inline Eigen::Matrix<double, 6, 1> compute_strain_rate(
                                      ^
In file included from /home/fengzk/opensource/mpm-develop/include/particles/particle.h:412:0,
                 from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.tcc:686:52: warning: specialization of ‘template<unsigned int Tdim> void mpm::Particle<Tdim>::map_internal_force()’ in different namespace [-fpermissive]
 inline void mpm::Particle<1>::map_internal_force() noexcept {
                                                    ^
In file included from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.h:205:15: warning:   from definition of ‘template<unsigned int Tdim> void mpm::Particle<Tdim>::map_internal_force()’ [-fpermissive]
   inline void map_internal_force() noexcept override;
               ^
In file included from /home/fengzk/opensource/mpm-develop/include/particles/particle.h:412:0,
                 from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.tcc:699:52: warning: specialization of ‘template<unsigned int Tdim> void mpm::Particle<Tdim>::map_internal_force()’ in different namespace [-fpermissive]
 inline void mpm::Particle<2>::map_internal_force() noexcept {
                                                    ^
In file included from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.h:205:15: warning:   from definition of ‘template<unsigned int Tdim> void mpm::Particle<Tdim>::map_internal_force()’ [-fpermissive]
   inline void map_internal_force() noexcept override;
               ^
In file included from /home/fengzk/opensource/mpm-develop/include/particles/particle.h:412:0,
                 from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.tcc:715:52: warning: specialization of ‘template<unsigned int Tdim> void mpm::Particle<Tdim>::map_internal_force()’ in different namespace [-fpermissive]
 inline void mpm::Particle<3>::map_internal_force() noexcept {
                                                    ^
In file included from /home/fengzk/opensource/mpm-develop/include/materials/material.h:13:0,
                 from /home/fengzk/opensource/mpm-develop/include/mesh.h:37,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/particles/particle.h:205:15: warning:   from definition of ‘template<unsigned int Tdim> void mpm::Particle<Tdim>::map_internal_force()’ [-fpermissive]
   inline void map_internal_force() noexcept override;
               ^
In file included from /home/fengzk/opensource/mpm-develop/include/mesh.h:538:0,
                 from /home/fengzk/opensource/mpm-develop/include/solvers/mpm.h:16,
                 from /home/fengzk/opensource/mpm-develop/src/main.cc:11:
/home/fengzk/opensource/mpm-develop/include/mesh.tcc: In member function ‘void mpm::Mesh<Tdim>::iterate_over_particle_set(int, Toper)’:
/home/fengzk/opensource/mpm-develop/include/mesh.tcc:1125:5: error: invalid controlling predicate
     for (auto sitr = set.begin(); sitr != set.cend(); ++sitr) {
     ^
CMakeFiles/mpm.dir/build.make:81: recipe for target 'CMakeFiles/mpm.dir/src/main.cc.o' failed
make[3]: *** [CMakeFiles/mpm.dir/src/main.cc.o] Error 1
CMakeFiles/Makefile2:154: recipe for target 'CMakeFiles/mpm.dir/all' failed
make[2]: *** [CMakeFiles/mpm.dir/all] Error 2
CMakeFiles/Makefile2:161: recipe for target 'CMakeFiles/mpm.dir/rule' failed
make[1]: *** [CMakeFiles/mpm.dir/rule] Error 2
Makefile:174: recipe for target 'mpm' failed
make: *** [mpm] Error 2

The imported target “vtkRenderingPythonTkWidgets” references the file
“/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so”
but this file does not exist. Possible reasons include:

Looks like you need to try this solution:

I tried to comment the “find package(VTK)” in the CMakeLists.txt, but there is still the errors.
I don’t think it is due to the vtk version.(vtk is just a visualization tool?)
As following messages, if I command “make mpm”

/home/fengzk/opensource/mpm-develop/include/mesh.tcc:1125:5: error: invalid controlling predicate
for (auto sitr = set.begin(); sitr != set.cend(); ++sitr) {
^
CMakeFiles/mpm.dir/build.make:81: recipe for target ‘CMakeFiles/mpm.dir/src/main.cc.o’ failed
make[3]: *** [CMakeFiles/mpm.dir/src/main.cc.o] Error 1
CMakeFiles/Makefile2:154: recipe for target ‘CMakeFiles/mpm.dir/all’ failed
make[2]: *** [CMakeFiles/mpm.dir/all] Error 2
CMakeFiles/Makefile2:161: recipe for target ‘CMakeFiles/mpm.dir/rule’ failed
make[1]: *** [CMakeFiles/mpm.dir/rule] Error 2
Makefile:174: recipe for target ‘mpm’ failed
make: *** [mpm] Error 2

Now that you’ve commented out the following in CmakeLists.txt

#find_package(VTK)
#if (VTK_FOUND)
# include(${VTK_USE_FILE})
#  link_libraries(${VTK_LIBRARIES})
#  add_definitions("-DUSE_VTK")
#  set(mpm_vtk ${mpm_SOURCE_DIR}/src/vtk_writer.cc)
#endif()

if you remove the current build directory and run

mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ -DNO_KAHIP=True ..

what does the terminal output look like?

Update:

I’m unable to reporduce any of these errors. Could you double check all of the dependencies are built as outlined here? This might be an OpenMP issue…

Hello, after I run

mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ -DNO_KAHIP=True ..

and output is following

-- The CXX compiler identification is GNU 5.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: filesystem system 
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- The C compiler identification is GNU 5.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.0.1") found components:  CXX HL 
-- Found OpenMP_C: -fopenmp (found version "4.0") 
-- Found OpenMP_CXX: -fopenmp (found version "4.0") 
-- Found OpenMP: TRUE (found version "4.0")  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Could NOT find MKL (missing:  MKL_INCLUDE_DIR MKL_LIBRARIES) 
-- Checking for package 'KaHIP'
-- KaHIP could not be found/configured. (missing:  KAHIP_LIBRARIES KAHIP_INCLUDE_DIRS KAHIP_TEST_RUNS) 
-- Checking for package 'Partio'
-- Partio could not be found/configured. (missing:  PARTIO_LIBRARIES PARTIO_INCLUDE_DIRS) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fengzk/opensource/mpm-develop/build

This first line is indicating you’re using a pretty old version of GNU compiler

-- The CXX compiler identification is GNU 5.5.0

As indicated here, “you may want to update the GCC version to 9 to have OpenMP 5 specifications support.”

Hello, @jgiven100
I followed your suggestion and update the gcc version to 9 and alter it as basic gcc version.
It works well and I have make it successfully.
Thanks a lot. I will test some examples and any questions or problems I will put out here.
Thanks again.

1 Like

Hello, @jgiven100
I noticed that there is the boundary constraint with “apply_friction_constraints(dt);” and “apply_velocity_constraints();”. I know that I can fix the boundary nodes as force = 0 or momentum=0 (or fix one direction). How do I understand this function using the fiction? is there any documents I can follow.
Thanks a lot~

I noticed that there is the boundary constraint with “apply_friction_constraints(dt);” and “apply_velocity_constraints();”. I know that I can fix the boundary nodes as force = 0 or momentum=0 (or fix one direction). How do I understand this function using the fiction? is there any documents I can follow.

Please make a new post for this question.