Skip to content

Commit b986b88

Browse files
authored
Merge pull request #41 from JuliaParallel/anj/06
Ready for 0.6
2 parents 648ac46 + a4ac782 commit b986b88

10 files changed

Lines changed: 28 additions & 28 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ os:
1010
- linux
1111

1212
julia:
13-
- 0.5
13+
- 0.6
1414
- nightly
1515

1616
matrix:

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
julia 0.5
2-
Compat
2+
Compat 0.17
33
DistributedArrays 0.2.0

extras/elpp.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ finalize() = icxx"El::Finalize();"
2929
### ElementalMatrix ###
3030
# Many of the definitions in Elemental are very similar which makes it easy to define methods for a common abstract type. However, we should be careful when calling into the library with e.g. @cxx or icxx because all leaf types might not implement the actual method.
3131

32-
abstract ElementalMatrix{T} <: AbstractMatrix{T}
32+
@compat abstract type ElementalMatrix{T} <: AbstractMatrix{T} end
3333

3434
_getindex(A::ElementalMatrix, i::ElInt, j::ElInt) = icxx"$(A.buf).Get($i, $j);"
3535
getindex(A::ElementalMatrix, i::Integer, j::Integer) = _getindex(A, ElInt(i - 1), ElInt(j - 1))
@@ -63,7 +63,7 @@ end
6363
svdvals(A::ElementalMatrix) = svdvals!(copy(A))
6464

6565
### AbstractDistMatrix ###
66-
abstract AbstractDistMatrix{T} <: ElementalMatrix{T}
66+
@compat abstract type AbstractDistMatrix{T} <: ElementalMatrix{T} end
6767

