amusecode / amuse

Astrophysical Multipurpose Software Environment. This is the main repository for AMUSE
http://www.amusecode.org
Apache License 2.0
158 stars 99 forks source link

Error with mpich #517

Closed csimpi-kutya closed 4 years ago

csimpi-kutya commented 5 years ago

Hi Everyone!

I'm new to amuse, so apologies if my question is too obvious to figure out, but i searched for an answer everywhere and couldn't find anything, so i decided to write here.

I have macOS high sierra, I've installed the amuse exactly as it is described here: https://amusecode.github.io/installation. The installation of galaxia failed, but apart from that everything went seemingly fine.

First, I tried to install it using openmpi, but then i got exactly the same problem as reported here: https://github.com/amusecode/amuse/issues/456 Therefore, i decided to go with mpich.

Then when i try to run the example programmes that can be found here: https://amusecode.github.io/getting-started, I run into issues.

So i run:

from amuse.community.bhtree.interface import BHTree
from amuse.datamodel import Particles
from amuse.units import nbody_system
from amuse.units import units
convert_nbody = nbody_system.nbody_to_si(1.0 | units.MSun, 149.5e6 | units.km)
instance = BHTree(convert_nbody)

then i receive:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/amuse/community/bhtree/interface.py", line 245, in __init__
    legacy_interface = self.__interface__(**options)
  File "/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/amuse/community/bhtree/interface.py", line 20, in __init__
    CodeInterface.__init__(self, name_of_the_worker=self.name_of_the_worker(mode), **kwargs)
  File "/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/amuse/rfi/core.py", line 752, in __init__
    self._start(name_of_the_worker = name_of_the_worker, **options)
  File "/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/amuse/rfi/core.py", line 780, in _start
    self.channel.start()
  File "/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/amuse/rfi/channel.py", line 1823, in start
    self.socket, address = self.accept_worker_connection(server_socket, self.process)
  File "/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/amuse/rfi/channel.py", line 1751, in accept_worker_connection
    raise exceptions.CodeException('could not connect to worker, worker process terminated')
amuse.support.exceptions.CodeException: could not connect to worker, worker process terminated

After failing with openmpi, i uninstalled it, and i reinstalled mpi4py.

I also ran the following commands:

1) python -c "from mpi4py import MPI"

gives:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dlopen(/Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/mpi4py/MPI.so, 2): Library not loaded: /opt/local/lib/openmpi-gcc7/libmpi.40.dylib
  Referenced from: /Users/j3sakavaka/amuse/Amuse-env/lib/python2.7/site-packages/mpi4py/MPI.so
  Reason: image not found

2) ls -l which mpiexec

gives

lrwxr-xr-x 1 root wheel 33 20 okt 18:58 /opt/local/bin/mpiexec -> /opt/local/bin/mpiexec-mpich-gcc7

3) port installed

gives

