Skip to content

Commit

Permalink
create the parameter names file earlier (#118)
Browse files Browse the repository at this point in the history
* create paramnames file before running

* need the base dir and file root first!

* version bump
  • Loading branch information
AdamOrmondroyd committed Feb 28, 2024
1 parent b3daab9 commit e72048a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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.22.0
PolyChord v 1.22.1

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.22.0"
__version__ = "1.22.1"
from pypolychord.settings import PolyChordSettings
from pypolychord.polychord import run_polychord, run
12 changes: 6 additions & 6 deletions pypolychord/polychord.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ def run(loglikelihood, nDims, **kwargs):
if rank == 0:
(Path(kwargs['base_dir']) / kwargs['cluster_dir']).mkdir(
parents=True, exist_ok=True)
if paramnames is not None:
PolyChordOutput.make_paramnames_file(
paramnames,
Path(kwargs['base_dir']) /
(kwargs['file_root'] + ".paramnames"))


if 'cube_samples' in kwargs:
_make_resume_file(loglikelihood, kwargs['prior'], **kwargs)
Expand Down Expand Up @@ -630,12 +636,6 @@ def wrap_prior(cube, theta):
if 'cube_samples' in kwargs:
kwargs['read_resume'] = read_resume

if paramnames is not None:
PolyChordOutput.make_paramnames_file(
paramnames,
Path(kwargs['base_dir']) /
(kwargs['file_root'] + ".paramnames"))

try:
import anesthetic
except ImportError:
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.22.0")')
write(stdout_unit,'(" version: 1.22.1")')
write(stdout_unit,'(" release: 10th Jan 2024")')
write(stdout_unit,'(" email: wh260@mrao.cam.ac.uk")')
write(stdout_unit,'("")')
Expand Down

0 comments on commit e72048a

Please sign in to comment.