[AMBER] Trouble Installing OpenMPI on Amazon Linux 2 (CentOS)

From: Evan Biedermann via AMBER <amber.ambermd.org>
Date: Wed, 7 Jun 2023 13:12:40 -0400

Hello,

*Problem Summary:*
I am having an issue installing Amber22 with CUDA and MPI. I have followed
the directions for installing in centos using cmake following both
http://ambermd.org/InstCentOS.php and https://ambermd.org/doc12/Amber22.pdf.
I ran the initial install following the step 3 of page 23 on the pdf
instructions. Then I installed the MPI compilers in the
$AMBERHOME/AmberTools/src path as specified in step 8 of page 24. After
that, I went back to the run_cmake file, set DMPI=TRUE, and ran sudo
./run_cmake.

The mpifort and mpif90 compilers are in the same path as the MPI C and MPI
CXX Compilers, but for some reason cmake is unable to find them. I have
tried adding the path to .bashrc, adding set(MPI_Fortran_COMPILER
/opt/amber22/AmberTools/src/bin), set(MPI_Fortran_INCLUDE_PATH
/opt/amber22/AmberTools/src/bin), set(MPI_Fortran_LIBRARIES
/opt/amber22/AmberTools/src/bin) to the MPIConfig.cmake and CMakeList.txt
files and nothing has worked. I have also tried setting the INCLUDE_PATH
and LIBRARIES to /opt/amber22/AmberTools/src/lib/openmpi.

To add more specifics, I originally installed the version of OpenMPI by
using wget to download openmpi-4.1.5.tar.bz2 to $AMBERHOME/AmberTools/src,
unpacking and installing following these commands:

   1. *tar -xzf openmpi-4.0.1.tar.gz*
   2. *cd openmpi-4.1.5*
   3.
*./configure --prefix=/opt/amber22/AmberTools/src *
   4. *make*
   5. *sudo make all install*

This ended up with the following bin folder in this
path: /opt/amber22/AmberTools/src/bin
[image: image.png]
(if the picture does load, the bin contains mpicc, mpicxx, mpif77, mpirun,
mpiCC, mpiexec, mpifort, mpif90, mpic++....)


Here are the full details on the system I'm using:









*NAME="Amazon Linux"VERSION="2"ID="amzn"ID_LIKE="centos rhel
fedora"VERSION_ID="2"PRETTY_NAME="Amazon Linux
2"ANSI_COLOR="0;33"CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"HOME_URL="https://amazonlinux.com/
<https://amazonlinux.com/>"*
*Description: Amazon Linux release 2 (Karoo)*

I do believe that the issue is coming from a base version of mpi
interfering with the one I tried to install, because originally when I used
the command *which mpif90* it would show a path to */efs/anaconda3/bin*. I
then tried *sudo yum install openmpi-devel* and *module load mpi* and
now *which
mpif90* gives */opt/amazon/openmpi/bin/mpif90* and *mpif90 --version*
 gives:

*GNU Fortran (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15)*


*Copyright (C) 2017 Free Software Foundation, Inc.This is free software;
see the source for copying conditions. There is NOwarranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.*

However, the Amber build is still failing giving the same output as the
original error:































*--
**************************************************************************--
Starting configuration of Amber version 22.0.0...-- CMake Version: 3.26.4--
For how to use this build system, please read this wiki:--
  http://ambermd.org/pmwiki/pmwiki.php/Main/CMake
<http://ambermd.org/pmwiki/pmwiki.php/Main/CMake>-- For a list of important
CMake variables, check here:--
  http://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Common-Options
<http://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Common-Options>--
**************************************************************************--
Amber source found, building AmberTools and Amber-- Could NOT find
MPI_Fortran (missing: MPI_Fortran_WORKS)-- Could NOT find MPI (missing:
MPI_Fortran_FOUND) (found version "4.0")-- MPI C Compiler:
/opt/amber22/AmberTools/src/bin/-- MPI CXX Compiler:
/opt/amber22/AmberTools/src/bin/CMake Error at cmake/MPIConfig.cmake:16
(message): You requested MPI, but the MPI Fortran library was not found.
Please install one and try again, or set MPI_Fortran_INCLUDE_PATH and
MPI_Fortran_LIBRARIES to point to your MPI.Call Stack (most recent call
first): CMakeLists.txt:120 (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 /opt/amber22/amber.shConsider adding the last line
to your login startup script, e.g. ~/.bashrc*

It looks like the MPI C and MPI CC compilers are still being sourced from
/opt/amber22/AmberTools/src/bin/ but it can't find the fortran compiler.
I've tried removing /opt/amber22/AmberTools/src/bin/ from the PATH to use
the yum install, but the build is still
sourcing /opt/amber22/AmberTools/src/bin/ for MPI C and MPI CC.

Please let me know how I can resolve this issue.

Best,
Evan

-- 
Evan Biedermann
Associate Solutions Architect
Engineering | Cloud303
ebiedermann.cloud303.io
cloud303.io
12081 W Alameda Pkwy, Suite 150, Lakewood, CO 80228
<https://www.hubspot.com/email-signature-generator?utm_source=create-signature>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Jun 07 2023 - 10:30:02 PDT
Custom Search