PySM 3 can be executed in parallel over multiple nodes of a supercomputer with MPI.
The requirements to run with MPI are
mpi4py and, just for distributed smoothing,
The input maps are read from the first process in order to prevent overloading the filesystem, and then maps are distributed rings by rings across all processes, not overlapping.
pysm.MapDistribution object takes care of handling the metadata about how the data are distributed.
When the emission is requested, each process independently computes the emission just on its own portion of the sky.
When smoothing is applied,
libsharp is used to efficiently perform a distributed spherical harmonics transform.
`pysm3_mpi.py <https://github.com/healpy/pysm/blob/master/mpi_examples/pysm3_mpi.py>`__ from the repository as an example.
Execute with (remove
# to actually execute it):
#!mpirun -np 3 python pysm3_mpi.py