Skip to content

Commit 8031635

Browse files
committed
romio321: invoke PMPI_Allreduce() without holding the global lock
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 176b3ff commit 8031635

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

ompi/mca/io/romio321/romio/adio/include/mpipr.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010

1111
#ifndef USE_MPI_VERSIONS
1212

13+
#include "mpi-io/glue/openmpi/mpio_wrappers.h"
14+
1315
#undef MPI_Abort
1416
#define MPI_Abort PMPI_Abort
1517
#undef MPI_Allgather
1618
#define MPI_Allgather PMPI_Allgather
1719
#undef MPI_Allgatherv
1820
#define MPI_Allgatherv PMPI_Allgatherv
1921
#undef MPI_Allreduce
20-
#define MPI_Allreduce PMPI_Allreduce
22+
#define MPI_Allreduce MPIO_Allreduce
2123
#undef MPI_Alltoall
2224
#define MPI_Alltoall PMPI_Alltoall
2325
#undef MPI_Alltoallv

ompi/mca/io/romio321/romio/mpi-io/glue/openmpi/Makefile.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
if MPIO_GLUE_OPENMPI
99
romio_other_sources += \
1010
mpi-io/glue/openmpi/mpio_file.c \
11-
mpi-io/glue/openmpi/mpio_err.c
11+
mpi-io/glue/openmpi/mpio_err.c \
12+
mpi-io/glue/openmpi/mpio_wrappers.c
13+
14+
noinst_HEADERS += mpi-io/glue/openmpi/mpio_wrappers.h
15+
1216
endif MPIO_GLUE_OPENMPI
1317

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include "mpi-io/mpioimpl.h"
2+
3+
#include "mpi-io/glue/openmpi/mpio_wrappers.h"
4+
5+
int MPIO_Allreduce(const void *sendbuf, void *recvbuf, int count,
6+
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
7+
{
8+
int res;
9+
ROMIO_THREAD_CS_EXIT();
10+
res = PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
11+
ROMIO_THREAD_CS_ENTER();
12+
return res;
13+
}
14+
/*
15+
U PMPI_Allgather
16+
U PMPI_Allreduce
17+
U PMPI_Alltoall
18+
U PMPI_Alltoallw
19+
U PMPI_Barrier
20+
U PMPI_Bcast
21+
U PMPI_Gather
22+
U PMPI_Gatherv
23+
U PMPI_Recv
24+
U PMPI_Send
25+
U PMPI_Wait
26+
U PMPI_Waitall
27+
U PMPI_Waitany
28+
*/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#include <mpi.h>
2+
3+
int MPIO_Allreduce(const void *sendbuf, void *recvbuf, int count,
4+
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);

0 commit comments

Comments
 (0)