Skip to content

Commit fe878d0

Browse files
committed
Further Windows CI updates
1 parent e272092 commit fe878d0

File tree

5 files changed

+88
-75
lines changed

5 files changed

+88
-75
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ install:
2323
$env:JULIA_URL,
2424
"C:\projects\julia-binary.exe")
2525
- ps: (new-object net.webclient).DownloadFile(
26-
"https://download.microsoft.com/download/D/7/B/D7BBA00F-71B7-436B-80BC-4D22F2EE9862/MSMpiSetup.exe",
26+
"https://download.microsoft.com/download/2/E/C/2EC96D7F-687B-4613-80F6-E10F670A2D97/msmpisetup.exe",
2727
"C:\projects\MSMpiSetup.exe")
2828
# Run installer silently, output to C:\projects\julia
2929
- C:\projects\julia-binary.exe /S /D=C:\projects\julia

src/mpi-base.jl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ function Win_sync(win::Win)
878878
end
879879

880880
function Win_sync(win::CWin)
881-
ccall(:MPI_Win_sync, Void, (CWin,), win)
881+
ccall((:MPI_Win_sync, libmpi), Void, (CWin,), win)
882882
end
883883

884884
function Win_lock(lock_type::LockType, rank::Integer, assert::Integer, win::Win)
@@ -924,15 +924,14 @@ function Fetch_and_op(sourceval::MPIBuffertype{T}, returnval::MPIBuffertype{T},
924924
end
925925

926926
function Fetch_and_op(sourceval::MPIBuffertype{T}, returnval::MPIBuffertype{T}, target_rank::Integer, target_disp::Integer, op::Op, win::CWin) where T
927-
ccall(:MPI_Fetch_and_op, Void,
927+
ccall((:MPI_Fetch_and_op, libmpi), Void,
928928
(Ptr{T}, Ptr{T}, Cint, Cint, Cptrdiff_t, Cint, CWin),
929929
sourceval, returnval, mpitype(T), target_rank, target_disp, op.val, win)
930930
end
931931

932932
function Get_address(location::MPIBuffertype{T}) where T
933933
addr = Ref{Cptrdiff_t}(0)
934934
ccall(MPI_GET_ADDRESS, Void, (Ptr{T}, Ref{Cptrdiff_t}, Ref{Cint}), location, addr, 0)
935-
#ccall(:MPI_Get_address, Int, (Ptr{Void}, Ref{Cptrdiff_t}), location, addr)
936935
return addr[]
937936
end
938937

@@ -944,7 +943,7 @@ end
944943

945944
function Comm_spawn(command::String, argv::Vector{String}, nprocs::Integer, comm::Comm, errors = Vector{Cint}(nprocs))
946945
c_intercomm = Ref{CComm}()
947-
ccall(:MPI_Comm_spawn, Void,
946+
ccall((:MPI_Comm_spawn, libmpi), Void,
948947
(Cstring, Ptr{Ptr{Cchar}}, Cint, CInfo, Cint, CComm, Ref{CComm}, Ptr{Cint}),
949948
command, argv, nprocs, CInfo(INFO_NULL), 0, CComm(comm), c_intercomm, errors)
950949
return Comm(c_intercomm[])
@@ -960,18 +959,18 @@ end
960959
if HAVE_MPI_COMM_C2F
961960
# use MPI_Comm_f2c and MPI_Comm_c2f
962961
Base.convert(::Type{CComm}, comm::Comm) =
963-
ccall(:MPI_Comm_f2c, CComm, (Cint,), comm.val)
962+
ccall((:MPI_Comm_f2c, libmpi), CComm, (Cint,), comm.val)
964963
Base.convert(::Type{Comm}, ccomm::CComm) =
965-
Comm(ccall(:MPI_Comm_c2f, Cint, (CComm,), ccomm))
964+
Comm(ccall((:MPI_Comm_c2f, libmpi), Cint, (CComm,), ccomm))
966965
# Assume info is treated the same way
967966
Base.convert(::Type{CInfo}, info::Info) =
968-
ccall(:MPI_Info_f2c, CInfo, (Cint,), info.val)
967+
ccall((:MPI_Info_f2c, libmpi), CInfo, (Cint,), info.val)
969968
Base.convert(::Type{Info}, cinfo::CInfo) =
970-
Info(ccall(:MPI_Info_c2f, Cint, (CInfo,), cinfo))
969+
Info(ccall((:MPI_Info_c2f, libmpi), Cint, (CInfo,), cinfo))
971970
Base.convert(::Type{CWin}, win::Win) =
972-
ccall(:MPI_Win_f2c, CWin, (Cint,), win.val)
971+
ccall((:MPI_Win_f2c, libmpi), CWin, (Cint,), win.val)
973972
Base.convert(::Type{Win}, cwin::CWin) =
974-
Win(ccall(:MPI_Win_c2f, Cint, (CWin,), cwin))
973+
Win(ccall((:MPI_Win_c2f, libmpi), Cint, (CWin,), cwin))
975974
elseif sizeof(CComm) == sizeof(Cint)
976975
# in MPICH, both C and Fortran use identical Cint comm handles
977976
# and MPI_Comm_c2f is not provided.

src/win_mpiconstants.jl

Lines changed: 73 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -52,66 +52,78 @@ const MPI_TAG_UB = Int32(1681915906)
5252
const MPI_UNDEFINED = Int32(-32766)
5353
const HAVE_MPI_COMM_C2F = false
5454

55-
const MPI_ABORT = (:MPI_ABORT, "msmpi.dll")
56-
const MPI_INIT = (:MPI_INIT, "msmpi.dll")
57-
const MPI_COMM_FREE = (:MPI_COMM_FREE, "msmpi.dll")
58-
const MPI_COMM_GET_PARENT = (:MPI_COMM_GET_PARENT, "msmpi.dll")
59-
const MPI_COMM_RANK = (:MPI_COMM_RANK, "msmpi.dll")
60-
const MPI_COMM_SIZE = (:MPI_COMM_SIZE, "msmpi.dll")
61-
const MPI_COMM_SPLIT = (:MPI_COMM_SPLIT, "msmpi.dll")
62-
const MPI_COMM_SPLIT_TYPE = (:MPI_COMM_SPLIT_TYPE, "msmpi.dll")
63-
const MPI_BARRIER = (:MPI_BARRIER, "msmpi.dll")
64-
const MPI_FINALIZE = (:MPI_FINALIZE, "msmpi.dll")
65-
const MPI_BCAST = (:MPI_BCAST, "msmpi.dll")
66-
const MPI_REDUCE = (:MPI_REDUCE, "msmpi.dll")
67-
const MPI_IRECV = (:MPI_IRECV, "msmpi.dll")
68-
const MPI_RECV = (:MPI_RECV, "msmpi.dll")
69-
const MPI_ISEND = (:MPI_ISEND, "msmpi.dll")
70-
const MPI_WAITALL = (:MPI_WAITALL, "msmpi.dll")
71-
const MPI_ALLGATHER = (:MPI_ALLGATHER, "msmpi.dll")
72-
const MPI_ALLGATHERV = (:MPI_ALLGATHERV, "msmpi.dll")
73-
const MPI_ALLTOALL = (:MPI_ALLTOALL, "msmpi.dll")
74-
const MPI_ALLTOALLV = (:MPI_ALLTOALLV, "msmpi.dll")
75-
const MPI_INITIALIZED = (:MPI_INITIALIZED, "msmpi.dll")
76-
const MPI_FINALIZED = (:MPI_FINALIZED, "msmpi.dll")
77-
const MPI_FETCH_AND_OP = (:MPI_FETCH_AND_OP, "msmpi.dll")
78-
const MPI_OP_CREATE = (:MPI_OP_CREATE, "msmpi.dll")
79-
const MPI_OP_FREE = (:MPI_OP_FREE, "msmpi.dll")
80-
const MPI_SCATTER = (:MPI_SCATTER, "msmpi.dll")
81-
const MPI_SCATTERV = (:MPI_SCATTERV, "msmpi.dll")
82-
const MPI_SEND = (:MPI_SEND, "msmpi.dll")
83-
const MPI_SCAN = (:MPI_SCAN, "msmpi.dll")
84-
const MPI_EXSCAN = (:MPI_EXSCAN, "msmpi.dll")
85-
const MPI_GET = (:MPI_GET, "msmpi.dll")
86-
const MPI_GET_ADDRESS = (:MPI_GET_ADDRESS, "msmpi.dll")
87-
const MPI_GET_COUNT = (:MPI_GET_COUNT, "msmpi.dll")
88-
const MPI_GATHER = (:MPI_GATHER, "msmpi.dll")
89-
const MPI_GATHERV = (:MPI_GATHERV, "msmpi.dll")
90-
const MPI_COMM_DUP = (:MPI_COMM_DUP, "msmpi.dll")
91-
const MPI_INTERCOMM_MERGE = (:MPI_INTERCOMM_MERGE, "msmpi.dll")
92-
const MPI_IPROBE = (:MPI_IPROBE, "msmpi.dll")
93-
const MPI_PROBE = (:MPI_PROBE, "msmpi.dll")
94-
const MPI_PUT = (:MPI_PUT, "msmpi.dll")
95-
const MPI_TEST = (:MPI_TEST, "msmpi.dll")
96-
const MPI_TESTSOME = (:MPI_TESTSOME, "msmpi.dll")
97-
const MPI_TESTANY = (:MPI_TESTANY, "msmpi.dll")
98-
const MPI_TESTALL = (:MPI_TESTALL, "msmpi.dll")
99-
const MPI_TYPE_CREATE_STRUCT = (:MPI_TYPE_CREATE_STRUCT, "msmpi.dll")
100-
const MPI_TYPE_COMMIT = (:MPI_TYPE_COMMIT, "msmpi.dll")
101-
const MPI_WAIT = (:MPI_WAIT, "msmpi.dll")
102-
const MPI_WAITANY = (:MPI_WAITANY, "msmpi.dll")
103-
const MPI_WAITSOME = (:MPI_WAITSOME, "msmpi.dll")
104-
const MPI_WIN_ATTACH = (:MPI_WIN_ATTACH, "msmpi.dll")
105-
const MPI_WIN_CREATE = (:MPI_WIN_CREATE, "msmpi.dll")
106-
const MPI_WIN_CREATE_DYNAMIC = (:MPI_WIN_CREATE, "msmpi.dll")
107-
const MPI_WIN_DETACH = (:MPI_WIN_DETACH, "msmpi.dll")
108-
const MPI_WIN_FENCE = (:MPI_WIN_FENCE, "msmpi.dll")
109-
const MPI_WIN_FLUSH = (:MPI_WIN_FLUSH, "msmpi.dll")
110-
const MPI_WIN_FREE = (:MPI_WIN_FREE, "msmpi.dll")
111-
const MPI_WIN_LOCK = (:MPI_WIN_LOCK, "msmpi.dll")
112-
const MPI_WIN_SYNC = (:MPI_WIN_SYNC, "msmpi.dll")
113-
const MPI_WIN_UNLOCK = (:MPI_WIN_UNLOCK, "msmpi.dll")
114-
const MPI_CANCEL = (:MPI_CANCEL, "msmpi.dll")
115-
const MPI_ALLREDUCE = (:MPI_ALLREDUCE, "msmpi.dll")
55+
const libmpi = "msmpi.dll"
56+
57+
const MPI_ABORT = (:MPI_ABORT, libmpi)
58+
const MPI_ALLREDUCE = (:MPI_ALLREDUCE, libmpi)
59+
const MPI_INIT = (:MPI_INIT, libmpi)
60+
const MPI_CANCEL = (:MPI_CANCEL, libmpi)
61+
const MPI_COMM_FREE = (:MPI_COMM_FREE, libmpi)
62+
const MPI_COMM_GET_PARENT = (:MPI_COMM_GET_PARENT, libmpi)
63+
const MPI_COMM_RANK = (:MPI_COMM_RANK, libmpi)
64+
const MPI_COMM_SIZE = (:MPI_COMM_SIZE, libmpi)
65+
const MPI_COMM_SPLIT = (:MPI_COMM_SPLIT, libmpi)
66+
const MPI_COMM_SPLIT_TYPE = (:MPI_COMM_SPLIT_TYPE, libmpi)
67+
const MPI_BARRIER = (:MPI_BARRIER, libmpi)
68+
const MPI_FINALIZE = (:MPI_FINALIZE, libmpi)
69+
const MPI_BCAST = (:MPI_BCAST, libmpi)
70+
const MPI_REDUCE = (:MPI_REDUCE, libmpi)
71+
const MPI_IRECV = (:MPI_IRECV, libmpi)
72+
const MPI_RECV = (:MPI_RECV, libmpi)
73+
const MPI_ISEND = (:MPI_ISEND, libmpi)
74+
const MPI_WAITALL = (:MPI_WAITALL, libmpi)
75+
const MPI_ALLGATHER = (:MPI_ALLGATHER, libmpi)
76+
const MPI_ALLGATHERV = (:MPI_ALLGATHERV, libmpi)
77+
const MPI_ALLTOALL = (:MPI_ALLTOALL, libmpi)
78+
const MPI_ALLTOALLV = (:MPI_ALLTOALLV, libmpi)
79+
const MPI_INFO_CREATE = (:MPI_INFO_CREATE, libmpi)
80+
const MPI_INFO_DELETE = (:MPI_INFO_DELETE, libmpi)
81+
const MPI_INFO_FREE = (:MPI_INFO_FREE, libmpi)
82+
const MPI_INFO_GET = (:MPI_INFO_GET, libmpi)
83+
const MPI_INFO_GET_VALUELEN = (:MPI_INFO_GET_VALUELEN, libmpi)
84+
const MPI_INFO_SET = (:MPI_INFO_SET, libmpi)
85+
const MPI_INITIALIZED = (:MPI_INITIALIZED, libmpi)
86+
const MPI_FINALIZED = (:MPI_FINALIZED, libmpi)
87+
const MPI_FETCH_AND_OP = (:MPI_FETCH_AND_OP, libmpi)
88+
const MPI_OP_CREATE = (:MPI_OP_CREATE, libmpi)
89+
const MPI_OP_FREE = (:MPI_OP_FREE, libmpi)
90+
const MPI_SCATTER = (:MPI_SCATTER, libmpi)
91+
const MPI_SCATTERV = (:MPI_SCATTERV, libmpi)
92+
const MPI_SEND = (:MPI_SEND, libmpi)
93+
const MPI_SCAN = (:MPI_SCAN, libmpi)
94+
const MPI_EXSCAN = (:MPI_EXSCAN, libmpi)
95+
const MPI_GET = (:MPI_GET, libmpi)
96+
const MPI_GET_ADDRESS = (:MPI_GET_ADDRESS, libmpi)
97+
const MPI_GET_COUNT = (:MPI_GET_COUNT, libmpi)
98+
const MPI_GATHER = (:MPI_GATHER, libmpi)
99+
const MPI_GATHERV = (:MPI_GATHERV, libmpi)
100+
const MPI_COMM_DUP = (:MPI_COMM_DUP, libmpi)
101+
const MPI_INTERCOMM_MERGE = (:MPI_INTERCOMM_MERGE, libmpi)
102+
const MPI_IPROBE = (:MPI_IPROBE, libmpi)
103+
const MPI_PROBE = (:MPI_PROBE, libmpi)
104+
const MPI_PUT = (:MPI_PUT, libmpi)
105+
const MPI_TEST = (:MPI_TEST, libmpi)
106+
const MPI_TESTSOME = (:MPI_TESTSOME, libmpi)
107+
const MPI_TESTANY = (:MPI_TESTANY, libmpi)
108+
const MPI_TESTALL = (:MPI_TESTALL, libmpi)
109+
const MPI_TYPE_CREATE_STRUCT = (:MPI_TYPE_CREATE_STRUCT, libmpi)
110+
const MPI_TYPE_COMMIT = (:MPI_TYPE_COMMIT, libmpi)
111+
const MPI_WAIT = (:MPI_WAIT, libmpi)
112+
const MPI_WAITANY = (:MPI_WAITANY, libmpi)
113+
const MPI_WAITSOME = (:MPI_WAITSOME, libmpi)
114+
const MPI_WIN_ATTACH = (:MPI_WIN_ATTACH, libmpi)
115+
const MPI_WIN_CREATE = (:MPI_WIN_CREATE, libmpi)
116+
const MPI_WIN_CREATE_DYNAMIC = (:MPI_WIN_CREATE, libmpi)
117+
const MPI_WIN_DETACH = (:MPI_WIN_DETACH, libmpi)
118+
const MPI_WIN_FENCE = (:MPI_WIN_FENCE, libmpi)
119+
const MPI_WIN_FLUSH = (:MPI_WIN_FLUSH, libmpi)
120+
const MPI_WIN_FREE = (:MPI_WIN_FREE, libmpi)
121+
const MPI_WIN_LOCK = (:MPI_WIN_LOCK, libmpi)
122+
const MPI_WIN_SYNC = (:MPI_WIN_SYNC, libmpi)
123+
const MPI_WIN_UNLOCK = (:MPI_WIN_UNLOCK, libmpi)
124+
const MPI_WTICK = (:MPI_WTICK, libmpi)
125+
const MPI_WTIME = (:MPI_WTIME, libmpi)
116126

117127
primitive type CComm 32 end
128+
primitive type CInfo 32 end
129+
primitive type CWin 32 end

test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ function runtests()
2828
testfiles = sort(filter(istest, readdir(testdir)))
2929

3030
extra_args = []
31-
if contains(readlines(open(`mpiexec --version`)[1])[1], "OpenRTE")
32-
push!(extra_args,"--oversubscribe")
31+
@static if !is_windows()
32+
if contains(readlines(open(`mpiexec --version`)[1])[1], "OpenRTE")
33+
push!(extra_args,"--oversubscribe")
34+
end
3335
end
3436

3537
nfail = 0

test/test_cman_julia.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using MPI
33

44
# Start workers via `mpiexec` that communicate among themselves via MPI;
55
# communicate with the workers via TCP
6-
if contains(readlines(open(`mpiexec --version`)[1])[1], "OpenRTE")
6+
if !is_windows() && contains(readlines(open(`mpiexec --version`)[1])[1], "OpenRTE")
77
mgr = MPI.MPIManager(np=4, mpirun_cmd=`mpiexec --oversubscribe -n 4`)
88
else
99
mgr = MPI.MPIManager(np=4)

0 commit comments

Comments
 (0)