[AMBER-Developers] mpi4py issues in AMBER22

From: Ilyas Yildirim via AMBER-Developers <amber-developers.ambermd.org>
Date: Wed, 17 Aug 2022 20:24:03 +0000

There seems to be an issue again with mpi4py, which is required by mmpbsa calculations. I am not sure where to start but I do not think that cmake installs mpi4py at all (in my case). After serial installation, the parallel installation is done with the following options:

# Assume this is Linux:

  cmake $AMBER_PREFIX/amber22_src \
    -DCMAKE_INSTALL_PREFIX=$AMBER_PREFIX/amber22 \
    -DCOMPILER=GNU \
    -DMPI=YES -DCUDA=FALSE -DINSTALL_TESTS=TRUE \
    -DDOWNLOAD_MINICONDA=TRUE \
    2>&1 | tee cmake.log

When I check out the cmake.log file after running run_cmake, I am seeing in two lines the word "mpi4py":

-- Checking for Python package mpi4py -- not found

-- ---building bundled: -----------------------------------------------------.
.
.
.
-- [[32mmpi4py[[0m [[1;29m- MPI support library for MMPBSA.py[[0m
.
.

After the compilation, when I perform mmpbsa calculations as I normally do, I see the following output:

Traceback (most recent call last):
  File "/home/iyildirim/programs/amber22/bin/MMPBSA.py.MPI", line 55, in <module>
    raise MMPBSA_Error('Could not import mpi4py package! Use serial version '
MMPBSA_mods.exceptions.MMPBSA_Error: Could not import mpi4py package! Use serial version or install mpi4py.
Traceback (most recent call last):
  File "/home/iyildirim/programs/amber22/bin/MMPBSA.py.MPI", line 53, in <module>
Traceback (most recent call last):
  File "/home/iyildirim/programs/amber22/bin/MMPBSA.py.MPI", line 53, in <module>
    from mpi4py import MPI
ModuleNotFoundError: No module named 'mpi4py'

When I check out if mpi4py is already installed in amber.python I am seeing the following output:

iyildirim.rnachem:~/programs/amber20_src/build$ amber.python
Python 3.9.12 (main, Apr 5 2022, 06:56:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mpi4py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mpi4py'
>>>

PYTHONPATH is directed to the following directory:

iyildirim.rnachem:~/programs/amber20_src/build$ echo $PYTHONPATH
/home/iyildirim/programs/amber22/lib/python3.9/site-packages

Also, I do not see any mpi4py file inside $AMBERHOME:

iyildirim.rnachem:~/programs/amber22$ find ./ -name "*mpi4py*"
iyildirim.rnachem:~/programs/amber22$

Weird thing is that the files are present in the XXX_src directory:

iyildirim.rnachem:~/programs/amber22_src$ find ./ -name "*mpi4py*"
./build/AmberTools/src/mpi4py-3.1.3
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/mpi4py-build.stamp
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/lib.linux-x86_64-3.9/mpi4py
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/lib.linux-x86_64-3.9/mpi4py/include/mpi4py
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/lib.linux-x86_64-3.9/mpi4py/include/mpi4py/mpi4py.MPI.h
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/lib.linux-x86_64-3.9/mpi4py/include/mpi4py/mpi4py.MPI_api.h
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/lib.linux-x86_64-3.9/mpi4py/include/mpi4py/mpi4py.i
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py-build/lib.linux-x86_64-3.9/mpi4py/include/mpi4py/mpi4py.h
./build/AmberTools/src/mpi4py-3.1.3/CMakeFiles/mpi4py.dir
./AmberTools/src/mpi4py-3.1.3
./AmberTools/src/mpi4py-3.1.3/src/mpi4py
./AmberTools/src/mpi4py-3.1.3/src/mpi4py/include/mpi4py
./AmberTools/src/mpi4py-3.1.3/src/mpi4py/include/mpi4py/mpi4py.MPI.h
./AmberTools/src/mpi4py-3.1.3/src/mpi4py/include/mpi4py/mpi4py.MPI_api.h
./AmberTools/src/mpi4py-3.1.3/src/mpi4py/include/mpi4py/mpi4py.i
./AmberTools/src/mpi4py-3.1.3/src/mpi4py/include/mpi4py/mpi4py.h
./AmberTools/src/mpi4py-3.1.3/src/mpi4py.egg-info
./AmberTools/src/mpi4py-3.1.3/src/mpi4py.MPI.c

It seems that mpi4py is compiled within _src but not copied to $AMBERHOME. I am seeing also the following output in CMakeCache.txt:

iyildirim.rnachem:~/programs/amber22_src/build$ grep mpi4py *
grep: amber-modules: Is a directory
grep: AmberTools: Is a directory
grep: benchmarks: Is a directory
grep: cmake: Is a directory
CMakeCache.txt://Whether the Python package mpi4py was found
CMakeCache.txt:mpi4py_BINARY_DIR:STATIC=/home/iyildirim/programs/amber22_src/build/AmberTools/src/mpi4py-3.1.3
CMakeCache.txt:mpi4py_IS_TOP_LEVEL:STATIC=OFF
CMakeCache.txt:mpi4py_SOURCE_DIR:STATIC=/home/iyildirim/programs/amber22_src/AmberTools/src/mpi4py-3.1.3
grep: CMakeFiles: Is a directory

Is the line "mpi4py_IS_TOP_LEVEL:STATIC=OFF" normal or should it be ON? Any ideas on what is going on? Thanks.

Best,

Ilyas Yildirim, Ph.D.
  ---------------------------------------------------------
  = Assistant Professor =
  = Department of Chemistry & Biochemistry =
  = Florida Atlantic University =
  = 5353 Parkside Drive, Jupiter, FL 33458 =
  = Building MC17, Room # 224 =
  = Phone: +1(561)799-8325 | E-mail: iyildirim_at_fau.edu =
  ---------------------------------------------------------
  = Website: https://cescos.fau.edu/~iyildirim/ =
  = http://scholar.google.com/citations?user=O6RQCcwAAAAJ =
  ---------------------------------------------------------
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Aug 17 2022 - 13:30:05 PDT
Custom Search