Skip to content

Commit

Permalink
Merge pull request #1156 from francesco-ballarin/mpicompat
Browse files Browse the repository at this point in the history
Define MPI_Session for compatibility with current mpi4py main branch
  • Loading branch information
jswhit committed Mar 7, 2022
2 parents c1e86ce + 7b0b0ec commit 7868ce2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/miniconda.yml
Expand Up @@ -78,7 +78,7 @@ jobs:
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH"
which mpirun
mpirun --version
mpirun -np 4 python mpi_example.py
mpirun -np 4 --oversubscribe python mpi_example.py
if [ $? -ne 0 ] ; then
echo "hdf5 mpi test failed!"
exit 1
Expand Down
5 changes: 5 additions & 0 deletions include/mpi-compat.h
Expand Up @@ -11,4 +11,9 @@ typedef void *PyMPI_MPI_Message;
#define MPI_Message PyMPI_MPI_Message
#endif

#if (MPI_VERSION < 4) && !defined(PyMPI_HAVE_MPI_Session)
typedef void *PyMPI_MPI_Session;
#define MPI_Session PyMPI_MPI_Session
#endif

#endif/*MPI_COMPAT_H*/

0 comments on commit 7868ce2

Please sign in to comment.