run_open_mpi#
- jetset.mcmc_ultranest.run_open_mpi(sampler, n_proc=8, ultranest_output_dir=None, min_num_live_points=64, nsteps=1, max_num_improvement_loops=1, min_ess=100, num_c_threads=1, extra_mpirun_args='')[source]#
Run
UltraNestSampler.run_samplerthroughmpirun.- Parameters:
sampler (UltraNestSampler) – Configured sampler instance to serialize and execute.
n_proc (int, optional) – Number of MPI ranks passed to
mpirun -np. Default is8.ultranest_output_dir (str, optional) – Name passed to
run_sampler, and resolved within run_mpi/ directorymin_num_live_points (int, optional) – Minimum live points forwarded to
run_sampler.nsteps (int, optional) – Slice-sampler step multiplier forwarded to
run_sampler.max_num_improvement_loops (int, optional) – Value forwarded to
run_sampler.min_ess (int, optional) – Minimum effective sample size target forwarded to
run_sampler.num_c_threads (int, optional) – Thread count forwarded to
mcmc.model.set_num_c_threadsin the generated MPI worker script.extra_mpirun_args (str, optional) – Extra command-line arguments inserted after
mpirunand before-np(for example hostfile or binding flags).
- Returns:
Sampler reloaded from
run_mpi/sampler.pklafter MPI completion.- Return type:
Notes
The function deletes and recreates
./run_mpiin the current working directory, writes a helper Python script there, and temporarily setsOMP_NUM_THREADSton_procfor the parent process while the MPI command runs.