Re: [AMBER] Amber22 Could not import mpi4py package.

From: Siwakorn Sukharom via AMBER <amber.ambermd.org>
Date: Tue, 16 May 2023 02:08:23 +0000

I am able to solve it. it turn outs that in my case, it has an issue with the maintenance on my cray system. As mentioned in https://docs.nersc.gov/development/languages/python/using-python-perlmutter/


"When mpi4py is built locally with cray-mpich, cray-mpich dependencies on system libraries are essentially pulled into the environment. The system libssh is not compatible with some versions of the openssl package that are automatically included in conda environments."


So my workaround is use amber.conda install -c conda-forge libssh


________________________________
From: Martin Juhás <juhasm.faf.cuni.cz>
Sent: Monday, May 15, 2023 8:31:04 PM
To: Siwakorn Sukharom; AMBER Mailing List
Subject: Re: Amber22 Could not import mpi4py package.

Hi, I had the same problem in Amber22.

I was able to install mpi4py followingly (for me the problem was with the ld):
cd <path to amber22_src>/build/CMakeFiles/miniconda/install/compiler_compat
rm -f ld
ln -s /usr/bin/ld ld

build mpi4py from source:
cd <path to amber22_src>/AmberTools/src/mpi4py-3.1.3
<path to amber22>/miniconda/bin/python setup.py<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fsetup.py&c=E,1,zbY4lUmh0PToDkwA3c6RoPMPBO8C-nWk6CXF0tnN5nnQi4VEMHhEwgii3jqiWTdm3epH4HfAkXEcOsHU1ERrwYIp1863D7bBk_bNuiNlIWoKT7sybinf8NtsbCfs&typo=1&ancr_add=1> install

after that, revoke that change:
cd <path to amber22_src>/build/CMakeFiles/miniconda/install/compiler_compat
rm -f ld
ln -s ../bin/x86_64-conda-linux-gnu-ld ld

Hope this helps.

Martin
________________________________
Od: Siwakorn Sukharom via AMBER <amber.ambermd.org>
Odoslané: pondelok 15. mája 2023 8:20
Komu: amber.ambermd.org <amber.ambermd.org>
Predmet: [AMBER] Amber22 Could not import mpi4py package.

[EXTERNAL EMAIL]


I can successfully install amber22 on the system with cray programming environment, but i has a problem with mpi4py when I want to run MMPBSA.py.MPI
My system is AMD EPYC™ 7713 with Nvidia A100, and the network is HPE Slingshot Interconnect. For the compiler, I used gcc/11.2.0, cray-mpich and CUDA 11.7

This the error when i ran MMPBSA.py.MPI:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/lustrefs/disk/modules/easybuild/software/Amber/amber22/bin/MMPBSA.py.MPI", line 53, in <module>
Traceback (most recent call last):
  File "/lustrefs/disk/modules/easybuild/software/Amber/amber22/bin/MMPBSA.py.MPI", line 53, in <module>
    from mpi4py import MPI
ImportError: /usr/lib64/libssh.so.4: undefined symbol: EVP_KDF_CTX_new_id, version OPENSSL_1_1_1d

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/lustrefs/disk/modules/easybuild/software/Amber/amber22/bin/MMPBSA.py.MPI", line 55, in <module>
    from mpi4py import MPI
ImportError: /usr/lib64/libssh.so.4: undefined symbol: EVP_KDF_CTX_new_id, version OPENSSL_1_1_1d

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/lustrefs/disk/modules/easybuild/software/Amber/amber22/bin/MMPBSA.py.MPI", line 55, in <module>
Traceback (most recent call last):
  File "/lustrefs/disk/modules/easybuild/software/Amber/amber22/bin/MMPBSA.py.MPI", line 53, in <module>
Traceback (most recent call last):
  File "/lustrefs/disk/modules/easybuild/software/Amber/amber22/bin/MMPBSA.py.MPI", line 53, 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):

Normally, I can use these approach to install mpi4py on cray system before

source <path_to_amber.sh<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fpath_to_amber.sh&c=E,1,j6MWmnLfa3DNuRS3cbVS98zkc9gn3spX-RV23E6QSIMHa5wrfQtjaLEqZHYkFpctAu4FUSDAP8m_HDuYsCFIz8qJeFdmnYec7rZ6FiB2r5Hw3mC3SA,,&typo=1&ancr_add=1>>
export CC=cc
export MPICC=cc
amber.python setup.py<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fsetup.py&c=E,1,vt8ZU6r9NWb3Nt2br9iKvK2PAd6Iv8pMlAorJb-l29XUkGgKkbQltlgeY2Ffugulyzz4_sNLM7Nyo24XSmuG_PNwDxGuGQ_3588axMv5R-rrEZ0rILCxEeY,&typo=1&ancr_add=1> install

but this time i get the error message:

