adrn / schwimmbad

A common interface to processing pools.
MIT License
116 stars 18 forks source link

Trouble running MPI demo: need at least two MPI processes #38

Closed avivajpeyi closed 3 weeks ago

avivajpeyi commented 3 years ago

When I try to run the MPI demo on my local machine:

mpiexec -n 2 python mpi-demo.py

I get the following error:

Traceback (most recent call last):
  File "mpi-demo.py", line 21, in <module>
    pool = MPIPool()
  File "/Users/avaj0001/anaconda3/envs/venv/lib/python3.7/site-packages/schwimmbad/mpi.py", line 89, in __init__
    raise ValueError("Tried to create an MPI pool, but there "
ValueError: Tried to create an MPI pool, but there was only one MPI process available. Need at least two.
Traceback (most recent call last):
  File "mpi-demo.py", line 21, in <module>
    pool = MPIPool()
  File "/Users/avaj0001/anaconda3/envs/venv/lib/python3.7/site-packages/schwimmbad/mpi.py", line 89, in __init__
    raise ValueError("Tried to create an MPI pool, but there "
ValueError: Tried to create an MPI pool, but there was only one MPI process available. Need at least two.

Any suggestions?

adrn commented 3 years ago

👋 Hey @avivajpeyi

It looks like you are running on a mac or linux machine - if on Mac, can you try:

sysctl -n hw.ncpu

Or if on linux:

grep -c processor /proc/cpuinfo

and see how many processors are available?

Also, is this with openMPI or mpich2? And how did you install it?

thanks!

avivajpeyi commented 3 years ago

Hey @adrn !

Thanks for your reply!

number of processors

On running the above command on my mac, I get:

$ sysctl -n hw.ncpu
12

OpenMPI or MPICH

Im not exactly sure if I used OpenMPI or MPICH... I have both installed?

OpenMPI info ``` Package: Open MPI brew@iMac-Pro Distribution Open MPI: 4.1.0 Open MPI repo revision: v4.1.0 Open MPI release date: Dec 18, 2020 Open RTE: 4.1.0 Open RTE repo revision: v4.1.0 Open RTE release date: Dec 18, 2020 OPAL: 4.1.0 OPAL repo revision: v4.1.0 OPAL release date: Dec 18, 2020 MPI API: 3.1.0 Ident string: 4.1.0 Prefix: /usr/local/Cellar/open-mpi/4.1.0 Configured architecture: x86_64-apple-darwin19.6.0 Configure host: iMac-Pro Configured by: brew Configured on: Sun Feb 28 23:59:35 UTC 2021 Configure host: iMac-Pro Configure command line: '--prefix=/usr/local/Cellar/open-mpi/4.1.0' '--disable-dependency-tracking' '--disable-silent-rules' '--enable-ipv6' '--enable-mca-no-build=op-avx,reachable-netlink' '--with-libevent=/usr/local/opt/libevent' '--with-sge' Built by: brew Built on: Mon Mar 1 00:19:20 UTC 2021 Built host: iMac-Pro C bindings: yes C++ bindings: no Fort mpif.h: yes (single underscore) Fort use mpi: yes (full: ignore TKR) Fort use mpi size: deprecated-ompi-info-value Fort use mpi_f08: yes Fort mpi_f08 compliance: The mpi_f08 module is available, but due to limitations in the gfortran compiler and/or Open MPI, does not support the following: array subsections, direct passthru (where possible) to underlying Open MPI's C functionality Fort mpi_f08 subarrays: no Java bindings: no Wrapper compiler rpath: unnecessary C compiler: clang C compiler absolute: clang C compiler family name: GNU C compiler version: 4.2.1 C++ compiler: clang++ C++ compiler absolute: clang++ Fort compiler: gfortran Fort compiler abs: /usr/local/opt/gcc/bin/gfortran Fort ignore TKR: yes (!GCC$ ATTRIBUTES NO_ARG_CHECK ::) Fort 08 assumed shape: yes Fort optional args: yes Fort INTERFACE: yes Fort ISO_FORTRAN_ENV: yes Fort STORAGE_SIZE: yes Fort BIND(C) (all): yes Fort ISO_C_BINDING: yes Fort SUBROUTINE BIND(C): yes Fort TYPE,BIND(C): yes Fort T,BIND(C,name="a"): yes Fort PRIVATE: yes Fort PROTECTED: yes Fort ABSTRACT: yes Fort ASYNCHRONOUS: yes Fort PROCEDURE: yes Fort USE...ONLY: yes Fort C_FUNLOC: yes Fort f08 using wrappers: yes Fort MPI_SIZEOF: yes C profiling: yes C++ profiling: no Fort mpif.h profiling: yes Fort use mpi profiling: yes Fort use mpi_f08 prof: yes C++ exceptions: no Thread support: posix (MPI_THREAD_MULTIPLE: yes, OPAL support: yes, OMPI progress: no, ORTE progress: yes, Event lib: yes) Sparse Groups: no Internal debug support: no MPI interface warnings: yes MPI parameter check: runtime Memory profiling support: no Memory debugging support: no dl support: yes Heterogeneous support: no mpirun default --prefix: no MPI_WTIME support: native Symbol vis. support: yes Host topology support: yes IPv6 support: yes MPI1 compatibility: no MPI extensions: affinity, cuda, pcollreq FT Checkpoint support: no (checkpoint thread: no) C/R Enabled Debugging: no MPI_MAX_PROCESSOR_NAME: 256 MPI_MAX_ERROR_STRING: 256 MPI_MAX_OBJECT_NAME: 64 MPI_MAX_INFO_KEY: 36 MPI_MAX_INFO_VAL: 256 MPI_MAX_PORT_NAME: 1024 MPI_MAX_DATAREP_STRING: 128 MCA allocator: basic (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA allocator: bucket (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA backtrace: execinfo (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA btl: tcp (MCA v2.1.0, API v3.1.0, Component v4.1.0) MCA btl: vader (MCA v2.1.0, API v3.1.0, Component v4.1.0) MCA btl: self (MCA v2.1.0, API v3.1.0, Component v4.1.0) MCA compress: gzip (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA compress: bzip (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA crs: none (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA dl: dlopen (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA event: external (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA hwloc: external (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA if: bsdx_ipv6 (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA if: posix_ipv4 (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA installdirs: env (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA installdirs: config (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA mpool: hugepage (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA patcher: overwrite (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA pmix: flux (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA pmix: isolated (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA pmix: pmix3x (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA pstat: test (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rcache: grdma (MCA v2.1.0, API v3.3.0, Component v4.1.0) MCA reachable: weighted (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA shmem: posix (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA shmem: sysv (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA shmem: mmap (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA timer: darwin (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA errmgr: default_app (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA errmgr: default_tool (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA errmgr: default_hnp (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA errmgr: default_orted (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA ess: slurm (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA ess: hnp (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA ess: pmi (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA ess: env (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA ess: singleton (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA ess: tool (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA filem: raw (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA grpcomm: direct (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA iof: tool (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA iof: hnp (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA iof: orted (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA odls: default (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA odls: pspawn (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA oob: tcp (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA plm: rsh (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA plm: slurm (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA plm: isolated (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA ras: simulator (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA ras: slurm (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA ras: gridengine (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA regx: fwd (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA regx: naive (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA regx: reverse (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA rmaps: resilient (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rmaps: seq (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rmaps: ppr (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rmaps: mindist (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rmaps: round_robin (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rmaps: rank_file (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rml: oob (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA routed: direct (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA routed: radix (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA routed: binomial (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA rtc: hwloc (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA schizo: jsm (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA schizo: orte (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA schizo: slurm (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA schizo: flux (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA schizo: ompi (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA state: app (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA state: tool (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA state: hnp (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA state: novm (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA state: orted (MCA v2.1.0, API v1.0.0, Component v4.1.0) MCA bml: r2 (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: self (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: han (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: inter (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: monitoring (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: sync (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: sm (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: basic (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: tuned (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: libnbc (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA coll: adapt (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fbtl: posix (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fcoll: individual (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fcoll: two_phase (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fcoll: vulcan (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fcoll: dynamic (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fcoll: dynamic_gen2 (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA fs: ufs (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA io: ompio (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA io: romio321 (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA osc: monitoring (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA osc: sm (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA osc: rdma (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA osc: pt2pt (MCA v2.1.0, API v3.0.0, Component v4.1.0) MCA pml: v (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA pml: cm (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA pml: ob1 (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA pml: monitoring (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA rte: orte (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA sharedfp: sm (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA sharedfp: lockedfile (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA sharedfp: individual (MCA v2.1.0, API v2.0.0, Component v4.1.0) MCA topo: basic (MCA v2.1.0, API v2.2.0, Component v4.1.0) MCA topo: treematch (MCA v2.1.0, API v2.2.0, Component v4.1.0) MCA vprotocol: pessimist (MCA v2.1.0, API v2.0.0, Component v4.1.0) ```
mpich info: ``` HYDRA build details: Version: 3.3.2 Release Date: Tue Nov 12 21:23:16 CST 2019 CC: x86_64-apple-darwin13.4.0-clang -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -L/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib -Wl,-rpath,/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib CXX: x86_64-apple-darwin13.4.0-clang++ -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -L/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib -Wl,-rpath,/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib F77: x86_64-apple-darwin13.4.0-gfortran -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -L/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib -Wl,-rpath,/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib F90: x86_64-apple-darwin13.4.0-gfortran -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -L/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib -Wl,-rpath,/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib Configure options: '--disable-option-checking' '--prefix=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test' '--disable-dependency-tracking' '--disable-libxml2' '--enable-cxx' '--enable-fortran' '--disable-wrapper-rpath' 'MPICHLIB_CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix' 'MPICHLIB_CPPFLAGS=-D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include' 'MPICHLIB_CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix' 'MPICHLIB_FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix' 'MPICHLIB_FCFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix' 'CC=x86_64-apple-darwin13.4.0-clang' 'CFLAGS=-I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix -O2' 'LDFLAGS=-L/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib -Wl,-rpath,/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib' 'CPPFLAGS=-I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -I/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work/src/mpl/include -I/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work/src/mpl/include -I/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work/src/openpa/src -I/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work/src/openpa/src -D_REENTRANT -I/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work/src/mpi/romio/include' 'CXX=x86_64-apple-darwin13.4.0-clang++' 'CXXFLAGS=-I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix -O2' 'FC=x86_64-apple-darwin13.4.0-gfortran' 'FCFLAGS=-I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix -O2' 'FFLAGS=-I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/avaj0001/anaconda3/envs/phase-marginalisation-test/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/17f675da-1dbb-4672-7083-7d3c605e99a8/volume/mpich-mpi_1575409317158/work=/usr/local/src/conda/mpich-3.3.2 -fdebug-prefix-map=/Users/avaj0001/anaconda3/envs/phase-marginalisation-test=/usr/local/src/conda-prefix -O2' '--cache-file=/dev/null' '--srcdir=.' 'LIBS=' 'MPLLIBNAME=mpl' Process Manager: pmi Launchers available: ssh rsh fork slurm ll lsf sge manual persist Topology libraries available: hwloc Resource management kernels available: user slurm ll lsf sge pbs cobalt Checkpointing libraries available: Demux engines available: poll select ```

Installation process

I had pip installed mpi4py and schwimmbad

Pip installs: ``` absl-py==0.12.0 -e git+git@github.com:avivajpeyi/agn_phenomenological_model.git@781798f5b35fc7f9df90a6152ced0f46d27fcb3c#egg=agn_utils alabaster==0.7.12 altair==4.1.0 anyio==3.0.1 apipkg==1.5 appdirs==1.4.3 appnope @ file:///opt/concourse/worker/volumes/live/4f734db2-9ca8-4d8b-5b29-6ca15b4b4772/volume/appnope_1606859466979/work argon2-cffi @ file:///opt/concourse/worker/volumes/live/4afd07c8-7fc3-4a09-6326-d8c70269eb33/volume/argon2-cffi_1613037490059/work arrow==1.0.3 -e git+https://github.com/arviz-devs/arviz@c9870c8962b6591a715436a078d6b2d917a73ee0#egg=arviz asciitree==0.3.3 astroML==0.4.1 astroplan==0.6 astropy==4.1rc2 astropy-healpix==0.5 astroquery==0.4.1 astunparse==1.6.3 async-generator==1.10 attrs @ file:///tmp/build/80754af9/attrs_1604765588209/work autodoc==0.5.0 autograd==1.3 autopep8==1.5.7 Babel==2.9.0 backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work backports.lzma==0.0.14 -e git+git@github.com:avivajpeyi/bbh_simulator.git@229c3c740e959be348eefe7f9b229d3e5fd63d33#egg=bbh_simulator -e git+git@git.ligo.org:avi.vajpeyi/bcr_pipeline.git@e1e8561b5387e1406c8eb42c9c6804760129e40c#egg=bcr_pipeline bcrypt==3.2.0 beautifulsoup4==4.9.1 bilby==1.0.4 # Editable install with no version control (bilby-pipe==1.0.2) -e /Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib/python3.7/site-packages -e git+git@git.ligo.org:avi.vajpeyi/bilby_report.git@cab2be9e10e6d324c9ecd9e3f06d0765703d90d2#egg=bilby_report binaryornot==0.4.4 black==20.8b1 bleach @ file:///tmp/build/80754af9/bleach_1612211392645/work bokeh==2.2.1 brotlipy==0.7.0 bs4==0.0.1 cached-property==1.5.2 cachetools==4.2.1 celerite2==0.0.2 celluloid==0.2.0 certifi==2020.12.5 cffi==1.14.0 cfgv==3.2.0 cftime==1.2.1 chardet @ file:///Users/runner/miniforge3/conda-bld/chardet_1602255311078/work click @ file:///home/linux1/recipes/ci/click_1610990599742/work click-plugins==1.1.1 cligj==0.7.1 colorama @ file:///tmp/build/80754af9/colorama_1607707115595/work colorit==0.1.0 commonmark==0.9.1 ConfigArgParse==1.4 configobj==5.0.6 configparser==4.0.2 cookiecutter==1.7.2 corner==2.1.0 coverage==5.0.3 coverage-badge==1.0.1 cryptography @ file:///opt/concourse/worker/volumes/live/cdf8ff17-b0bf-4081-524c-b5a0afe929ba/volume/cryptography_1616769280208/work cycler==0.10.0 Cython==0.29.21 data==0.4 decorator @ file:///tmp/build/80754af9/decorator_1617916966915/work deepdish==0.3.6 defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work dill==0.3.2 distlib==0.3.1 distro==1.5.0 docker==5.0.0 docker-compose==1.29.2 dockerpty==0.4.1 docopt==0.6.2 docutils==0.16 dqsegdb2==1.0.1 -e git+git@github.com:joshspeagle/dynesty.git@7a2630f5b797cb05ed827689c037009733612fef#egg=dynesty EasyProcess==0.2.10 emcee==2.2.1 entrypoint2==0.2 entrypoints==0.3 execnet==1.7.1 exoplanet==0.4.0 extension-helpers==0.1 fastprogress==1.0.0 fbpca==1.0 fgivenx==2.2.1 filelock==3.0.12 Fiona==1.8.19 flake8==3.8.3 flatbuffers==1.12 fpdf==1.7.2 funcsigs==1.0.2 future==0.18.2 gast==0.3.3 geopandas==0.9.0 gitdb==4.0.5 GitPython==3.1.9 google-auth==1.28.0 google-auth-oauthlib==0.4.4 google-pasta==0.2.0 graphviz==0.15 grpcio==1.32.0 gwdatafind==1.0.4 gwosc==0.5.3 # Editable install with no version control (gwpopulation==0.6.2) -e /Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib/python3.7/site-packages/gwpopulation-0.6.2-py3.7.egg -e git+git@git.ligo.org:avi.vajpeyi/gwpopulation_pipe.git@a0c53f81e60d7e8a6309a3f9e916dba3eaafcc62#egg=gwpopulation_pipe gwpy==2.0.2 gwsurrogate==1.0.1 gwtools==1.0.4 h5py==2.10.0 html5lib==1.0b8 hypothesis @ file:///tmp/build/80754af9/hypothesis_1593435550167/work identify==1.5.6 idna @ file:///tmp/build/80754af9/idna_1593446292537/work imageio==2.9.0 imagesize==1.2.0 importlib-metadata @ file:///opt/concourse/worker/volumes/live/4e25a0be-45cc-4b73-4314-4604f00e30a4/volume/importlib-metadata_1617877365451/work iniconfig @ file:///home/conda/feedstock_root/build_artifacts/iniconfig_1596221474428/work ipykernel @ file:///opt/concourse/worker/volumes/live/73e8766c-12c3-4f76-62a6-3dea9a7da5b7/volume/ipykernel_1596206701501/work/dist/ipykernel-5.3.4-py3-none-any.whl ipython @ file:///opt/concourse/worker/volumes/live/f33fa11b-d908-43e8-693a-f4b58d8c695c/volume/ipython_1617120878195/work ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work ipywidgets==7.5.1 isochrones==2.1 isort==5.6.4 jedi==0.17.0 Jinja2 @ file:///tmp/build/80754af9/jinja2_1612213139570/work jinja2-time==0.2.0 joblib @ file:///tmp/build/80754af9/joblib_1613502643832/work json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1600692310011/work jsonschema @ file:///tmp/build/80754af9/jsonschema_1602607155483/work jupyter==1.0.0 jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1598486169312/work jupyter-console==6.1.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 jupyter-core @ file:///opt/concourse/worker/volumes/live/a699b83f-e941-4170-5136-bf87e3f37756/volume/jupyter_core_1612213304212/work jupyter-highlight-selected-word==0.2.0 jupyter-latex-envs==1.4.6 jupyter-lsp==1.2.0 jupyter-nbextensions-configurator==0.4.1 jupyter-server==1.7.0 jupyterlab==3.0.15 jupyterlab-git==0.22.1 jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-server==2.5.1 jupyterthemes==0.20.0 jupytext==1.6.0 kaleido==0.0.3.post1 Keras-Preprocessing==1.1.2 keyring==21.4.0 kiwisolver @ file:///opt/concourse/worker/volumes/live/1e6d28e8-da14-4365-7344-567a05db7efc/volume/kiwisolver_1612282399491/work lalsuite==6.72 latex==0.7.0 latexcodec==2.0.1 lckr-jupyterlab-variableinspector==3.0.9 lesscpy==0.14.0 lightkurve==2.0b3 ligo-common==1.0.4 ligo-gracedb==2.6.1 ligo-segments==1.2.0 ligo.skymap==0.1.16 ligotimegps==2.0.1 llvmlite==0.34.0 lscsoft-glue==2.0.0 lxml==4.6.3 Mako==1.1.3 Markdown==3.3.4 markdown-it-py==0.5.5 MarkupSafe==1.1.1 matplotlib==3.4.0 mccabe==0.6.1 meshio==4.2.0 mistune==0.8.4 mkl-fft==1.3.0 mkl-random==1.1.1 mkl-service==2.3.0 mock==4.0.2 more-itertools==8.4.0 MouseInfo==0.1.3 mpi4py==3.0.3 mpld3==0.5.1 munch==2.5.0 mypy-extensions==0.4.3 nbclassic==0.2.8 nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1598558657104/work nbconvert @ file:///Users/runner/miniforge3/conda-bld/nbconvert_1601713123645/work nbdime==2.1.0 nbformat @ file:///tmp/build/80754af9/nbformat_1617383369282/work nbsphinx==0.8.0 nest-asyncio @ file:///tmp/build/80754af9/nest-asyncio_1613680548246/work nestcheck==0.2.1 netCDF4==1.5.4 networkx==2.4 nodeenv==1.5.0 notebook @ file:///Users/runner/miniforge3/conda-bld/notebook_1599742257178/work numba==0.51.2 numexpr==2.7.1 numpy==1.19.5 numpydoc==1.1.0 oauthlib==3.1.0 oktopus==0.1.2 opt-einsum==3.3.0 packaging @ file:///tmp/build/80754af9/packaging_1611952188834/work pandas==1.1.1 pandocfilters @ file:///opt/concourse/worker/volumes/live/315ac9bb-93fd-4adc-6795-345692fcfaed/volume/pandocfilters_1605120446899/work -e git+git@git.ligo.org:lscsoft/parallel_bilby.git@26bcb9163a57c1b92599cc5435d7ae08561a0291#egg=parallel_bilby paramiko==2.7.2 parmap==1.5.2 parso @ file:///tmp/build/80754af9/parso_1617223946239/work pathspec==0.7.0 patsy==0.5.1 -e git+git@git.ligo.org:avi.vajpeyi/parallel_bilby_bns_injections.git@e477d01973e7e31ffc11b6a5d0944ad0a97abe7b#egg=pbilby_injection_setup pesummary==0.11.0 pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work Pillow==7.2.0 plotly==4.11.0 pluggy==0.13.1 ply==3.11 poyo==0.5.0 pre-commit==2.12.1 precession==1.0.3 pretty-html-table==0.9.dev0 prometheus-client @ file:///tmp/build/80754af9/prometheus_client_1618088486455/work prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1616415428029/work protobuf==3.15.6 psutil==5.7.0 ptemcee==1.0.0 ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl py @ file:///tmp/build/80754af9/py_1593446248552/work pyasn1==0.4.8 pyasn1-modules==0.2.8 PyAutoGUI==0.9.50 pybind11==2.5.0 pybtex==0.24.0 PyCBC==1.16.12 -e git+git@git.ligo.org:avi.vajpeyi/pycbc_trigger_parser.git@e1b6c96dd1a5af052dd5d52e7073640531591f35#egg=pycbc_trigger_parser pycodestyle==2.7.0 PyCondor==0.5.0 pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work pydmove==1.1 pyflakes==2.2.0 PyGeodesy==20.9.5 PyGetWindow==0.0.8 pygit2==1.4.0 Pygments @ file:///tmp/build/80754af9/pygments_1615143339740/work pymc3==3.9.3 pymc3-ext==0.0.2 PyMsgBox==1.0.7 PyNaCl==1.4.0 pyobjc==6.2 pyobjc-core==6.2 pyobjc-framework-Accounts==6.2 pyobjc-framework-AddressBook==6.2 pyobjc-framework-AdSupport==6.2 pyobjc-framework-AppleScriptKit==6.2 pyobjc-framework-AppleScriptObjC==6.2 pyobjc-framework-ApplicationServices==6.2 pyobjc-framework-Automator==6.2 pyobjc-framework-AVFoundation==6.2 pyobjc-framework-AVKit==6.2 pyobjc-framework-BusinessChat==6.2 pyobjc-framework-CalendarStore==6.2 pyobjc-framework-CFNetwork==6.2 pyobjc-framework-CloudKit==6.2 pyobjc-framework-Cocoa==6.2 pyobjc-framework-Collaboration==6.2 pyobjc-framework-ColorSync==6.2 pyobjc-framework-Contacts==6.2 pyobjc-framework-ContactsUI==6.2 pyobjc-framework-CoreAudio==6.2 pyobjc-framework-CoreAudioKit==6.2 pyobjc-framework-CoreBluetooth==6.2 pyobjc-framework-CoreData==6.2 pyobjc-framework-CoreLocation==6.2 pyobjc-framework-CoreMedia==6.2 pyobjc-framework-CoreMediaIO==6.2 pyobjc-framework-CoreML==6.2 pyobjc-framework-CoreServices==6.2 pyobjc-framework-CoreSpotlight==6.2 pyobjc-framework-CoreText==6.2 pyobjc-framework-CoreWLAN==6.2 pyobjc-framework-CryptoTokenKit==6.2 pyobjc-framework-DictionaryServices==6.2 pyobjc-framework-DiscRecording==6.2 pyobjc-framework-DiscRecordingUI==6.2 pyobjc-framework-DiskArbitration==6.2 pyobjc-framework-DVDPlayback==6.2 pyobjc-framework-EventKit==6.2 pyobjc-framework-ExceptionHandling==6.2 pyobjc-framework-ExternalAccessory==6.2 pyobjc-framework-FinderSync==6.2 pyobjc-framework-FSEvents==6.2 pyobjc-framework-GameCenter==6.2 pyobjc-framework-GameController==6.2 pyobjc-framework-GameKit==6.2 pyobjc-framework-GameplayKit==6.2 pyobjc-framework-ImageCaptureCore==6.2 pyobjc-framework-IMServicePlugIn==6.2 pyobjc-framework-InputMethodKit==6.2 pyobjc-framework-InstallerPlugins==6.2 pyobjc-framework-InstantMessage==6.2 pyobjc-framework-Intents==6.2 pyobjc-framework-IOSurface==6.2 pyobjc-framework-iTunesLibrary==6.2 pyobjc-framework-LatentSemanticMapping==6.2 pyobjc-framework-LaunchServices==6.2 pyobjc-framework-libdispatch==6.2 pyobjc-framework-LocalAuthentication==6.2 pyobjc-framework-MapKit==6.2 pyobjc-framework-MediaAccessibility==6.2 pyobjc-framework-MediaLibrary==6.2 pyobjc-framework-MediaPlayer==6.2 pyobjc-framework-MediaToolbox==6.2 pyobjc-framework-Metal==6.2 pyobjc-framework-MetalKit==6.2 pyobjc-framework-ModelIO==6.2 pyobjc-framework-MultipeerConnectivity==6.2 pyobjc-framework-NaturalLanguage==6.2 pyobjc-framework-NetFS==6.2 pyobjc-framework-Network==6.2 pyobjc-framework-NetworkExtension==6.2 pyobjc-framework-NotificationCenter==6.2 pyobjc-framework-OpenDirectory==6.2 pyobjc-framework-OSAKit==6.2 pyobjc-framework-Photos==6.2 pyobjc-framework-PhotosUI==6.2 pyobjc-framework-PreferencePanes==6.2 pyobjc-framework-PubSub==6.2 pyobjc-framework-QTKit==6.2 pyobjc-framework-Quartz==6.2 pyobjc-framework-SafariServices==6.2 pyobjc-framework-SceneKit==6.2 pyobjc-framework-ScreenSaver==6.2 pyobjc-framework-ScriptingBridge==6.2 pyobjc-framework-SearchKit==6.2 pyobjc-framework-Security==6.2 pyobjc-framework-SecurityFoundation==6.2 pyobjc-framework-SecurityInterface==6.2 pyobjc-framework-ServiceManagement==6.2 pyobjc-framework-Social==6.2 pyobjc-framework-SpriteKit==6.2 pyobjc-framework-StoreKit==6.2 pyobjc-framework-SyncServices==6.2 pyobjc-framework-SystemConfiguration==6.2 pyobjc-framework-UserNotifications==6.2 pyobjc-framework-VideoSubscriberAccount==6.2 pyobjc-framework-VideoToolbox==6.2 pyobjc-framework-Vision==6.2 pyobjc-framework-WebKit==6.2 pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1608057966937/work pyparsing @ file:///home/linux1/recipes/ci/pyparsing_1610983426697/work pyperclip==1.8.0 pyproj==3.0.1 PyRect==0.1.4 pyrsistent @ file:///opt/concourse/worker/volumes/live/656e0c1b-ef87-4251-4a51-1290b2351993/volume/pyrsistent_1600141745371/work pyscreenshot==1.0 PyScreeze==0.1.26 PySocks @ file:///Users/runner/miniforge3/conda-bld/pysocks_1602326930468/work pytest==6.1.1 pytest-arraydiff==0.3 pytest-astropy==0.8.0 pytest-astropy-header==0.1.2 pytest-cov==2.8.1 pytest-doctestplus==0.7.0 pytest-forked==1.3.0 pytest-mpi==0.4 pytest-openfiles==0.5.0 pytest-remotedata==0.3.2 pytest-xdist==2.1.0 python-dateutil @ file:///home/ktietz/src/ci/python-dateutil_1611928101742/work python-dotenv==0.17.1 python-ligo-lw==1.6.0 python-slugify==4.0.1 PyTweening==1.0.3 pytz==2020.1 pyvista==0.26.0 PyYAML==5.3 pyzmq==20.0.0 qgrid==1.3.1 qtconsole==4.7.1 QtPy==1.9.0 random-geometry-points==1.1.2 rebound==3.12.3 regex==2020.2.20 reproject==0.6 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1592425495151/work requests-oauthlib==1.3.0 retrying==1.3.3 rich==10.1.0 rsa==4.7.2 rubicon-objc==0.3.1 schwimmbad==0.3.2 SciencePlots==1.0.7 scikit-learn @ file:///opt/concourse/worker/volumes/live/4b416fcf-2a1b-4a30-781a-c588a35f6ca3/volume/scikit-learn_1614446663856/work scipy @ file:///opt/concourse/worker/volumes/live/cd12a34b-67bb-4e81-5e11-d0d209d4b37d/volume/scipy_1616703203371/work scooby==0.5.6 seaborn==0.11.1 Send2Trash @ file:///tmp/build/80754af9/send2trash_1607525499227/work setuptools-scm==4.1.2 Shapely==1.7.1 shellingham==1.3.1 shutilwhich==1.1.0 six @ file:///opt/concourse/worker/volumes/live/f983ba11-c9fe-4dff-7ce7-d89b95b09771/volume/six_1605205318156/work sklearn==0.0 smmap==3.0.4 sniffio==1.2.0 snowballstemmer==2.0.0 sortedcontainers==2.2.2 soupsieve==2.0.1 Sphinx==3.3.1 sphinx-argparse==0.2.5 sphinx-rtd-theme==0.5.0 sphinx-tabs==1.3.0 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==1.0.3 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 statsmodels==0.11.1 surfinBH==1.1.5 tables==3.6.1 # Editable install with no version control (tbs==0.2.0) -e /Users/avaj0001/anaconda3/envs/phase-marginalisation-test/lib/python3.7/site-packages/tbs-0.2.0-py3.7.egg tempdir==0.7.1 tensorboard==2.4.1 tensorboard-plugin-wit==1.8.0 tensorflow==2.4.1 tensorflow-estimator==2.4.0 termcolor==1.1.0 terminado @ file:///Users/runner/miniforge3/conda-bld/terminado_1600709820535/work -e git+git@github.com:dfm/tess-atlas.git@5863576907dee3d95b05968dac11724e2cf88aba#egg=tess_atlas testbook==0.2.3 testpath @ file:///home/ktietz/src/ci/testpath_1611930608132/work text-unidecode==1.3 texttable==1.6.3 Theano==1.0.5 threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl toml @ file:///home/conda/feedstock_root/build_artifacts/toml_1589469402899/work toolz==0.10.0 tornado @ file:///opt/concourse/worker/volumes/live/d531d395-893c-4ca1-6a5f-717b318eb08c/volume/tornado_1606942307627/work tqdm==4.47.0 traitlets @ file:///home/ktietz/src/ci/traitlets_1611929699868/work typed-ast==1.4.1 typer @ file:///tmp/build/80754af9/typer_1619429661347/work typing-extensions @ file:///home/ktietz/src/ci_mi/typing_extensions_1612808209620/work uncertainties==3.1.4 urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1595434816409/work virtualenv==20.0.34 vtk==9.0.1 waitress==1.4.4 wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work webencodings==0.5.1 WebOb==1.8.6 websocket-client==0.59.0 WebTest==2.0.35 Werkzeug==1.0.1 widgetsnbextension==3.5.1 wrapt==1.12.1 wxPython==4.0.7.post2 xarray==0.16.1 zipp @ file:///tmp/build/80754af9/zipp_1615904174917/work ```

Example where I can run an mpi command:

Although I get an error when I run your demo, I seem to be able to run a simple command without issues:

$ mpiexec -n 2 echo "hi"
hi
hi
adrn commented 3 years ago

OK a few more tests.

First off, let's see which version of MPI your shell finds first:

$ which -a mpiexec

Just because mpiexec is running with a bash command doesn't mean mpi4py is configured properly. Can you try:

$ mpiexec -n 4 python -c "from mpi4py import MPI; print(MPI.COMM_WORLD.Get_size(), MPI.COMM_WORLD.Get_rank());"