Skip to content

Commit 0aac148

Browse files
authored
Merge pull request #212 from JuliaParallel/fbot/deps
Fix deprecations
2 parents 5f605b7 + d61cacc commit 0aac148

31 files changed

+41
-45
lines changed

examples/02-broadcast-impl.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function do_broadcast()
1515
if MPI.Comm_rank(comm) == root
1616
A = [1:N;] * (1.0 + im*2.0)
1717
else
18-
A = Array(Complex128, N)
18+
A = Array(ComplexF64, N)
1919
end
2020

2121
MPI.Bcast!(A,length(A), root, comm)

src/MPI.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module MPI
44

55
using Compat
66

7-
using Compat.Libdl
7+
using Libdl
88

99
@static if Compat.Sys.iswindows()
1010
const depfile = "win_mpiconstants.jl"
@@ -50,8 +50,8 @@ function __init__()
5050
UInt64 => MPI_INTEGER8, # => MPI_UINT64_T,
5151
Float32 => MPI_REAL4,
5252
Float64 => MPI_REAL8,
53-
Compat.ComplexF32 => MPI_COMPLEX8,
54-
Compat.ComplexF64 => MPI_COMPLEX16)
53+
ComplexF32 => MPI_COMPLEX8,
54+
ComplexF64 => MPI_COMPLEX16)
5555
mpitype_dict[T] = mpiT
5656
mpitype_dict_inverse[mpiT] = T
5757
end

src/cman.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ function start_main_loop(mode::TransportMode=TCP_TRANSPORT_ALL;
344344
# Send connection information to all workers
345345
# TODO: Use Bcast
346346
for j in 1:size-1
347-
cookie = VERSION >= v"0.5.0-dev+4047" ? Distributed.cluster_cookie() : nothing
347+
cookie = Distributed.cluster_cookie()
348348
MPI.send((mgr.ip, mgr.port, cookie), j, 0, comm)
349349
end
350350
# Tell Base about the workers

src/mpi-base.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ mutable struct Info
103103
newinfo = Ref{Cint}()
104104
ccall(MPI_INFO_CREATE, Nothing, (Ptr{Cint}, Ref{Cint}), newinfo, 0)
105105
info=new(newinfo[])
106-
@compat finalizer(info) do x
106+
finalizer(info) do x
107107
ccall(MPI_INFO_FREE, Nothing, (Ref{Cint}, Ref{Cint}), x.val, 0)
108108
x.val = MPI_INFO_NULL
109109
end
@@ -206,7 +206,7 @@ Indicate that MPI.Finalize() should be called automatically at exit, if not call
206206
The global variable `FINALIZE_ATEXIT` indicates if this function was called.
207207
"""
208208
function finalize_atexit()
209-
if Compat.Sys.iswindows()
209+
if Sys.iswindows()
210210
error("finalize_atexit is not supported on Windows")
211211
end
212212
ret = ccall(:install_finalize_atexit_hook, Cint, ())
@@ -1078,5 +1078,5 @@ elseif sizeof(CComm) == sizeof(Cint)
10781078
Win(reinterpret(Cint, cwin))
10791079
end
10801080
else
1081-
warn("No MPI_Comm_c2f found - conversion to/from MPI.CComm will not work")
1081+
@warn("No MPI_Comm_c2f found - conversion to/from MPI.CComm will not work")
10821082
end

src/mpi-op.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ function user_op(opfunc::Function)
4242
# of some sort so that this initialization only occurs once.
4343
# To do when native threading in Julia stabilizes (and is documented).
4444
resize!(_user_functions, nthreads())
45-
if VERSION < v"0.7.0-DEV.4762"
46-
user_function = cfunction(_mpi_user_function, Nothing, (Ptr{Nothing}, Ptr{Nothing}, Ptr{Cint}, Ptr{Cint}))
47-
else
48-
user_function = @cfunction(_mpi_user_function, Nothing, (Ptr{Nothing}, Ptr{Nothing}, Ptr{Cint}, Ptr{Cint}))
49-
end
45+
user_function = @cfunction(_mpi_user_function, Nothing, (Ptr{Nothing}, Ptr{Nothing}, Ptr{Cint}, Ptr{Cint}))
5046
opnum = Ref{Cint}()
5147
ccall(MPI_OP_CREATE, Nothing, (Ptr{Nothing}, Ref{Cint}, Ref{Cint}, Ref{Cint}),
5248
user_function, false, opnum, 0)

test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using MPI
2-
using Compat.Test
2+
using Test
33

44
using Compat
55
import Compat.String
@@ -21,7 +21,7 @@ juliafiles = ["test_cman_julia.jl"]
2121
singlefiles = ["test_spawn.jl"]
2222

2323
excludedfiles = []
24-
if Compat.Sys.iswindows()
24+
if Sys.iswindows()
2525
push!(excludedfiles, "test_info.jl")
2626
push!(excludedfiles, "test_onesided.jl")
2727
push!(excludedfiles, "test_finalize_atexit.jl")
@@ -60,11 +60,11 @@ function runtests()
6060
else
6161
run(`mpiexec $extra_args -n $nprocs $exename --code-coverage=$coverage_opt $(joinpath(testdir, f))`)
6262
end
63-
Base.with_output_color(:green,Compat.stdout) do io
63+
Base.with_output_color(:green,stdout) do io
6464
println(io,"\tSUCCESS: $f")
6565
end
6666
catch ex
67-
Base.with_output_color(:red,Compat.stderr) do io
67+
Base.with_output_color(:red,stderr) do io
6868
println(io,"\tError: $(joinpath(testdir, f))")
6969
showerror(io,ex,backtrace())
7070
end

test/spawned_worker.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Compat.Test
1+
using Test
22
using MPI
33

44
MPI.Init()

test/test_allgather.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Compat.Test
1+
using Test
22
using MPI
33

44
MPI.Init()

test/test_allgatherv.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Compat.Test
1+
using Test
22
using MPI
33

44
MPI.Init()

test/test_allreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Compat.Test
1+
using Test
22
using MPI
33

44
MPI.Init()

0 commit comments

Comments
 (0)