Hi everyone!
I was trying to compile amber24 on Centos 7 following the instructions of the manual. Compiling the serial code works fine but when trying to instal the MPI version (both mpicc and mpif90 are on the PATH) by editing run_cmake to make DMPI=TRUE, ./run_cmake works without errors but make install finish with an error related to Python.h:
/home/amber24_src/build/AmberTools/src/nlopt/src/swig/CMakeFiles/nlopt_python.dir/nloptPYTHON_wrap.cxx:149:20: fatal error: Python.h: No such file or directory
#include <Python.h>
I have checked that there are several “Python.h” files on my system, some of them (I guess that the most relevant) are in amber24_src:
[root.orwell build]# find / -iname "Python.h"
/home/lsimon/.local/lib/python3.8/site-packages/tensorflow/include/external/local_config_python/python_include/Python.h
/home/lsimon/.conda/pkgs/python-3.7.9-h7579374_0/include/python3.7m/Python.h
/home/lsimon/.conda/envs/py37/include/python3.7m/Python.h
/home/amber24_src/build/CMakeFiles/miniconda/install/pkgs/python-3.11.9-h955ad1f_0/include/python3.11/Python.h
/home/amber24_src/build/CMakeFiles/miniconda/install/pkgs/debugpy-1.8.5-py311hfdbb021_1/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/home/amber24_src/build/CMakeFiles/miniconda/install/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/home/amber24_src/build/CMakeFiles/miniconda/install/include/python3.11/Python.h
/home/anaconda3/pkgs/python-3.8.5-h7579374_1/include/python3.8/Python.h
/home/anaconda3/include/python3.8/Python.h
/home/amber20_src/build/CMakeFiles/miniconda/install/pkgs/python-3.8.5-h7579374_1/include/python3.8/Python.h
/home/amber20_src/build/CMakeFiles/miniconda/install/include/python3.8/Python.h
/home/amber20/miniconda/pkgs/python-3.8.5-h7579374_1/include/python3.8/Python.h
/home/amber20/miniconda/include/python3.8/Python.h
/home/Python-3.8.12/Include/Python.h
/home/amber24/miniconda/pkgs/python-3.12.2-hab00c5b_0_cpython/include/python3.12/Python.h
/home/amber24/miniconda/pkgs/debugpy-1.8.5-py312h2ec8cdc_1/lib/python3.12/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/home/amber24/miniconda/pkgs/python-3.11.9-h955ad1f_0/include/python3.11/Python.h
/home/amber24/miniconda/pkgs/debugpy-1.8.5-py311hfdbb021_1/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/home/amber24/miniconda/lib/python3.12/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/home/amber24/miniconda/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/home/amber24/miniconda/include/python3.12/Python.h
/home/amber24/miniconda/include/python3.11/Python.h
/usr/include/python2.7/Python.h
/usr/include/python3.6m/Python.h
/usr/local/include/python3.8/Python.h
/usr/local/lib/python3.8/site-packages/tensorflow/include/external/local_config_python/python_include/Python.h
/usr/local/lib/python3.8/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h
/usr/local/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/python-2.7.15-ln2znddui7a6cr4vws6qtk3wkmzasj2y/include/python2.7/Python.h
/usr/local/spack/opt/spack/linux-centos7-x86_64/gcc-4.9.4/python-3.7.0-y5bn3fxm2ik5ktj7zs4vf5nerprpzy22/include/python3.7m/Python.h
/usr/local/spack/opt/spack/linux-centos7-x86_64/gcc-4.9.4/python-2.7.15-hf3orls2ngbd7n762mmaefrllea5lpnb/include/python2.7/Python.h
/opt/omd/versions/1.4.0p33.cre/include/python2.7/Python.h
My system python and python3 version are Python 2.7.5 and Python 3.8.12 (in case it is relevant). Setting -DBUILD_PYTHON=FALSE in run_cmake did not solve the problem.
I also noticed that if I unloaded the module with gcc >6.0 (which was needed in the serial code compilation) and repeat the run_cmake and make_install programs, the installation progressed a bit longer but finally it also failed because some .f files were not compiled with the same version of the f90 compiler (I am not surprised of this, but for the fact that older gcc version is apparently able to find Python.h)
Any idea?
Thanks
Luis
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
- application/pkcs7-signature attachment: smime.p7s
Received on Tue Sep 24 2024 - 11:00:02 PDT