siwakorn.x3002c0s11b0n0: amber.python setup.py<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fsetup.py&c=E,1,2Bvw7YVMN4owVfX4lguDi7Kpi0HQBSE9l5DTCIwv3jXCVGFV8vPuELXR-T1lWUDfjOqDj_vpBX9HGD2fZn_G7vyfKxH5hc8uL5V-LiDMRaovKd7RSMY,&typo=1&ancr_add=1> install
running install
/home/siwakorn/AMBER/amber22/miniconda/lib/python3.10/site-packages/setuptools/command/install.py:34<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2finstall.py%3a34&c=E,1,kwtt67I6aGShyVEYQNCMFDBDW-we3L9LfWZcGHUnyfQVxBG4kwcfKJibHfSOrAdQ9JiiAQfi3JtYGZlnbrwpOZkVVy6BPV6ULPzJU6fwqihVzE2Biw,,&typo=1&ancr_add=1>: SetuptoolsDeprecationWarning: setup.py<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fsetup.py&c=E,1,_XwuvyjS-lD6BxYIzj0mb-gtXl_GAt5FHbTAZoK4N-hUls136_myJ3zDLyXhyGmDciy6rIuK-mhaSyPNTXIq0JjcRv2eW8_JYyyymVAZ9zzPhCWUwTkr&typo=1&ancr_add=1> install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running build
running build_src
running build_py
running build_clib
error: section/s 'mpi-linux-x86_64,mpi-linux-64bit,mpi-linux,mpi-posix-x86_64,mpi-posix-64bit,mpi-posix,mpi-x86_64,mpi-64bit,mpi' not found in file/s 'mpi.cfg'
running build_ext
error: section/s 'mpi-linux-x86_64,mpi-linux-64bit,mpi-linux,mpi-posix-x86_64,mpi-posix-64bit,mpi-posix,mpi-x86_64,mpi-64bit,mpi' not found in file/s 'mpi.cfg'
running install_lib
running install_egg_info
running egg_info
writing src/mpi4py.egg-info/PKG-INFO
writing dependency_links to src/mpi4py.egg-info/dependency_links.txt
writing top-level names to src/mpi4py.egg-info/top_level.txt
reading manifest file 'src/mpi4py.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fMANIFEST.in&c=E,1,H6VEz3A1KAWBqbwjveu6Tryk3U5UPdCWbvaQDahHvonqG_txIJTLsO9af1o8EMXpgnbzAK0iqWFsJk_c9GI6mTd1tl2tT6BYcpwKp0p8Kk81LA,,&typo=1&ancr_add=1>'
adding license file 'LICENSE.rst'
writing manifest file 'src/mpi4py.egg-info/SOURCES.txt'
removing '/home/siwakorn/AMBER/amber22/miniconda/lib/python3.10/site-packages/mpi4py-3.1.3-py3.10.egg-info' (and everything under it)
Copying src/mpi4py.egg-info to /home/siwakorn/AMBER/amber22/miniconda/lib/python3.10/site-packages/mpi4py-3.1.3-py3.10.egg-info
running install_scripts
siwakorn.x3002c0s11b0n0: ls

Any suggestion?





________________________________

Disclaimer:

This e-mail and any files transmitted with it may contain confidential and proprietary information of the National Science and Technology Development Agency (NSTDA), Thailand. They are intended solely for the use of the addressed individuals or entities. If you are not the intended recipient, you are required to immediately delete this e-mail and its contents from your system. Any disclosure, distribution, or action based upon the contents of this e-mail is strictly prohibited. Any views or opinions presented in this e-mail are solely those of the sender and do not necessarily represent those of NSTDA. NSTDA does not accept any responsibility for the content of this message or the consequences of any actions taken on the basis of the information provided. NSTDA accepts no liability for any damage caused by any virus or malware which may be inserted in this e-mail during transmission.
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.ambermd.org%2fmailman%2flistinfo%2famber&c=E,1,vjk1nFLYB9R3FX0RHVW7RGDS0GmfZOh6Fid5rr0oeNhORG9csowOBmx4Lu-6bnuAdDwfg4LRGsL-BdUQ92RmVRbDMwFlZnntE5iKZsv-kzsb0rgOCshoobhwJCc,&typo=1>

Upozornění: Není-li v této zprávě výslovně uvedeno jinak, má tato e-mailová zpráva nebo její přílohy pouze informativní charakter. Tato zpráva ani její přílohy v žádném ohledu Univerzitu Karlovu k ničemu nezavazují. Text této zprávy nebo jejích příloh není návrhem na uzavření smlouvy, ani přijetím případného návrhu na uzavření smlouvy, ani jiným právním jednáním směřujícím k uzavření jakékoliv smlouvy a nezakládá předsmluvní odpovědnost Univerzity Karlovy. Obsahuje-li tento e-mail nebo některá z jeho příloh osobní údaje, dbejte při jeho dalším zpracování (zejména při archivaci) souladu s pravidly evropského nařízení GDPR.

Disclaimer: If not expressly stated otherwise, this e-mail message (including any attached files) is intended purely for informational purposes and does not represent a binding agreement on the part of Charles University. The text of this message and its attachments cannot be considered as a proposal to conclude a contract, nor the acceptance of a proposal to conclude a contract, nor any other legal act leading to concluding any contract; nor does it create any pre-contractual liability on the part of Charles University. If this e-mail or any of its attachments contains personal data, please be aware of data processing (particularly document management and archival policy) in accordance with Regulation (EU) 2016/679 of the European Parliament and of the Council on GDPR.



________________________________

Disclaimer:

This e-mail and any files transmitted with it may contain confidential and proprietary information of the National Science and Technology Development Agency (NSTDA), Thailand. They are intended solely for the use of the addressed individuals or entities. If you are not the intended recipient, you are required to immediately delete this e-mail and its contents from your system. Any disclosure, distribution, or action based upon the contents of this e-mail is strictly prohibited. Any views or opinions presented in this e-mail are solely those of the sender and do not necessarily represent those of NSTDA. NSTDA does not accept any responsibility for the content of this message or the consequences of any actions taken on the basis of the information provided. NSTDA accepts no liability for any damage caused by any virus or malware which may be inserted in this e-mail during transmission.
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 15 2023 - 19:30:02 PDT
Custom Search