abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

Bug: CANNOT install ABACUS via gcc-mkl toolchain

Open QuantumMisaka opened this issue 2 years ago • 4 comments

Describe the bug

When try to install ABACUS with g++/mpicxx compiler and MKL library, there will be error in the last building process:

/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp: In function ‘bool ModuleIO::Init(const std::string&, const std::string&, const std::string&)’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp:83:1: warning: no return statement in function returning non-void [-Wreturn-type]
   83 | }
      | ^
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp: In function ‘bool ModuleIO::default_parametes_reader(const std::string&, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp:127:1: warning: no return statement in function returning non-void [-Wreturn-type]
  127 | }
      | ^
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp: In function ‘bool ModuleIO::input_parameters_set(std::map<std::__cxx11::basic_string<char>, InputParameter>)’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp:1626:1: warning: control reaches end of non-void function [-Wreturn-type]
 1626 | }
      | ^
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/csr_reader.cpp: In member function ‘ModuleIO::SparseMatrix<T> ModuleIO::csrFileReader<T>::getMatrix(int, int, int) [with T = double]’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/csr_reader.cpp:111:29: warning: control reaches end of non-void function [-Wreturn-type]
  111 |     ModuleBase::WARNING_QUIT("csrFileReader::getMatrix", "R coordinate not found");
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_orb_cpt'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_fini'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_rd'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_omp_task_alloc'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_barrier'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_wr'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_omp_task'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_serialized_parallel'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed4_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_swp'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed4_wr'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_wr'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_max'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical_with_hint'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_critical'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_master'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_flush'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ordered'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx8_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_omp_task_with_deps'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce_nowait'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_max'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_master'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_single'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx4_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_single'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_ordered'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce_nowait'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_serialized_parallel'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed4_rd'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/abacus.dir/build.make:965: abacus] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:827: CMakeFiles/abacus.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Expected behavior

ABACUS can be installed and run by gcc-mkl dependencies

To Reproduce

Use the following scripts as toolchain.sh

#!/bin/bash
#SBATCH -J install
#SBATCH -N 1
#SBATCH -n 16

# JamesMisaka in 2023-08-31
# install abacus by intel-toolchain
# use mkl and intelmpi
# but mpich and openmpi can also be tried
# libtorch and libnpy are for deepks support, which can be =no

module load mkl gcc/12.2.0 cmake/3.26.3

./install_abacus_toolchain.sh \
--with-gcc=system --math-mode=mkl \
--with-openmpi=install \
--with-cmake=system \
--with-scalapack=no \
--with-libxc=install \
--with-fftw=no \
--with-elpa=install \
--with-cereal=install \
--with-libtorch=no \
--with-libnpy=no \
| tee compile.log

which install openmpi by gcc compiler, and use MKL as math libraries, which include blas, scalapack and fftw

#!/bin/bash
#SBATCH -J build_intel
#SBATCH -N 1
#SBATCH -n 64
#SBATCH -o install.log
#SBATCH -e install.err
# install ABACUS with libxc and deepks
# JamesMisaka in 2023.09.02

# Build ABACUS by intel-toolchain

#rm -rf ../build_abacus_icx
module load mkl gcc/12.2.0 cereal cmake/3.26.3 openmpi/4.1.5-gcc12-mkl
# source path/to/vars.sh

VERSION="3.4.2"
TAG="gcc12-mkl"
TOOL=$(pwd)
ABACUS_DIR=..
#source ./install/setup
cd $ABACUS_DIR
#export CPATH=$HOME/lib/cereal/include:$CPATH

PREFIX=$HOME/apps/abacus/${VERSION}-${TAG}
BUILD_DIR=build_abacus-gcc12-mkl
ELPA=$HOME/lib/elpa/2023.05.001-gcc12-mkl/cpu
CEREAL=$HOME/lib/cereal/1.3.2/include/cereal
LIBXC=$HOME/lib/libxc/6.2.2-gcc12-mkl

# if use deepks and deepmd
cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
        -DCMAKE_CXX_COMPILER=g++ \
        -DMPI_CXX_COMPILER=mpicxx \
        -DMKLROOT=$MKLROOT \
        -DELPA_DIR=$ELPA \
        -DCEREAL_INCLUDE_DIR=$CEREAL \
        -DLibxc_DIR=$LIBXC \
        -DENABLE_LCAO=ON \
        -DENABLE_LIBXC=ON \
        -DUSE_OPENMP=ON \
        -DUSE_ELPA=ON \

