Closed AdamOrmondroyd closed 8 months ago
Good spot! How easy is it to write a test for this?
It'll be faster to write than decide whether or not it's easy
I think this is actually worth some thought.
As things stand, the simplest thing to do would be to create another run_pypolychord.py file which provides some cube samples (not really important what they are).
The natural and easy place for this would be in the Python_Functions folder (which seriously needs tidying up)
However, if we're going to make a test for this, I see no reason why every single other option doesn't also deserve a test. I envisage something like:
@pytest.mark.parameterize("settings", [some, variants, of, settings])
def test_run(settings):
...
output = pypolychord.run_polychord(likelihood, nDims, nDerived, settings, prior, dumper)
However, this would all need to change to plain old kwargs
instead of PolyChordSettings
if the neglected #90 ever gets merged.
I've added the optional dependency cube_samples
which installs fortranformat
which is needed for cube_samples
to work properly
Patch version bump?
pypolychord/polychord.py::
make_resume_file()
does not work with more than one MPI process.It looks like the send and receive buffers were mixed up, though I admit I have absolutely no idea why
recvbuf.dtype
was set to int.I have visually checked that the live points written to the resume file by
make_resume_file()
are the same numbers as the providedPolyChordSettings.cube_samples
.(I should probably have suspected something would go wrong after not personally pushing my changes in #92 very hard, and here we are)