Importing the C API fails on Windows
Issue #177
resolved
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)
-
-
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.
-
reporter OK! I will move the issue to GitHub and add the traceback.
-
reporter - changed status to resolved
Moving the issue to GitHub
-
reporter - Log in to comment
Can you show me the exception and full traceback? I never tested the C API on Windows.