#module load gcc/12.2.0

cmake --build $BUILD_DIR -j `nproc` | tee build.log
cmake --install $BUILD_DIR | tee build.log

Environment

  • Compiler: gcc 12.2.0
  • MKL: 2023.0.0
  • OpenMPI: 4.1.5

Additional Context

No response

Task list for Issue attackers (only for developers)

  • [ ] Verify the issue is not a duplicate.
  • [ ] Describe the bug.
  • [ ] Steps to reproduce.
  • [ ] Expected behavior.
  • [ ] Error message.
  • [ ] Environment details.
  • [ ] Additional context.
  • [ ] Assign a priority level (low, medium, high, urgent).
  • [ ] Assign the issue to a team member.
  • [ ] Label the issue with relevant tags.
  • [ ] Identify possible related issues.
  • [ ] Create a unit test or automated test to reproduce the bug (if applicable).
  • [ ] Fix the bug.
  • [ ] Test the fix.
  • [ ] Update documentation (if necessary).
  • [ ] Close the issue and inform the reporter (if applicable).

QuantumMisaka avatar Nov 10 '23 16:11 QuantumMisaka

Tried replace OpenMPI 4.1.5 with MPICH 4.1.2, The error is likely the same:

/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp: In function ‘bool ModuleIO::Init(const std::string&, const std::string&, const std::string&)’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp:83:1: warning: no return statement in function returning non-void [-Wreturn-type]
   83 | }
      | ^
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp: In function ‘bool ModuleIO::default_parametes_reader(const std::string&, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp:127:1: warning: no return statement in function returning non-void [-Wreturn-type]
  127 | }
      | ^
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp: In function ‘bool ModuleIO::input_parameters_set(std::map<std::__cxx11::basic_string<char>, InputParameter>)’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/parameter_pool.cpp:1626:1: warning: control reaches end of non-void function [-Wreturn-type]
 1626 | }
      | ^
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/csr_reader.cpp: In member function ‘ModuleIO::SparseMatrix<T> ModuleIO::csrFileReader<T>::getMatrix(int, int, int) [with T = double]’:
/lustre/home/2201110432/apps/abacus/abacus-3.4.2/source/module_io/csr_reader.cpp:111:29: warning: control reaches end of non-void function [-Wreturn-type]
  111 |     ModuleBase::WARNING_QUIT("csrFileReader::getMatrix", "R coordinate not found");
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: warning: libmpi.so.40, needed by /lustre/home/2201110432/lib/elpa/2023.05.001-gcc12-mkl/cpu/lib/libelpa_openmp.so, may conflict with libmpi.so.12
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_orb_cpt'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_fini'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_rd'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_omp_task_alloc'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_barrier'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_wr'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_omp_task'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_serialized_parallel'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed4_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_swp'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed4_wr'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_wr'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_max'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical_with_hint'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_critical'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_master'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_flush'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ordered'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8u'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx8_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_omp_task_with_deps'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce_nowait'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_max'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_master'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_single'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx4_add'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_single'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_ordered'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce_nowait'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_serialized_parallel'
/lustre/software/oneapi/2023.0/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed4_rd'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/abacus.dir/build.make:966: abacus] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:827: CMakeFiles/abacus.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

QuantumMisaka avatar Nov 12 '23 06:11 QuantumMisaka

@caic99 Could you take a look ?

QuantumMisaka avatar Nov 12 '23 06:11 QuantumMisaka

Hi @QuantumMisaka , This is a known issue. Please see https://github.com/deepmodeling/abacus-develop/discussions/2299

Edit: Please notice that the core problem here is that ABACUS is built with a different toolchain regarding ELPA. Given that ELPA is built with gcc-mkl, doing so in ABACUS will not fail in linking.

caic99 avatar Nov 13 '23 03:11 caic99

Hi @QuantumMisaka , This is a known issue. Please see #2299

Edit: Please notice that the core problem here is that ABACUS is built with a different toolchain regarding ELPA. Given that ELPA is built with gcc-mkl, doing so in ABACUS will not fail in linking.

I try to not use ELPA during installation, but the same error occurs,

QuantumMisaka avatar Dec 04 '23 05:12 QuantumMisaka

We will close this issue since the compile option has been changed. We always welcome new issues.

mohanchen avatar Jul 11 '24 13:07 mohanchen