Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make_resume_file() incompatible with MPI #101

Merged
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:target: https://arxiv.org/abs/1506.00171
:alt: Open-access paper

PolyChord v 1.21.2
PolyChord v 1.21.3

Will Handley, Mike Hobson & Anthony Lasenby

Expand Down
2 changes: 1 addition & 1 deletion pypolychord/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "1.21.2"
__version__ = "1.21.3"
from pypolychord.settings import PolyChordSettings
from pypolychord.polychord import run_polychord
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
2 changes: 1 addition & 1 deletion src/polychord/feedback.f90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subroutine write_opening_statement(settings)
write(stdout_unit,'("")')
write(stdout_unit,'("PolyChord: Next Generation Nested Sampling")')
write(stdout_unit,'("copyright: Will Handley, Mike Hobson & Anthony Lasenby")')
write(stdout_unit,'(" version: 1.21.2")')
write(stdout_unit,'(" version: 1.21.3")')
write(stdout_unit,'(" release: 9th Jan 2024")')
write(stdout_unit,'(" email: wh260@mrao.cam.ac.uk")')
write(stdout_unit,'("")')
Expand Down
Loading