Hi,
I often use MMPBSA.py.MPI. However, I've also found that MMPBSA.py.MPI does not build properly in the installation of AmberTools20, as reported in this mailing list. I have followed the installation procedure below, using OpenMPI ver. 4.0.5 built from source.
```
MPIROOT=${HOME}/apps/openmpi/4.0.5_gcc9.3.0
export PATH=$MPIROOT/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MPIROOT/lib
export MANPATH=$MANPATH:$MPIROOT/share/man
cd $AMBERHOME
./update_amber --update
$AMBERHOME/bin/amber.conda install mpi4py -y
./configure -mpi gnu
make -j8 install
```
According to a previous post
http://archive.ambermd.org/202012/0154.html , `$AMBERHOME/bin/amber.conda install mpi4py` will generate MMPBSA.py.MPI. Although this workaround seemed to work well, I have experienced occasional errors when performing calculations using this. This is probably a similar situation to this post
http://archive.ambermd.org/202012/0276.html .
I thought this problem was caused by mpi4py-2.0.0 in the $AMBERHOME/AmberTools/src/mmpbsa_py directory, because this version does not support cython in python 3.8 and may have build problems with the Open MPI 4.0.x series. Please refer to
https://github.com/mpi4py/mpi4py/releases.
Thus, a workaround to solve these problems is to use the latest mpi4py-3.0.3 instead of mpi4py-2.0.0. I suggest a patch to fix the issue:
```
--- AmberTools/src/mmpbsa_py/setup.py 2021-02-05 15:23:58.000000000 +0900
+++ AmberTools/src/mmpbsa_py/setup.py 2021-02-05 15:39:40.000000000 +0900
.. -3,6 +3,8 ..
from distutils.core import setup
import os
import sys
+import urllib.error
+import urllib.request
# First the ParmedTools packages:
packages = ['MMPBSA_mods']
.. -54,8 +56,15 .. if __name__ == '__main__':
PY3 = False
if parallel and not (mpi4py_works or assumeMpi4pyInstalled):
- os.system('tar zxf mpi4py-2.0.0.tar.gz')
- os.chdir('mpi4py-2.0.0')
+ print('Downloading mpi4py-3.0.3.tar.gz...')
+ url = '
https://files.pythonhosted.org/packages/ec/8f/bbd8de5ba566dd77e408d8136e2bab7fdf2b97ce06cab830ba8b50a2f588/mpi4py-3.0.3.tar.gz'
+ try:
+ with urllib.request.urlopen(url) as web_file, open('mpi4py-3.0.3.tar.gz', 'wb') as local_file:
+ local_file.write(web_file.read())
+ except urllib.error.URLError as e:
+ print(e)
+ os.system('tar zxf mpi4py-3.0.3.tar.gz')
+ os.chdir('mpi4py-3.0.3')
try:
print('Building mpi4py... This may take a few minutes.')
ret = os.system('%s setup.py build > ../../mpi4py_install.log 2>&1'
```
After applying this patch, type `. /configure -mpi gnu` to generate the config.h, and `cd AmberTools/src/mmpbsa_py/ && make parallel` could generate MMPBSA.py.MPI correctly.
Please note that I have not confirmed whether the installation using cmake will also work or not.
I hope this information will be of help to you.
Best Regards,
Yoshitaka Moriwaki
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Feb 05 2021 - 10:00:02 PST