Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into anesthetic2
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamOrmondroyd committed Jan 9, 2024
2 parents d8b0b67 + bd24bc7 commit c85b9cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pypolychord/polychord.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,16 @@ def make_resume_file(settings, loglikelihood, prior):
sendbuf = np.array(lives).flatten()
sendcounts = np.array(comm.gather(len(sendbuf)))
if rank == 0:
recvbuf = np.empty(sum(sendcounts), dtype=int)
recvbuf = np.empty(sum(sendcounts))
else:
recvbuf = None
comm.Gatherv(sendbuf=sendbuf, recvbuf=(recvbuf, sendcounts), root=0)

lives = np.reshape(sendbuf, (len(settings.cube_samples), len(lives[0])))
else:
lives = np.array(lives)

if rank == 0:
if MPI:
lives = np.reshape(recvbuf, (len(settings.cube_samples), len(lives[0])))
else:
lives = np.array(lives)
with open(resume_filename,"w") as f:
def write(var):
var = np.atleast_1d(var)
Expand Down

0 comments on commit c85b9cf

Please sign in to comment.