The following ports are currently installed:
  bzip2 @1.0.8_0 (active)
  cairo @1.16.0_0+quartz+x11 (active)
  cctools @921_4+llvm80 (active)
  cmake @3.15.4_0 (active)
  curl @7.66.0_0+ssl (active)
  curl-ca-bundle @7.66.0_1 (active)
  cython_select @0.1_1 (active)
  db48 @4.8.30_4 (active)
  expat @2.2.9_0 (active)
  fftw-3 @3.3.8_0+gcc7 (active)
  fontconfig @2.13.1_0 (active)
  freetype @2.10.1_0 (active)
  gcc6 @6.5.0_4 (active)
  gcc7 @7.4.0_3 (active)
  gcc9 @9.2.0_1 (active)
  gcc_select @0.1_8 (active)
  gdbm @1.18.1_1 (active)
  gettext @0.19.8.1_2 (active)
  glib2 @2.58.3_0+x11 (active)
  gmp @6.1.2_3 (active)
  gsl @2.6_0 (active)
  hdf5 @1.10.5_0+cxx+hl (active)
  hwloc @1.11.8_0 (active)
  icu @58.2_2 (active)
  isl @0.21_0 (active)
  ld64 @3_1 (active)
  ld64-latest @274.2_2+llvm80 (active)
  libarchive @3.4.0_1 (active)
  libcxx @5.0.1_4 (active)
  libedit @20190324-3.1_0 (active)
  libffi @3.2.1_0 (active)
  libgcc @2.0_2 (active)
  libgcc6 @6.5.0_4 (active)
  libgcc7 @7.4.0_3 (active)
  libgcc8 @8.3.0_5 (active)
  libgcc9 @9.2.0_1 (active)
  libiconv @1.16_0 (active)
  libidn2 @2.2.0_0 (active)
  libmpc @1.1.0_1 (active)
  libpixman @0.38.4_0 (active)
  libpng @1.6.37_0 (active)
  libpsl @0.21.0-20190419_0 (active)
  libunistring @0.9.10_0 (active)
  libuv @1.32.0_0 (active)
  libxml2 @2.9.9_2 (active)
  llvm-8.0 @8.0.1_0 (active)
  llvm_select @2_0 (active)
  lz4 @1.9.2_0 (active)
  lzo2 @2.10_0 (active)
  mpfr @4.0.2_0 (active)
  mpi-doc @3.3.1_0 (active)
  mpi_select @0.0_3 (active)
  mpich-gcc7 @3.3.1_0+fortran (active)
  ncurses @6.1_0 (active)
  nosetests_select @0.1_0 (active)
  OpenBLAS @0.3.7_0+gcc9+lapack (active)
  openssl @1.1.1d_0 (active)
  ossp-uuid @1.6.2_11+perl5_28 (active)
  pcre @8.43_0 (active)
  perl5.28 @5.28.2_0 (active)
  pkgconfig @0.29.2_0 (active)
  py27-altgraph @0.16.1_0 (active)
  py27-backports @1.0_0 (active)
  py27-backports-functools_lru_cache @1.5_1 (active)
  py27-backports_abc @0.5_0 (active)
  py27-cairo @1.18.1_0+quartz+x11 (active)
  py27-certifi @2019.09.11_0 (active)
  py27-cycler @0.10.0_0 (active)
  py27-cython @0.29.13_0 (active)
  py27-dateutil @2.8.0_0 (active)
  py27-docutils @0.15_0 (active)
  py27-futures @3.3.0_0 (active)
  py27-h5py @2.10.0_0 (active)
  py27-kiwisolver @1.1.0_0 (active)
  py27-macholib @1.11_0 (active)
  py27-matplotlib @2.2.4_0+cairo+webagg (active)
  py27-modulegraph @0.17_0 (active)
  py27-monotonic @1.5_0 (active)
  py27-nose @1.3.7_1 (active)
  py27-numpy @1.16.4_0+gfortran+openblas (active)
  py27-parsing @2.2.0_0 (active)
  py27-pkgconfig @1.5.1_0 (active)
  py27-py2app @0.19_0 (active)
  py27-pyobjc @5.2_0 (active)
  py27-pyobjc-cocoa @5.2_0 (active)
  py27-roman @3.2_0 (active)
  py27-setuptools @41.4.0_0 (active)
  py27-singledispatch @3.4.0.3_0 (active)
  py27-six @1.12.0_0 (active)
  py27-subprocess32 @3.5.3_0 (active)
  py27-tornado @5.1.1_0 (active)
  py27-tz @2019.2_0 (active)
  py27-virtualenv @16.7.5_0 (active)
  python2_select @0.0_3 (active)
  python27 @2.7.16_2 (active)
  python_select @0.3_8 (active)
  qhull @2019.1_0 (active)
  readline @8.0.000_0 (active)
  sqlite3 @3.30.1_0 (active)
  virtualenv_select @0.1_0 (active)
  xar @1.6.1_1 (active)
  xorg-libpthread-stubs @0.4_0 (active)
  xorg-libX11 @1.6.8_0 (active)
  xorg-libXau @1.0.9_0 (active)
  xorg-libxcb @1.13.1_0+python37 (active)
  xorg-libXdmcp @1.1.3_0 (active)
  xorg-libXext @1.3.4_0 (active)
  xorg-xcb-proto @1.13_2+python37 (active)
  xorg-xcb-util @0.4.0_1 (active)
  xorg-xorgproto @2019.1_1 (active)
  xrender @0.9.10_1 (active)
  xz @5.2.4_0 (active)
  zlib @1.2.11_0 (active)
  zstd @1.4.3_0 (active)

4) port select --summary

gives

Name        Selected            Options
====        ========            =======
cython      none                cython27 none
gcc         mp-gcc7             mp-gcc6 mp-gcc7 mp-gcc9 none
llvm        none                mp-llvm-8.0 none
mpi         mpich-gcc7-fortran  mpich-gcc7-fortran none
nosetests   nosetests27         nosetests27 none
python      python27            python27 python27-apple none
python2     python27            python27 python27-apple none
virtualenv  virtualenv27        virtualenv27 none

5) mpirun -n 2 hostname

gives

