Skip to content

Commit 75fee7d

Browse files
committed
Wrapped Ibarrier
1 parent 5d24cc9 commit 75fee7d

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

deps/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ FortranCInterface_HEADER(jlmpi_f2c.h MACRO_NAMESPACE "JLMPI_" SYMBOLS
4949
MPI_GATHERV
5050
MPI_GET_COUNT
5151
MPI_GET_PROCESSOR_NAME
52+
MPI_IBARRIER
5253
MPI_INIT
5354
MPI_INITIALIZED
5455
MPI_IPROBE

deps/gen_functions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ int main(int argc, char *argv[]) {
3737
printf(" :MPI_GET_COUNT => \"%s\",\n", STRING(MPI_GET_COUNT));
3838
printf(" :MPI_GET_PROCESSOR_NAME => \"%s\",\n",
3939
STRING(MPI_GET_PROCESSOR_NAME));
40+
printf(" :MPI_IBARRIER => \"%s\",\n", STRING(MPI_IBARRIER));
4041
printf(" :MPI_INIT => \"%s\",\n", STRING(MPI_INIT));
4142
printf(" :MPI_INITIALIZED => \"%s\",\n", STRING(MPI_INITIALIZED));
4243
printf(" :MPI_IPROBE => \"%s\",\n", STRING(MPI_IPROBE));

src/mpi-base.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ function Cancel!(res::Request)
463463
end
464464

465465
# Collective communication
466+
function Ibarrier(comm::Comm)
467+
rval = Ref{Cint}()
468+
ccall(MPI_IBARRIER, Void, (Ptr{Cint},Ptr{Cint},Ptr{Cint}), &comm.val, rval, &0)
469+
Request(rval[], nothing)
470+
end
466471

467472
function Barrier(comm::Comm)
468473
ccall(MPI_BARRIER, Void, (Ptr{Cint},Ptr{Cint}), &comm.val, &0)

src/win_mpiconstants.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const MPI_INIT = (:MPI_INIT, "msmpi.dll")
5151
const MPI_COMM_RANK = (:MPI_COMM_RANK, "msmpi.dll")
5252
const MPI_COMM_SIZE = (:MPI_COMM_SIZE, "msmpi.dll")
5353
const MPI_BARRIER = (:MPI_BARRIER, "msmpi.dll")
54+
const MPI_IBARRIER = (:MPI_IBARRIER, "msmpi.dll")
5455
const MPI_FINALIZE = (:MPI_FINALIZE, "msmpi.dll")
5556
const MPI_BCAST = (:MPI_BCAST, "msmpi.dll")
5657
const MPI_REDUCE = (:MPI_REDUCE, "msmpi.dll")

test/test_comm.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ comm2 = MPI.Comm_dup(comm)
99
MPI.Barrier(comm2)
1010
comm3 = MPI.Comm_dup(comm2)
1111
MPI.Barrier(comm3)
12+
comm4 = MPI.Comm_dup(comm3)
13+
barreq = MPI.Ibarrier(comm4)
1214
MPI.Comm_free(comm2)
1315
MPI.Barrier(comm3)
1416
# Don't free comm2

0 commit comments

Comments
 (0)