it’s my first post here so apologies if my style is wrong!
I’ve been trying to install mpi4py (as SU2 requires it for parallel processing) on Ubuntu 16.04 using python 3.6. I downloaded mpi4py and tried to build from source as I would like to use the OpenMPI libraries I had configured, and tried the following:
sudo python setup.py build --mpicc=/opt/openmpi/openmpi-2.1.0/bin/mpicc
However, it ultimately fails with «error: Cannot link MPI programs. Check your configuration!!!»
Looking at the SU2 and mpi4py documentation, they recommend using pip instead. I also tried this:
sudo pip install mpi4py
and env MPICC=/opt/openmpi/openmpi-2.1.0/bin/mpicc pip install mpi4py
but they also gave the same error.
I have saved both outputs — please see the link for the attachments. It seems to pick up on a lot of the files from my NVIDIA CUDA installation, though I’m not sure why.
I’m a beginner at at compiling programs so I’d appreciate it if anyone could shed any light on this? Thanks.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Hi, I’m trying to build mpi4py using my install of openmpi but python setup.py keeps failing.
I have built openmpi in my opt directory (/opt/openmpi/openmpi-2.1.0) and I am running Ubuntu 16.04.
I edited the mpi.cfg file to add my paths and include directory for my install and executed:
python setup.py build --mpi=openmpi
However, I am getting the following error:
running build running build_src running build_py running build_clib MPI configuration: [openmpi] from 'mpi.cfg' MPI C compiler: /opt/openmpi/openmpi-2.1.0/bin/mpicc MPI C++ compiler: /opt/openmpi/openmpi-2.1.0/bin/mpicxx running build_ext MPI configuration: [openmpi] from 'mpi.cfg' MPI C compiler: /opt/openmpi/openmpi-2.1.0/bin/mpicc MPI C++ compiler: /opt/openmpi/openmpi-2.1.0/bin/mpicxx checking for MPI compile and link ... /opt/openmpi/openmpi-2.1.0/bin/mpicc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -I/opt/openmpi/openmpi-2.1.0/include -c _configtest.c -o _configtest.o /opt/openmpi/openmpi-2.1.0/bin/mpicc: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20) success! removing: _configtest.c _configtest.o /opt/openmpi/openmpi-2.1.0/bin/mpicc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -I/opt/openmpi/openmpi-2.1.0/include -c _configtest.c -o _configtest.o /opt/openmpi/openmpi-2.1.0/bin/mpicc: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20) /opt/openmpi/openmpi-2.1.0/bin/mpicc -pthread _configtest.o -Lbuild/temp.linux-x86_64-2.7 -L/opt/openmpi/openmpi-2.1.0/lib -Wl,-R/opt/openmpi/openmpi-2.1.0/lib -o _configtest /opt/openmpi/openmpi-2.1.0/bin/mpicc: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20) /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20: undefined reference to `clGetPlatformInfo@OPENCL_1.0' /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20: undefined reference to `clGetPlatformIDs@OPENCL_1.0' /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20: undefined reference to `clGetDeviceInfo@OPENCL_1.0' /opt/openmpi/openmpi-2.1.0/lib/libopen-pal.so.20: undefined reference to `clGetDeviceIDs@OPENCL_1.0' collect2: error: ld returned 1 exit status failure. removing: _configtest.c _configtest.o error: Cannot link MPI programs. Check your configuration!!!
It seems to be picking up some paths to my NVIDIA CUDA installation, though I am unsure of the reason why.
Can anyone point out if I set some options wrongly or not installed openmpi correctly? (Sorry, I’m a bit new to this). Thanks in advance.
У меня есть код Python, размещенный в gitlab. Недавно я добавил использование для обработки параллельных запусков с MPI. У меня есть набор тестов, который запускается системой gitlab CI. Однако он терпит неудачу, как только пытается установить пакет mpi4py.
Я использую образ python 3.7. Файл .gitlab-ci.yml:
image: python:3.7
test:
stage: test
script:
- pip install -r requirements.txt
- python setup.py build
- python setup.py install
- pytest --junitxml=report.xml -v tests/short.py
artifacts:
when: always
paths:
- report.xml
reports:
junit: report.xml
Сбой происходит, когда после установки пакета mpi4py в соответствии с запросом в файле requirements.txt процесс сборки завершается с ошибкой с сообщением:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -c _configtest.c -o _configtest.o
_configtest.c:2:10: fatal error: mpi.h: No such file or directory
2 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
failure.
removing: _configtest.c _configtest.o
error: Cannot compile MPI programs. Check your configuration!!!
[end of output]
Я полагаю, что библиотека mpi C отсутствует? Как мне его установить?