MacBook-Pro-van-Dorozsmai.local
MacBook-Pro-van-Dorozsmai.local

(this last one also produced two pop up windows but they closed down so fast, that i couldn't read them)

If any of you could help me with this, I'd really appreciate that! Thank you!

rieder commented 5 years ago

Hi @csimpi-kutya,

From the output of python -c "from mpi4py import MPI" it looks like mpi4py isn't working yet. This is probably because it was built with OpenMPI before you installed MPICH. Could you try uninstalling all amuse packages and mpi4py, clearing your pip cache (located in ~/Library/Caches/pip on macOS or ~/.cache/pip on Linux) and then reinstalling mpi4py and amuse?

Cheers, Steven

csimpi-kutya commented 5 years ago

Thank you for your answer.

I followed your instructions, but now the installation of mpi4py fails with the following long error message:

  Building wheel for mpi4py (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/j3sakavaka/amuse/Amuse-env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/setup.py'"'"'; __file__='"'"'/private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-wheel-Bs7tGF --python-tag cp27
       cwd: /private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/
  Complete output (162 lines):
  running bdist_wheel
  running build
  running build_src
  running build_py
  creating build
  creating build/lib.macosx-10.13-x86_64-2.7
  creating build/lib.macosx-10.13-x86_64-2.7/mpi4py
  copying src/mpi4py/run.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  copying src/mpi4py/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  copying src/mpi4py/bench.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  copying src/mpi4py/__main__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/_base.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/server.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/pool.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/aplus.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/__main__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/futures/_lib.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
  copying src/mpi4py/__init__.pxd -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  copying src/mpi4py/libmpi.pxd -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  copying src/mpi4py/MPI.pxd -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
  creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/include
  creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
  copying src/mpi4py/include/mpi4py/mpi4py.MPI.h -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
  copying src/mpi4py/include/mpi4py/mpi4py.MPI_api.h -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
  copying src/mpi4py/include/mpi4py/mpi4py.h -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
  copying src/mpi4py/include/mpi4py/mpi4py.i -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
  copying src/mpi4py/include/mpi4py/mpi.pxi -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
  running build_clib
  MPI configuration: [mpi] from 'mpi.cfg'
  MPI C compiler:    /opt/local/bin/mpicc
  MPI C++ compiler:  /opt/local/bin/mpicxx
  MPI F compiler:    /opt/local/bin/mpifort
  MPI F90 compiler:  /opt/local/bin/mpif90
  MPI F77 compiler:  /opt/local/bin/mpif77
  checking for library 'lmpe' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -llmpe -o _configtest
  ld: library not found for -llmpe
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  building 'mpe' dylib library
  creating build/temp.macosx-10.13-x86_64-2.7
  creating build/temp.macosx-10.13-x86_64-2.7/src
  creating build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/mpe.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/mpe.o
  creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi
  /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libmpe.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/mpe.o -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libmpe.dylib
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

  warning: build_clib: building optional library "mpe" failed

  checking for library 'vt-mpi' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt-mpi -o _configtest
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  checking for library 'vt.mpi' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt.mpi -o _configtest
  ld: library not found for -lvt.mpi
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  building 'vt' dylib library
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/vt.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt.o
  /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libvt.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt.o -L/Users/j3sakavaka/miniconda2/lib -L/Users/j3sakavaka/miniconda2/lib -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libvt.dylib
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

  warning: build_clib: building optional library "vt" failed

  checking for library 'vt-mpi' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt-mpi -o _configtest
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  checking for library 'vt.mpi' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt.mpi -o _configtest
  ld: library not found for -lvt.mpi
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  building 'vt-mpi' dylib library
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/vt-mpi.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-mpi.o
  /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libvt-mpi.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-mpi.o -L/Users/j3sakavaka/miniconda2/lib -L/Users/j3sakavaka/miniconda2/lib -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libvt-mpi.dylib
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

  warning: build_clib: building optional library "vt-mpi" failed

  checking for library 'vt-hyb' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt-hyb -o _configtest
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  checking for library 'vt.ompi' ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt.ompi -o _configtest
  ld: library not found for -lvt.ompi
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  building 'vt-hyb' dylib library
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/vt-hyb.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-hyb.o
  /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libvt-hyb.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-hyb.o -L/Users/j3sakavaka/miniconda2/lib -L/Users/j3sakavaka/miniconda2/lib -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libvt-hyb.dylib
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

  warning: build_clib: building optional library "vt-hyb" failed

  running build_ext
  MPI configuration: [mpi] from 'mpi.cfg'
  MPI C compiler:    /opt/local/bin/mpicc
  MPI C++ compiler:  /opt/local/bin/mpicxx
  MPI F compiler:    /opt/local/bin/mpifort
  MPI F90 compiler:  /opt/local/bin/mpif90
  MPI F77 compiler:  /opt/local/bin/mpif77
  checking for dlopen() availability ...
  checking for header 'dlfcn.h' ...
  /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
  success!
  removing: _configtest.c _configtest.o
  success!
  checking for library 'dl' ...
  /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
  /usr/bin/clang -flat_namespace -undefined suppress _configtest.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -ldl -o _configtest
  success!
  removing: _configtest.c _configtest.o _configtest
  checking for function 'dlopen' ...
  /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
  /usr/bin/clang _configtest.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -ldl -o _configtest
  success!
  removing: _configtest.c _configtest.o _configtest
  building 'mpi4py.dl' extension
  /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_DLFCN_H=1 -DHAVE_DLOPEN=1 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/dynload.c -o build/temp.macosx-10.13-x86_64-2.7/src/dynload.o
  /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 build/temp.macosx-10.13-x86_64-2.7/src/dynload.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -ldl -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/dl.so
  checking for MPI compile and link ...
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
  success!
  removing: _configtest.c _configtest.o
  /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
  /opt/local/bin/mpicc _configtest.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -o _configtest
  ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
  collect2: error: ld returned 1 exit status
  failure.
  removing: _configtest.c _configtest.o
  error: Cannot link MPI programs. Check your configuration!!!
  ----------------------------------------
  ERROR: Failed building wheel for mpi4py
  Running setup.py clean for mpi4py
Failed to build mpi4py
Installing collected packages: numpy, nose, docutils, mpi4py, six, h5py
    Running setup.py install for mpi4py ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/j3sakavaka/amuse/Amuse-env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/setup.py'"'"'; __file__='"'"'/private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-record-B9Jj39/install-record.txt --single-version-externally-managed --compile --install-headers /Users/j3sakavaka/amuse/Amuse-env/bin/../include/site/python2.7/mpi4py
         cwd: /private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/
    Complete output (162 lines):
    running install
    running build
    running build_src
    running build_py
    creating build
    creating build/lib.macosx-10.13-x86_64-2.7
    creating build/lib.macosx-10.13-x86_64-2.7/mpi4py
    copying src/mpi4py/run.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    copying src/mpi4py/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    copying src/mpi4py/bench.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    copying src/mpi4py/__main__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/_base.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/server.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/pool.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/aplus.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/__main__.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/futures/_lib.py -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/futures
    copying src/mpi4py/__init__.pxd -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    copying src/mpi4py/libmpi.pxd -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    copying src/mpi4py/MPI.pxd -> build/lib.macosx-10.13-x86_64-2.7/mpi4py
    creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/include
    creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
    copying src/mpi4py/include/mpi4py/mpi4py.MPI.h -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
    copying src/mpi4py/include/mpi4py/mpi4py.MPI_api.h -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
    copying src/mpi4py/include/mpi4py/mpi4py.h -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
    copying src/mpi4py/include/mpi4py/mpi4py.i -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
    copying src/mpi4py/include/mpi4py/mpi.pxi -> build/lib.macosx-10.13-x86_64-2.7/mpi4py/include/mpi4py
    running build_clib
    MPI configuration: [mpi] from 'mpi.cfg'
    MPI C compiler:    /opt/local/bin/mpicc
    MPI C++ compiler:  /opt/local/bin/mpicxx
    MPI F compiler:    /opt/local/bin/mpifort
    MPI F90 compiler:  /opt/local/bin/mpif90
    MPI F77 compiler:  /opt/local/bin/mpif77
    checking for library 'lmpe' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -llmpe -o _configtest
    ld: library not found for -llmpe
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    building 'mpe' dylib library
    creating build/temp.macosx-10.13-x86_64-2.7
    creating build/temp.macosx-10.13-x86_64-2.7/src
    creating build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/mpe.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/mpe.o
    creating build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi
    /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libmpe.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/mpe.o -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libmpe.dylib
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

    warning: build_clib: building optional library "mpe" failed

    checking for library 'vt-mpi' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt-mpi -o _configtest
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    checking for library 'vt.mpi' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt.mpi -o _configtest
    ld: library not found for -lvt.mpi
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    building 'vt' dylib library
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/vt.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt.o
    /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libvt.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt.o -L/Users/j3sakavaka/miniconda2/lib -L/Users/j3sakavaka/miniconda2/lib -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libvt.dylib
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

    warning: build_clib: building optional library "vt" failed

    checking for library 'vt-mpi' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt-mpi -o _configtest
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    checking for library 'vt.mpi' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt.mpi -o _configtest
    ld: library not found for -lvt.mpi
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    building 'vt-mpi' dylib library
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/vt-mpi.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-mpi.o
    /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libvt-mpi.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-mpi.o -L/Users/j3sakavaka/miniconda2/lib -L/Users/j3sakavaka/miniconda2/lib -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libvt-mpi.dylib
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

    warning: build_clib: building optional library "vt-mpi" failed

    checking for library 'vt-hyb' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt-hyb -o _configtest
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    checking for library 'vt.ompi' ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc -flat_namespace -undefined suppress _configtest.o -L/Users/j3sakavaka/miniconda2/lib -lvt.ompi -o _configtest
    ld: library not found for -lvt.ompi
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    building 'vt-hyb' dylib library
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c src/lib-pmpi/vt-hyb.c -o build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-hyb.o
    /opt/local/bin/mpicc -shared -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -install_name libvt-hyb.dylib build/temp.macosx-10.13-x86_64-2.7/src/lib-pmpi/vt-hyb.o -L/Users/j3sakavaka/miniconda2/lib -L/Users/j3sakavaka/miniconda2/lib -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/lib-pmpi/libvt-hyb.dylib
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    warning: build_clib: command '/opt/local/bin/mpicc' failed with exit status 1

    warning: build_clib: building optional library "vt-hyb" failed

    running build_ext
    MPI configuration: [mpi] from 'mpi.cfg'
    MPI C compiler:    /opt/local/bin/mpicc
    MPI C++ compiler:  /opt/local/bin/mpicxx
    MPI F compiler:    /opt/local/bin/mpifort
    MPI F90 compiler:  /opt/local/bin/mpif90
    MPI F77 compiler:  /opt/local/bin/mpif77
    checking for dlopen() availability ...
    checking for header 'dlfcn.h' ...
    /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
    success!
    removing: _configtest.c _configtest.o
    success!
    checking for library 'dl' ...
    /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
    /usr/bin/clang -flat_namespace -undefined suppress _configtest.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -ldl -o _configtest
    success!
    removing: _configtest.c _configtest.o _configtest
    checking for function 'dlopen' ...
    /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
    /usr/bin/clang _configtest.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -ldl -o _configtest
    success!
    removing: _configtest.c _configtest.o _configtest
    building 'mpi4py.dl' extension
    /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_DLFCN_H=1 -DHAVE_DLOPEN=1 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/dynload.c -o build/temp.macosx-10.13-x86_64-2.7/src/dynload.o
    /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 build/temp.macosx-10.13-x86_64-2.7/src/dynload.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -ldl -o build/lib.macosx-10.13-x86_64-2.7/mpi4py/dl.so
    checking for MPI compile and link ...
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
    success!
    removing: _configtest.c _configtest.o
    /opt/local/bin/mpicc -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _configtest.c -o _configtest.o
    /opt/local/bin/mpicc _configtest.o -Lbuild/temp.macosx-10.13-x86_64-2.7 -o _configtest
    ld: in '/System/Library/Frameworks//OpenCL.framework/Versions/A/OpenCL.tbd', unexpected token: !tapi-tbd-v3 for architecture x86_64
    collect2: error: ld returned 1 exit status
    failure.
    removing: _configtest.c _configtest.o
    error: Cannot link MPI programs. Check your configuration!!!
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/j3sakavaka/amuse/Amuse-env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/setup.py'"'"'; __file__='"'"'/private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-install-juHk2R/mpi4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/vs/0f8lgdcj6pg0v81zn8288vhm0000gn/T/pip-record-B9Jj39/install-record.txt --single-version-externally-managed --compile --install-headers /Users/j3sakavaka/amuse/Amuse-env/bin/../include/site/python2.7/mpi4py Check the logs for full command output.
rieder commented 5 years ago

Sorry for the delay... It looks like you may have a problem with your MPI installation. Could you try compiling and running a simple MPI programme, see e.g. https://mpitutorial.com/tutorials/mpi-hello-world/?

csimpi-kutya commented 4 years ago

Thank you for your answer!

As it turned out, there was indeed some problem with the MPI installation. I don't know why, but it didn't run properly when i installed it using macports. After installing mpich manually, Amuse seems to run without any problems.

Thank you for your help again!

rieder commented 4 years ago

Great to hear it's working now! Please let us know if you run into any more issues.