Skip to content

Commit 2eafed4

Browse files
authored
Merge pull request #188 from Sacha0/fixv7ok6depwarns
fix various depwarns under 0.7 (without breaking 0.6)
2 parents 6efa490 + fcbdd7d commit 2eafed4

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ os:
55
- linux
66
- osx
77
julia:
8-
- 0.4
8+
- 0.6
99
- nightly
1010
notifications:
1111
email: false

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
julia 0.4
1+
julia 0.6
22
BinDeps
33
Compat 0.9.5

appveyor.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
5-
# The MPI tests with Julia 0.5 are currently broken. We don't quite
6-
# know why; see <https://github.com/JuliaParallel/MPI.jl/issues/123>
7-
# for the respective discussion.
8-
#- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
9-
#- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
5+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
6+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
107

118
branches:
129
only:

src/cman.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export TransportMode, MPI_ON_WORKERS, TCP_TRANSPORT_ALL, MPI_TRANSPORT_ALL
2424

2525
@enum TransportMode MPI_ON_WORKERS MPI_TRANSPORT_ALL TCP_TRANSPORT_ALL
2626

27-
type MPIManager <: ClusterManager
27+
mutable struct MPIManager <: ClusterManager
2828
np::Int # number of worker processes (excluding the manager process)
2929
mpi2j::Dict{Int,Int} # map MPI ranks to Julia processes
3030
j2mpi::Dict{Int,Int} # map Julia to MPI ranks
@@ -139,7 +139,7 @@ function launch(mgr::MPIManager, params::Dict,
139139
else
140140
cookie = `nothing`
141141
end
142-
setup_cmds = `using MPI;MPI.setup_worker($(getipaddr().host),$(mgr.port),$cookie)`
142+
setup_cmds = `using MPI\;MPI.setup_worker'('$(getipaddr().host),$(mgr.port),$cookie')'`
143143
mpi_cmd = `$(mgr.mpirun_cmd) $(params[:exename]) -e $(Base.shell_escape(setup_cmds))`
144144
open(detach(mpi_cmd))
145145
mgr.launched = true
@@ -475,7 +475,7 @@ function mpi_do(mgr::MPIManager, expr)
475475
!mgr.initialized && wait(mgr.cond_initialized)
476476
jpids = keys(mgr.j2mpi)
477477
refs = Array{Any}(length(jpids))
478-
for (i,p) in enumerate(filter(x -> x != myid(), jpids))
478+
for (i,p) in enumerate(Iterators.filter(x -> x != myid(), jpids))
479479
refs[i] = remotecall(expr, p)
480480
end
481481
# Execution on local process should be last, since it can block the main

src/mpi-base.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
typealias MPIDatatype Union{Char,
1+
const MPIDatatype = Union{Char,
22
Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64,
33
UInt64,
44
Float32, Float64, Complex64, Complex128}
5-
typealias MPIBuffertype{T} Union{Ptr{T}, Array{T}, Ref{T}}
5+
MPIBuffertype{T} = Union{Ptr{T}, Array{T}, Ref{T}}
66

77
if VERSION >= v"0.5.0-"
88
# TODO: Use Compat for this
@@ -67,15 +67,15 @@ function mpitype{T}(::Type{T})
6767
end
6868

6969

70-
type Comm
70+
mutable struct Comm
7171
val::Cint
7272
Comm(val::Integer) = new(val)
7373
end
7474
const COMM_NULL = Comm(MPI_COMM_NULL)
7575
const COMM_SELF = Comm(MPI_COMM_SELF)
7676
const COMM_WORLD = Comm(MPI_COMM_WORLD)
7777

78-
type Op
78+
mutable struct Op
7979
val::Cint
8080
end
8181
const OP_NULL = Op(MPI_OP_NULL)
@@ -90,13 +90,13 @@ const MIN = Op(MPI_MIN)
9090
const PROD = Op(MPI_PROD)
9191
const SUM = Op(MPI_SUM)
9292

93-
type Request
93+
mutable struct Request
9494
val::Cint
9595
buffer
9696
end
9797
const REQUEST_NULL = Request(MPI_REQUEST_NULL, nothing)
9898

99-
type Status
99+
mutable struct Status
100100
val::Array{Cint,1}
101101
Status() = new(Array{Cint}(MPI_STATUS_SIZE))
102102
end

test/test_datatype.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ end
1818

1919
# test simple type
2020

21-
type NotABits
21+
mutable struct NotABits
2222
a::Any
2323
end
2424

2525
@test_throws ArgumentError MPI.type_create(NotABits)
2626

27-
immutable Boundary
27+
struct Boundary
2828
c::UInt16 # force some padding to be inserted
2929
a::Int
3030
b::UInt8
@@ -56,7 +56,7 @@ end
5656

5757

5858
# test nested types
59-
immutable Boundary2
59+
struct Boundary2
6060
a::UInt32
6161
b::Tuple{Int, UInt8}
6262
end

0 commit comments

Comments
 (0)