|
本帖最后由 Uus/pMeC6H4-/キ 于 2024-7-12 14:44 编辑
某Slurm集群内Red Hat Enterprise Linux 8.9系统上已安装gcc 8.5.0、cmake 3.26.5,module list显示已启用模块有intel/2023.2(default)和intelmpi/2023.2(default)。用module load openmpi可加载非默认的openmpi/4.1.5_intel-2022.3,之后mpicxx --version返回icpc (ICC) 2021.10.0 20230609,which mpicxx返回/opt/system/app/openmpi/4.1.5/intel-2022.3/bin/mpicxx。
今欲按本帖首页社长的教程,在此环境下安装CP2K 2024.1,发现安装至COSMA-v2.6.6(应与toolchain/scripts/stage4/install_cosma.sh相关)时报错无法找到MPI_CXX:
- ==================== Installing COSMA ====================
- COSMA-v2.6.6.tar.gz is found
- Installing from scratch into /home/xxxxxx/cp2k-2024.1/tools/toolchain/install/COSMA-2.6.6
- -- The CXX compiler identification is GNU 8.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
- -- Selected ScaLAPACK backend (or implementation) for COSTA: MKL
- -- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
- CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- Could NOT find MPI (missing: MPI_CXX_FOUND CXX)
- Call Stack (most recent call first):
- /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
- /usr/share/cmake/Modules/FindMPI.cmake:1837 (find_package_handle_standard_args)
- CMakeLists.txt:55 (find_package)
- -- Configuring incomplete, errors occurred!
- make: *** No targets specified and no makefile found. Stop.
- make: *** No rule to make target 'install'. Stop.
- -- The CXX compiler identification is GNU 8.5.0
- -- The C compiler identification is GNU 8.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
- -- Detecting C compiler ABI info
- -- Detecting C compiler ABI info - done
- -- Check for working C compiler: /usr/bin/gcc - skipped
- -- Detecting C compile features
- -- Detecting C compile features - done
- -- Selected SCALAPACK backend for COSMA: MKL
- -- The Fortran compiler identification is GNU 8.5.0
- -- Detecting Fortran compiler ABI info
- -- Detecting Fortran compiler ABI info - done
- -- Check for working Fortran compiler: /usr/bin/gfortran - skipped
- -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
- -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
- -- Found Threads: TRUE
- -- Found MPI_C: /opt/system/app/intel/2023.2/mpi/2021.12/lib/libmpi.so (found version "3.1")
- -- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
- -- Found MPI_Fortran: /opt/system/app/intel/2023.2/mpi/2021.12/lib/libmpifort.so (found version "3.1")
- -- Could NOT find MPI (missing: MPI_CXX_FOUND CXX) (found version "3.1")
- -- Found OpenMP_CXX: -fopenmp (found version "4.5")
- -- Found OpenMP_C: -fopenmp (found version "4.5")
- -- Found OpenMP_Fortran: -fopenmp (found version "4.5")
- -- Found OpenMP: TRUE (found version "4.5") found components: CXX C Fortran
- -- Found MKL: /opt/system/app/intel/2023.2/mkl/2023.2.0/include
- -- Found Blas: ;/opt/system/app/intel/2023.2/mkl/2023.2.0/lib/intel64/libmkl_gf_lp64.so;/opt/system/app/intel/2023.2/mkl/2023.2.0/lib/intel64/libmkl_gnu_thread.so;/opt/system/app/intel/2023.2/mkl/2023.2.0/lib/intel64/libmkl_core.so;;;Threads::Threads
- -- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
- CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- Could NOT find MPI (missing: MPI_CXX_FOUND CXX) (found version "3.1")
- Call Stack (most recent call first):
- /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
- /usr/share/cmake/Modules/FindMPI.cmake:1837 (find_package_handle_standard_args)
- CMakeLists.txt:107 (find_package)
- -- Configuring incomplete, errors occurred!
- make: *** No targets specified and no makefile found. Stop.
- make: *** No rule to make target 'install'. Stop.
- /home/xxxxxx/cp2k-2024.1/tools/toolchain/scripts/tool_kit.sh: line 663: /home/xxxxxx/cp2k-2024.1/tools/toolchain/install/COSMA-2.6.6/install_successful: No such file or directory
复制代码
除此之外,其余库已通过执行./install_cp2k_toolchain.sh --with-sirius=no --with-openmpi=system --with-cmake=system --with-cosma=no正常安装完毕。上述安装过程未在toolchain/build/COSMA-2.6.6内产生.log文件。
第二天编辑:用module load cmake/3.24.3_gnu-8.5.0可加载非默认的cmake 3.24.3,但此时亦无法解决上述问题。
编辑2:试图跳过COSMA包编译CP2K 2024.1,产生形如此帖的报错“This module file was not generated by any release of this compiler. [LIBXSMM]”
编辑3:读了这个帖子的内容才明白,估计自带的OpenMPI是Intel编译的,与GNU编译的gcc,cmake,gfortran之类不兼容。现在放弃module load openmpi调用,而用./install_cp2k_toolchain.sh --with-sirius=no --with-cmake=system --with-openmpi=install --with-intelmpi=no --with-mpich=no --with-intel=no --with-gcc=system自己另外装openmpi,这样COSMA可以顺利完成,CP2K 2024.1编译也正常完成了。 |
|