Running in ParallelΒΆ

For large jobs, pyXSIM can be run in parallel using MPI. To do this, you need to have an MPI library, and the mpi4py package installed into your Python stack. To run scripts in parallel, import yt before importing pyxsim, and call yt.enable_parallelism() before doing anything else:

import yt
yt.enable_parallelism()
import pyxsim

# rest of code goes here...

When pyXSIM is run in parallel, photon lists and event lists will be created across multiple cores and split across multiple files when written to disk.