Skip to content

Commit

Permalink
all but generalized chains fixed, HOT START BROKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
lcgraham committed May 17, 2016
1 parent 4c5f2af commit dd2450c
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 188 deletions.
7 changes: 4 additions & 3 deletions bet/sampling/adaptiveSampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ def generalized_chains(self, input_obj, t_set, kern,
# reshape if parallel
if comm.size > 1:
temp_input = np.reshape(disc._input_sample_set.\
get_values_local(), (self.num_chains,
get_values(), (self.num_chains,
chain_length, -1), 'F')
temp_output = np.reshape(disc._output_sample_set.\
get_values_local(), (self.num_chains,
get_values(), (self.num_chains,
chain_length, -1), 'F')
all_step_ratios = np.reshape(all_step_ratios,
(self.num_chains, -1), 'F')
Expand Down Expand Up @@ -487,7 +487,8 @@ def generalized_chains(self, input_obj, t_set, kern,
mdat['step_ratios'] = all_step_ratios
mdat['kern_old'] = util.get_global_values(kern_old,
shape=(self.num_chains,))
super(sampler, self).save(mdat, savefile, disc)
if comm.rank == 0:
super(sampler, self).save(mdat, savefile, disc)

return (disc, all_step_ratios)

Expand Down
Loading

0 comments on commit dd2450c

Please sign in to comment.