JohannesBuchner / UltraNest

Fit and compare complex models reliably and rapidly. Advanced nested sampling.
https://johannesbuchner.github.io/UltraNest/
Other
149 stars 30 forks source link

Unable to start runs when using MPI #4

Closed ajdittmann closed 4 years ago

ajdittmann commented 4 years ago

Description

When I attempt to run the 100-D Gaussian example using MPI,

mpirun -np 2 python3 gauss.py --x_dim=100 --num_live_points=400 --slice --slice_steps=100

the following OSError occurs:

File "h5py/h5f.pyx", line 85, in h5py.h5f.open OSError: Unable to open file (truncated file: eof = 96, sblock->base_addr = 0, stored_eof = 2048)

During the handling of this exception, other exceptions occur. I have included the full report here.

The example ran fine without MPI. I renamed the logs directory before running this. The error occurred both with and without setting OMP_NUM_THREADS=1

JohannesBuchner commented 4 years ago

Do you have mpi4py installed?

Can you reproduce with

python3 -c "h5py.File('testfile.h5', mode='a')"
mpirun -np 2 python3 -c "h5py.File('testfile.h5', mode='a')"

I wonder if your hdf5 library may not be compiled with MPI capabilities.

ajdittmann commented 4 years ago

It looks like hdf5 wasn't compiled for parallel use (using h5cc to check) . I'll reopen the issue if the problem persists after sorting that out.