You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
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
The text was updated successfully, but these errors were encountered:
Hi, I would like to take this issue, but may I first make sure if this problem still exists?
According to this Stack Overflow question, this multiple definition problem is most likely because of the missing inline notation. In the meantime, I notice in this commit, which happened just two days ago, Eigen has added their inline notation EIGEN_ALWAYS_INLINE to to_lapack. I assume this has already been a fix to this problem.
I also tested on a Frontera node, the compilation went on fine.
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:
The text was updated successfully, but these errors were encountered: