PolyChord / PolyChordLite

Public version of PolyChord: See polychord.co.uk for PolyChordPro
https://polychord.io/
Other
84 stars 26 forks source link

Install Error #36

Closed anusurendra closed 4 years ago

anusurendra commented 4 years ago

Hi, I am install PolyChordLite onto a Centos7 system. However, I am getting the following error:

[root@aims PolyChordLite]# sudo CC=mpicc CXX=mpicxx python setup.py install --user
running install
running bdist_egg
running egg_info
creating pypolychord.egg-info
writing requirements to pypolychord.egg-info/requires.txt
writing pypolychord.egg-info/PKG-INFO
writing top-level names to pypolychord.egg-info/top_level.txt
writing dependency_links to pypolychord.egg-info/dependency_links.txt
writing manifest file 'pypolychord.egg-info/SOURCES.txt'
reading manifest file 'pypolychord.egg-info/SOURCES.txt'
writing manifest file 'pypolychord.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pypolychord
copying pypolychord/output.py -> build/lib.linux-x86_64-2.7/pypolychord
copying pypolychord/settings.py -> build/lib.linux-x86_64-2.7/pypolychord
copying pypolychord/priors.py -> build/lib.linux-x86_64-2.7/pypolychord
copying pypolychord/__init__.py -> build/lib.linux-x86_64-2.7/pypolychord
running build_ext
building '_pypolychord' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/apps
creating build/temp.linux-x86_64-2.7/apps/PolyChordLite
creating build/temp.linux-x86_64-2.7/apps/PolyChordLite/pypolychord
mpicc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/apps/PolyChordLite/src/polychord/ -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c /apps/PolyChordLite/pypolychord/_pypolychord.cpp -o build/temp.linux-x86_64-2.7/apps/PolyChordLite/pypolychord/_pypolychord.o -std=c++11
unable to execute mpicc: No such file or directory
error: command 'mpicc' failed with exit status 1

The mpicc, ie. OpenMPI, is in the PATH as you can see:

echo $PATH
/apps/openmpi/4.0.1/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/anaconda/3.5.1/bin:/opt/ibutils/bin:/opt/pbs/bin:/opt/pbs/sbin:/opt/cmu/bin:/root/bin

Any help will be appreciated.

williamjameshandley commented 4 years ago

Hi @anusurendra . Could you paste the output of the commands below:

git clone https://github.com/PolyChord/PolyChordLite.git
cd PolyChordLite
make pypolychord
anusurendra commented 4 years ago

@williamjameshandley ,

Here is the output from the those commands:

[root@aims apps]# git clone https://github.com/PolyChord/PolyChordLite.git
Cloning into 'PolyChordLite'...
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 4918 (delta 19), reused 32 (delta 13), pack-reused 4867
Receiving objects: 100% (4918/4918), 1.36 MiB | 0 bytes/s, done.
Resolving deltas: 100% (3596/3596), done.
[root@aims apps]# cd PolyChordLite
[root@aims PolyChordLite]# make pypolychord
make -C /apps/PolyChordLite/src/polychord /apps/PolyChordLite/lib/libchord.so
make[1]: Entering directory `/apps/PolyChordLite/src/polychord'
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c nelder_mead.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c utils.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c abort.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c settings.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c calculate.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c mpi_utils.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c random_utils.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c chordal_sampling.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c array_utils.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c run_time_info.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c params.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c priors.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c read_write.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c maximiser.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c ini.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c feedback.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c generate.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c clustering.f90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c nested_sampling.F90
mpif90 -ffree-line-length-none -cpp -fPIC -fno-stack-arrays -Ofast -DMPI -c interfaces.F90
mpicxx -std=c++11 -fPIC -Ofast -DUSE_MPI -c c_interface.cpp
mpif90 -shared maximiser.o interfaces.o nelder_mead.o priors.o read_write.o ini.o mpi_utils.o params.o chordal_sampling.o calculate.o settings.o clustering.o abort.o random_utils.o run_time_info.o array_utils.o nested_sampling.o utils.o generate.o feedback.o c_interface.o -o /apps/PolyChordLite/lib/libchord.so -lstdc++
make[1]: Leaving directory `/apps/PolyChordLite/src/polychord'
=======================================================================================
 now run:

    CC=mpicc CXX=mpicxx python setup.py install --user
[root@aims PolyChordLite]# 
williamjameshandley commented 4 years ago

Are you certain that the wrapper for the c compiler on your system is called mpicc? if you run which mpicc does that give you any output?

anusurendra commented 4 years ago

@williamjameshandley ,

Thanks for helping out with this. Yes, mpicc is my c complier. Here is the output from the which mpicc:

[root@aims PolyChordLite]# which mpicc
/apps/openmpi/4.0.1/bin/mpicc
williamjameshandley commented 4 years ago

This does seem to be an issue that's occurred on centos before, although irritatingly this thread did not seem to resolve it.

What happens if you use the full path, e.g:

CC=/apps/openmpi/4.0.1/bin/mpicc CXX=/apps/openmpi/4.0.1/bin/mpicxx python setup.py install