Skip to content

Fails to compile with the latest Eigen version on Stampede2 #726

@kks32

Description

@kks32

Describe the bug
Eigen v3.4.0 causes multiple definition errors and fails to compile the MPM code.

To Reproduce
Steps to reproduce the behavior on Stampede2:

  1. Compile with the following commands:
cd $WORK
module load boost hdf5 qt5 vtk
export LD_LIBRARY_PATH=$SWR_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
git clone https://gitlab.com/libeigen/eigen.git
cd $WORK && git clone https://github.com/KaHIP/KaHIP && \
   cd KaHIP && sh ./compile_withcmake.sh
cd $WORK && git clone https://github.com/cb-geo/mpm.git
git clone https://github.com/cb-geo/mpm-benchmarks.git benchmarks
export CC=icc
export CXX=icpc
cd mpm && mkdir build && cd build && cmake -DBOOST_ROOT=$TACC_BOOST_DIR -DBOOST_INCLUDE_DIRS=$TACC_BOOST_INC -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=$WORK/eigen -DKAHIP_ROOT=$WORK/KaHIP ..
make -j8
  1. Produces this compilation error:
CMakeFiles/mpm.dir/src/hdf5_particle.cc.o: In function `Eigen::internal::lapacke_helpers::to_lapack(long)':
hdf5_particle.cc:(.text+0x0): multiple definition of `Eigen::internal::lapacke_helpers::to_lapack(long)'
CMakeFiles/mpm.dir/src/main.cc.o:main.cc:(.text+0xef0): first defined here
CMakeFiles/mpm.dir/src/io/io.cc.o: In function `Eigen::internal::lapacke_helpers::to_lapack(long)':
io.cc:(.text+0x6910): multiple definition of `Eigen::internal::lapacke_helpers::to_lapack(long)'
CMakeFiles/mpm.dir/src/main.cc.o:main.cc:(.text+0xef0): first defined here
CMakeFiles/mpm.dir/src/mpm.cc.o: In function `Eigen::internal::lapacke_helpers::to_lapack(long)':
mpm.cc:(.text+0xa80): multiple definition of `Eigen::internal::lapacke_helpers::to_lapack(long)'
CMakeFiles/mpm.dir/src/main.cc.o:main.cc:(.text+0xef0): first defined here

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions