Importing the C API fails on Windows

Issue #177 resolved
Roberto Di Remigio created an issue

I am trying to build a C++ Python extension (with pybind11) that uses MPI and mpi4py on Windows. I am working in a conda environment and I installed mpi4py as follows:

conda install mpi4py -c conda-forge --yes

The following:

// import the mpi4py API
if (import_mpi4py() < 0) {
  throw std::runtime_error("Could not load mpi4py API.");
}

throws the exception. Running mpiexec -n 4 python -c “from mpi4py import MPI; comm = MPI.COMM_WORLD; print(comm.Get_rank())” works as expected. I am not sure whether this is a bug or some silly mistake I am making.

Comments (5)

  1. Lisandro Dalcin

    BTW, Just FYI, I’m slowly moving development to GitHub, but this has not be properly advertised yet. Next time please consider submitting your issues there.

  2. Log in to comment