I’ve conducted package upgrade from official repositories on 21 Dec. I ran Julia v0.7.0 and i’d noticed one of my SharedArray’s had returned procs(S)=Int64[0]
. I’d migrated to Julia v1.0.3. Same thing.
I’d put @info’s along the initialization part of the outermost calling function, where SharedArray of interest is created, and observed, procs(S) = Int64[0]
happens at random line, right from the beginning or doesn’t at all, like random event, with higher probability the more lines are executed in the same local scope. I created those shared arrays by specifying pids kwarg with Array{Int64,1}. When i’ve changed pids type to UnitRange{Int64}, bug had never been observed since.
using SharedArrays
function o102e(jstart::Int,jend::Int,tJn::Int;NN1::Int64=32000,NN2::Int64=126000,pids=2:13)
NN=NN1+NN2
zut=SharedArray{Float64}(NN, init = S -> S[localindices(S)] .= 0.0,pids=pids)
w =SharedArray{Float64}(NN, init = S -> S[localindices(S)] .= 0.0,pids=pids)
si =SharedArray{Float64}(NN, init = S -> S[localindices(S)] .= 0.0,pids=pids)
dsi =SharedArray{Float64}(NN, init = S -> S[localindices(S)] .= 0.0,pids=pids)
@info string("344 zut ",length(procs(zut)))
u = SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
@info string("352 zut ",length(procs(zut)))
siu =SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
dsiu=SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
@info string("365 zut ",length(procs(zut)))
epso =SharedArray{Float64}(NN , init = S -> S[localindices(S)] .= 0.0,pids=pids)
tuwa =SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
dtuwa=SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
Tchi =SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
sichi2=SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
chis =SharedArray{Float64}(NN1, init = S -> S[localindices(S)] .= 0.0,pids=pids)
@info string("379 zut ",length(procs(zut)))
# return length(procs(zut)),procs(zut)
end
begin
@info "alpha!"
for k=1:20
o102e(260001,262001,260000,pids=collect(2:13))
end
end
begin
@info "omega!"
for k=1:20
o102e(260001,262001,260000,pids=2:13)
end
end
Julia Version 1.0.3
Commit 04330c0 (2018-12-16 21:23 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, sandybridge)