6868
_resize!(A::AbstractDistMatrix, i::ElInt, j::ElInt) = icxx"$(A.buf).Resize($i, $j);"
6969
resize!(A::AbstractDistMatrix, i::Integer, j::Integer) = _resize!(A, ElInt(i), ElInt(j))
@@ -155,7 +155,7 @@ socp(A::DistSparseMatrix, G::DistSparseMatrix, b::DistMultiVec, c::DistMultiVec,
155155

156156
using DistributedArrays
157157
function toback(A::DArray{Float64,2})
158-
rs = Array(Any, size(A.chunks))
158+
rs = Array{Any}(size(A.chunks))
159159
for p in eachindex(A.chunks)
160160
ind = A.indexes[p]
161161
rs[p] = remotecall(A.pids[p], () -> begin

src/core/types.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ end
4949

5050
using Base.LinAlg: BlasFloat, BlasReal, BlasComplex
5151

52-
typealias ElElementType Union{ElInt,Float32,Float64,Complex64,Complex128}
52+
const ElElementType = Union{ElInt,Float32,Float64,Complex64,Complex128}
5353

54-
typealias ElFloatType Union{Float32,Float64} # TODO: Maybe just use BlasReal here
54+
const ElFloatType = Union{Float32,Float64} # TODO: Maybe just use BlasReal here
5555

56-
abstract ElementalMatrix{T} <: AbstractMatrix{T}
56+
@compat abstract type ElementalMatrix{T} <: AbstractMatrix{T} end
5757
eltype{T}(A::ElementalMatrix{T}) = T
5858

5959
# Error is handled in error.jl as an Exception

src/julia/darray.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type RemoteElementalMatrix
55
end
66

77
function toback{T<:BlasFloat,S<:StridedMatrix}(A::DArray{T,2,S})
8-
rs = Array(Any, size(procs(A)))
8+
rs = Array{Any}(size(procs(A)))
99
@sync for p in eachindex(procs(A))
1010
ind = A.indexes[p]
1111
@async rs[p] = remotecall(procs(A)[p]) do
@@ -25,7 +25,7 @@ function toback{T<:BlasFloat,S<:StridedMatrix}(A::DArray{T,2,S})
2525
end
2626

2727
function tofront(r::Base.Matrix)
28-
tt = Array(Any, length(r))
28+
tt = Array{Any}(length(r))
2929
for i = 1:length(r)
3030
tt[i] = remotecall(r[i].where, r[i]) do t
3131
typeof(fetch(t))
@@ -75,7 +75,7 @@ function (\){T<:BlasFloat,S}(A::DArray{T,2,S}, B::DArray{T,2,S})
7575
rA = toback(A)
7676
rB = toback(B)
7777
pidsAB = union(A.pids, B.pids)
78-
rvals = Array(Any, length(pidsAB))
78+
rvals = Vector{Any}(length(pidsAB))
7979
@sync for i = 1:length(pidsAB)
8080
@async rvals[i] = remotecall_wait(pidsAB[i], rA[i], rB[i]) do t1,t2
8181
solve!(fetch(t1), fetch(t2))
@@ -86,7 +86,7 @@ end
8686

8787
function eigvals{T<:BlasFloat}(A::Hermitian{T,DArray{T,2,Array{T,2}}})
8888
rA = toback(A.data)
89-
rvals = Array(Any, size(procs(A.data)))
89+
rvals = Array{Any}(size(procs(A.data)))
9090
uplo = A.uplo == 'U' ? UPPER : LOWER
9191
@sync for i in eachindex(rvals)
9292
@async rvals[i] = remotecall_wait(rA[i].where, rA[i]) do t
@@ -98,7 +98,7 @@ end
9898

9999
function svdvals{T<:BlasFloat}(A::DArray{T,2})
100100
rA = toback(A)
101-
rvals = Array(Any, size(procs(A)))
101+
rvals = Array{Any}(size(procs(A)))
102102
@sync for i in eachindex(rvals)
103103
@async rvals[i] = remotecall_wait(rA[i].where, rA[i]) do t
104104
svdvals(fetch(t))
@@ -109,7 +109,7 @@ end
109109

110110
function inv!{T<:BlasFloat}(A::DArray{T,2})
111111
rA = toback(A)
112-
rvals = Array(Any, size(procs(A)))
112+
rvals = Array{Any}(size(procs(A)))
113113
@sync for j = 1:size(rvals, 2)
114114
for i = 1:size(rvals, 1)
115115
@async rvals[i,j] = remotecall_wait(t -> inverse!(fetch(t)), rA[i,j].where, rA[i,j])
@@ -122,7 +122,7 @@ inv{T<:BlasFloat}(A::DArray{T,2}) = inv!(copy(A))
122122

123123
function logdet{T<:BlasFloat}(A::DArray{T,2})
124124
rA = toback(A)
125-
rvals = Array(Any, size(procs(A)))
125+
rvals = Array{Any}(size(procs(A)))
126126
@sync for i in eachindex(rvals)
127127
@async rvals[i] = remotecall_wait(rA[i].where, rA[i]) do t
128128
d = safeHPDDeterminant(Elemental.LOWER, fetch(t))
@@ -137,7 +137,7 @@ function spectralPortrait{T<:BlasReal}(A::DArray{T,2},
137137
imagSize::Integer,
138138
psCtrl::PseudospecCtrl{T}=PseudospecCtrl(T))
139139
rA = toback(A)
140-
rvals = Array(Any, size(procs(A)))
140+
rvals = Array{Any}(size(procs(A)))
141141
@sync for i in eachindex(rvals)
142142
@async rvals[i] = remotecall_wait(rA[i].where, rA[i]) do t
143143
spectralPortrait(fetch(t), ElInt(realSize), ElInt(imagSize), psCtrl)[1]
@@ -151,7 +151,7 @@ function spectralPortrait{T<:BlasReal}(A::DArray{Complex{T},2},
151151
imagSize::Integer,
152152
psCtrl::PseudospecCtrl{T}=PseudospecCtrl(T))
153153
rA = toback(A)
154-
rvals = Array(Any, size(procs(A)))
154+
rvals = Array{Any}(size(procs(A)))
155155
@sync for i in eachindex(rvals)
156156
@async rvals[i,j] = remotecall_wait(rA[i].where, rA[i]) do t
157157
spectralPortrait(fetch(t), ElInt(realSize), ElInt(imagSize), psCtrl)[1]
@@ -168,7 +168,7 @@ function spectralWindow{T<:BlasReal}(A::DArray{T,2},
168168
imagSize::Integer,
169169
psCtrl::PseudospecCtrl{T}=PseudospecCtrl(T))
170170
rA = toback(A)
171-
rvals = Array(Any, size(procs(A)))
171+
rvals = Array{Any}(size(procs(A)))
172172
@sync for i in eachindex(rvals)
173173
@async rvals[i] = remotecall_wait(rA[i].where, rA[i]) do t
174174
spectralWindow(fetch(t), center, realWidth, imagWidth,
@@ -186,7 +186,7 @@ function spectralWindow{T<:BlasReal}(A::DArray{Complex{T},2},
186186
imagSize::Integer,
187187
psCtrl::PseudospecCtrl{T}=PseudospecCtrl(T))
188188
rA = toback(A)
189-
rvals = Array(Any, size(procs(A)))
189+
rvals = Array{Any}(size(procs(A)))
190190
@sync for i in eachindex(rvals)
191191
@async rvals[i] = remotecall_wait(rA[i,j].where, rA[i]) do t
192192
spectralWindow(fetch(t), center, realWidth, imagWidth,
@@ -198,7 +198,7 @@ end
198198

199199
function foxLi{T<:BlasComplex}(::Type{T}, n::Integer, ω::Real)
200200
sz = tuple(DistributedArrays.defaultdist((n,n), workers())...)
201-
rvals = Array(Any, sz)
201+
rvals = Array{Any}(sz)
202202
@sync for j = 1:size(rvals, 2), i = 1:size(rvals, 1)
203203
@async rvals[i,j] = remotecall_wait(workers()[sub2ind(sz, i, j)]) do
204204
A = Elemental.DistMatrix(T)

src/lapack_like/condense.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ end
2222
immutable ElHessenberg{T,S<:ElementalMatrix} <: Factorization{T}
2323
factors::S
2424
τ::S
25-
ElHessenberg(factors::ElementalMatrix{T}, τ::ElementalMatrix{T}) = new(factors, τ)
25+
(::Type{ElHessenberg{T,S}}){T,S<:ElementalMatrix}(factors::ElementalMatrix{T}, τ::ElementalMatrix{T}) = new{T,S}(factors, τ)
2626
end
2727

2828
ElHessenberg{T}(factors::ElementalMatrix{T}, τ::ElementalMatrix{T}) = ElHessenberg{T,typeof(factors)}(factors, τ)

src/lapack_like/factor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
typealias RegSolveAlg Cuint
1+
const RegSolveAlg = Cuint
22

33
const REG_SOLVE_FGMRES = RegSolveAlg(0)
44
const REG_SOLVE_LGMRES = RegSolveAlg(1)

src/lapack_like/spectral.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sign
22
# TODO: Move this to ./funcs.jl
3-
typealias ElSignScaling Cuint
3+
const ElSignScaling = Cuint
44
const SIGN_SCALE_NONE = ElSignScaling(0)
55
const SIGN_SCALE_DET = ElSignScaling(1)
66
const SIGN_SCALE_FROB = ElSignScaling(2)
@@ -82,7 +82,7 @@ function SchurCtrl{T<:ElFloatType}(::Type{T};
8282
end
8383

8484
# Pseueospectra
85-
typealias ElFileFormat Cuint
85+
const ElFileFormat = Cuint
8686
const AUTO = ElFileFormat(0)
8787
const ASCII = ElFileFormat(1)
8888
const ASCII_MATLAB = ElFileFormat(2)
@@ -140,7 +140,7 @@ function SnapshotCtrl(realSize=0,
140140
ElBool(itCounts))
141141
end
142142

143-
typealias ElPseudospecNorm Cuint
143+
const ElPseudospecNorm = Cuint
144144
const PS_TWO_NORM = ElPseudospecNorm(0)
145145
const PS_ONE_NORM = ElPseudospecNorm(1)
146146

src/mpi.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function __init__()
1313
if Libdl.dlsym_e(Libdl.dlopen(libEl, Libdl.RTLD_GLOBAL), :MPI_Get_library_version) == C_NULL
1414
const global MPIImpl = :MPICH2
1515
else
16-
versionBuffer = Array(UInt8, 2800)
16+
versionBuffer = Vector{UInt8}(2800)
1717
len = Cint[0]
1818
err = ccall((:MPI_Get_library_version, libEl), Cint, (Ptr{UInt8}, Ptr{Cint}), versionBuffer, len)
1919
versionString = String(versionBuffer[1:len[1]-1])

src/optimization/solvers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Linear Programming
22
# ==================
3-
typealias ElLPApproach Cuint
3+
const ElLPApproach = Cuint
44

55
const LP_ADMM = ElLPApproach(0)
66
const LP_MEHROTRA = ElLPApproach(1)
77

8-
typealias ElKKTSystem Cuint
8+
const ElKKTSystem = Cuint
99

1010
const FULL_KKT = ElKKTSystem(0)
1111
const AUGMENTED_KKT = ElKKTSystem(1)

0 commit comments

Comments
 (0)