Re: [AMBER-Developers] mpi4py issues in AMBER22

From: Ray Luo via AMBER-Developers <amber-developers.ambermd.org>
Date: Wed, 17 Aug 2022 14:11:01 -0700

We also met the same problem ... mpi4py is not installed in Amber's
miniconda distribution.

Ray
--
Ray Luo, Ph.D.
Professor of Structural Biology/Biochemistry/Biophysics,
Chemical and Materials Physics, Chemical and Biomolecular Engineering,
Biomedical Engineering, and Materials Science and Engineering
Department of Molecular Biology and Biochemistry
University of California, Irvine, CA 92697-3900
On Wed, Aug 17, 2022 at 1:24 PM Ilyas Yildirim via AMBER-Developers
<amber-developers.ambermd.org> wrote:
>
> 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://urldefense.com/v3/__https://cescos.fau.edu/*iyildirim/__;fg!!CzAuKJ42GuquVTTmVmPViYEvSg!Lk5Jx5_6o9jQNim_0OAYWmZlu9vmsdR8IvFN0_PagMwM-Zeh9QBeyByS7xEUNzZ87gDtwzijcaiVFVQJv1MzfcrXdCzV$             =
>   = https://urldefense.com/v3/__http://scholar.google.com/citations?user=O6RQCcwAAAAJ__;!!CzAuKJ42GuquVTTmVmPViYEvSg!Lk5Jx5_6o9jQNim_0OAYWmZlu9vmsdR8IvFN0_PagMwM-Zeh9QBeyByS7xEUNzZ87gDtwzijcaiVFVQJv1MzfUvYaLgU$   =
>   ---------------------------------------------------------
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> https://urldefense.com/v3/__http://lists.ambermd.org/mailman/listinfo/amber-developers__;!!CzAuKJ42GuquVTTmVmPViYEvSg!Lk5Jx5_6o9jQNim_0OAYWmZlu9vmsdR8IvFN0_PagMwM-Zeh9QBeyByS7xEUNzZ87gDtwzijcaiVFVQJv1MzfSefA3t7$
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Aug 17 2022 - 14:30:06 PDT
Custom Search