Skip to content

Compilation error with v3.7.0 #4750

@scott-5

Description

@scott-5

Describe the bug

When compiling v3.7.1, an error occurred regarding PEXSI, so in order to identify the issue, we attempted to compile v3.7.0 and v3.6.5. V3.6.5 can compile normally, but v3.7.0 has the following errors:

[ 72%] Building CXX object source/module_relax/CMakeFiles/relax.dir/relax_new/line_search.cpp.o
[ 72%] Building CXX object source/module_relax/CMakeFiles/relax.dir/relax_old/relax_old.cpp.o
[ 72%] Building CXX object source/module_esolver/CMakeFiles/esolver.dir/esolver_lj.cpp.o
[ 72%] Building CXX object source/module_hamilt_lcao/module_gint/CMakeFiles/gint.dir/gint_k_sparse1.cpp.o
/share/home/wwu/abacus-develop/source/module_hamilt_lcao/hamilt_lcaodft/fedm_gamma.cpp:55:52: error: no member named 'pexsi_edm' in 'elecstate::DensityMatrix<double, double>'; did you mean 'pexsi_EDM'?
            edm.set_DMK_pointer(ik, pes->get_DM()->pexsi_edm[ik]);
                                                   ^~~~~~~~~
                                                   pexsi_EDM
/share/home/wwu/abacus-develop/source/module_elecstate/module_dm/density_matrix.h:217:22: note: 'pexsi_EDM' declared here
    std::vector<TK*> pexsi_EDM;
                     ^
1 error generated.
gmake[2]: *** [source/module_hamilt_lcao/hamilt_lcaodft/CMakeFiles/hamilt_lcao.dir/fedm_gamma.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[ 73%] Building CXX object source/module_relax/CMakeFiles/relax.dir/relax_old/bfgs_basic.cpp.o
gmake[1]: *** [source/module_hamilt_lcao/hamilt_lcaodft/CMakeFiles/hamilt_lcao.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 74%] Building CXX object source/module_esolver/CMakeFiles/esolver.dir/esolver_dp.cpp.o
[ 74%] Building CXX object source/module_esolver/CMakeFiles/esolver.dir/esolver_of_interface.cpp.o
[ 74%] Building CXX object source/module_esolver/CMakeFiles/esolver.dir/esolver_of.cpp.o
[ 74%] Building CXX object source/module_esolver/CMakeFiles/esolver.dir/esolver_of_tool.cpp.o

Expected behavior

No response

To Reproduce

git clone https://github.com/deepmodeling/abacus-develop.git
git checkout v3.7.0
export PREFIX=${HOME}/abacus

cmake -B build \
  -DCMAKE_INSTALL_PREFIX=${PREFIX} \
  -DCMAKE_CXX_COMPILER=icpx \
  -DMPI_CXX_COMPILER=mpiicpc \
  -DELPA_DIR=${PREFIX}/elpa \
  -DLibxc_DIR=${PREFIX}/libxc \
  -DCEREAL_INCLUDE_DIR=${PREFIX}/cereal/include \
  -DENABLE_LIBRI=ON \
  -DENABLE_PEXSI=ON \
  -DPEXSI_DIR=${PREFIX}/pexsi/pexsi_200 \
  -DParMETIS_DIR=${PREFIX}/pexsi/parmetis \
  -DSuperLU_DIST_DIR=${PREFIX}/pexsi/superlu_dist

The above configuration can be executed normally, but the error is caused by the following command:
cmake --build build

Environment

gcc: 12.2.0
cmake: 3.26
intel oneapi: c++/mkl-2023.10
mpi-2021

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).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions