Skip to content

Commit

Permalink
remove pmap_with_data
Browse files Browse the repository at this point in the history
  • Loading branch information
meggart committed Jun 28, 2023
1 parent 6acc6c7 commit 48ebdbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions src/DAT/DAT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -664,22 +664,6 @@ _writedata(d::Array{<:Any,0},cache::Array{<:Any,0},::Tuple{}) = d[] = cache[]
updateinars(dc, r, incaches) = updatears(dc.incubes, r, :read, incaches)
writeoutars(dc, r, outcaches) = updatears(dc.outcubes, r, :write, outcaches)

function pmap_with_data(f, p::AbstractWorkerPool, c...; initfunc, progress=nothing, kwargs...)
d = Dict(ip=>remotecall(initfunc, ip) for ip in workers(p))
allrefs = @spawn d
function fnew(args...,)
refdict = fetch(allrefs)
myargs = fetch(refdict[myid()])
f(args..., myargs)
end
if progress !==nothing
progress_pmap(fnew,p,c...;progress=progress,kwargs...)
else
pmap(fnew,p,c...;kwargs...)
end
end
pmap_with_data(f,c...;initfunc,kwargs...) = pmap_with_data(f,default_worker_pool(),c...;initfunc,kwargs...)

function moduleloadedeverywhere()
try
isloaded = map(workers()) do w
Expand Down
2 changes: 1 addition & 1 deletion test/dimarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ end

#I am not sure, whether this is an actual use case
# and whether we would like to support the mix of symbol and string axisnames.
@test_broken r = mapslices(sum, yax, dims="axis1")
@test_broken mapslices(sum, yax, dims="axis1")
end

@testitem "Moving Window DimArray" begin
Expand Down

0 comments on commit 48ebdbc

Please sign in to comment.