Skip to content

Commit

Permalink
Merge pull request #86 from tsfloss/master
Browse files Browse the repository at this point in the history
remove left-over set/get_distributed_dataset usage
  • Loading branch information
marius311 authored Oct 5, 2023
2 parents 469e1f7 + b6037f8 commit ffc4abc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/sampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ function sample_joint(
# seed
@everywhere @eval CMBLensing seed!()

# distribute the dataset object to workers once
set_distributed_dataset(ds, storage)

# initialize chains
states = map(copy, repeated(rundat, nchains))
if resume && (filename != nothing) && isfile(filename) && jldopen(io->haskey(io,"rundat"),filename,"r")
Expand All @@ -269,7 +266,7 @@ function sample_joint(
states = pmap(states) do state
state = _adapt(storage, state)
for gibbs_initialize! in gibbs_initializers
gibbs_initialize!(state, get_distributed_dataset())
gibbs_initialize!(state, ds)
end
_adapt(Array, state)
end
Expand Down Expand Up @@ -297,7 +294,7 @@ function sample_joint(
state = @⌛ _adapt(storage, state)

timing = @⌛ "Gibbs passes" map(gibbs_samplers) do gibbs_sample!
@elapsed gibbs_sample!(state, get_distributed_dataset())
@elapsed gibbs_sample!(state, ds)
end

state = @⌛ _adapt(Array, state)
Expand Down

0 comments on commit ffc4abc

Please sign in to comment.