Skip to content

Commit d8cc18e

Browse files
committed
Merge pull request #91 from stevengj/comm2c-fix
fix conflict between #89 and #90
2 parents 7f7b44c + 4086ab0 commit d8cc18e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/mpi-base.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,8 @@ end
541541

542542
if HAVE_MPI_COMM_C2F
543543
# use MPI_Comm_f2c and MPI_Comm_c2f
544-
const MPI_COMM_F2C = Libdl.dlsym(libmpi, "MPI_Comm_f2c")
545-
const MPI_COMM_C2F = Libdl.dlsym(libmpi, "MPI_Comm_c2f")
546-
Base.convert(::Type{CComm}, comm::Comm) = ccall(MPI_COMM_F2C, CComm, (Cint,), comm.val)
547-
Base.convert(::Type{Comm}, ccomm::CComm) = Comm(ccall(MPI_COMM_C2F, Cint, (CComm,), ccomm))
544+
Base.convert(::Type{CComm}, comm::Comm) = ccall((:MPI_Comm_f2c,libmpi), CComm, (Cint,), comm.val)
545+
Base.convert(::Type{Comm}, ccomm::CComm) = Comm(ccall((:MPI_Comm_c2f,libmpi), Cint, (CComm,), ccomm))
548546
elseif sizeof(CComm) == sizeof(Cint)
549547
# in MPICH, both C and Fortran use identical Cint comm handles
550548
# and MPI_Comm_c2f is not provided.

0 commit comments

Comments
 (0)