Re: [AMBER] Cmake unable to find Mpich

From: Pertschy, Florian via AMBER <amber.ambermd.org>
Date: Tue, 6 Aug 2024 15:46:47 +0000

Hello!

Were you able to resolve this? I'm running into similar problems

________________________________
From: Nil Mu via AMBER <amber.ambermd.org>
Sent: 29 June 2024 02:57:24
To: amber.ambermd.org
Subject: [EXT] [AMBER] Cmake unable to find Mpich

Hello,

I’m trying to install Amber 22 or Amber 24 to our HPC cluster, running on Linux Rocky 8.9.

I was able to build the serial version, and then the cuda version without issues. But I wasn’t able to go through building the MPI version.

Here is the installation script I have tried, along with the error messages. It would be super helpful if I can get some insights for this issue, and thanks in advance!



Installation script
****************************************************************************************************************************************************
#!/bin/bash
module load cmake-3.29.6-ab \
            gcc-11.2.0-2q \
            intel-oneapi-mkl-2023.2.0-me \
            openblas-0.3.24-5f \
            mamba/latest \
            cuda-11.8.0-gcc-11.2.0-66 \
            mpich-4.1.2-gcc-11.2.0-cuda-ax


export PATH=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin:$PATH
export LD_LIBRARY_PATH=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/lib:$LD_LIBRARY_PATH

export MPI_HOME=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin
export MPI_C_INCLUDE_PATH=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/include
export MPI_C_LIBRARIES=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/libmpi.so
export MPI_C=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/lib/libmpi.so
export MPI_CXX=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/lib/libmpicxx.so
export MPI_Fortran=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/lib/libmpicxx.so

export CUDA_HOME=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/cuda-11.8.0-66eeijo

./run_cmake
make install

****************************************************************************************************************************************************
# Edit the run_cmake script
  cmake $AMBER_PREFIX/amber24_src \
    -DCMAKE_INSTALL_PREFIX=/packages/apps/amber/24_cuda_mpi \
    -DCOMPILER=GNU \
    -DMPI_C_COMPILER=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin/mpicc \
    -DMPI_CXX_COMPILER=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin/mpicxx \
    -DMPI_Fortran_COMPILER=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin/mpif90 \
    -DMPIEXEC_EXECUTABLE=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin/mpiexec \
    -DMPI_C_INCLUDE_PATH=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/include \
    -DMPI_C_LIBRARIES=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/lib/libmpi.so \
-DCMAKE_PREFIX_PATH=/packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-11.2.0/mpich-4.1.2-axmujgv/bin/ \
-DMPI=TRUE -DCUDA=FALSE -DINSTALL_TESTS=TRUE \
    -DDOWNLOAD_MINICONDA=TRUE
    2>&1 | tee cmake.log

****************************************************************************************************************************************************





Error messages
****************************************************************************************************************************************************
-- Setting C compiler to gcc
-- Setting CXX compiler to g++
-- Setting Fortran compiler to gfortran
-- Amber source not found, only building AmberTools
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- The Fortran compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-12.3.0/gcc-11.2.0-2qermfr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-12.3.0/gcc-11.2.0-2qermfr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /packages/apps/spack/21.2/opt/spack/x86_64_v3/gcc-12.3.0/gcc-11.2.0-2qermfr/bin/gfortran - skipped
-- Testing if stdlib.h can be included...
-- Testing if stdlib.h can be included... yes
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_WORKS)
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND MPI_Fortran_FOUND)
CMake Error at cmake/MPIConfig.cmake:12 (message):
  You requested MPI, but the MPI C library was not found. Please install one
  and try again, or set MPI_C_INCLUDE_PATH and MPI_C_LIBRARIES to point to
  your MPI.
Call Stack (most recent call first):
  CMakeLists.txt:117 (include)


-- Configuring incomplete, errors occurred!

If errors are reported, search for 'CMake Error' in the cmake.log file.

If the cmake build report looks OK, you should now do the following:

    make install
    source /packages/apps/build/amber/amber24/amber24/amber.sh

Consider adding the last line to your login startup script, e.g. ~/.bashrc

cat install.sh >install
chmod a+x install
****************************************************************************************************************************************************


Thanks,
Nil Mu
HPC Systems Analyst
Research Computing
Arizona State University



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Aug 06 2024 - 09:00:02 PDT
Custom Search