pynucastro.mpi_utils module

pynucastro.mpi_utils module#

MPI utilities used in the reduction algorithm.

class pynucastro.mpi_utils.FailedMPIImport(error=None, msg=None)[source]#

Bases: object

Replacement for mpi4py.MPI import that will throw an error if used.

exception pynucastro.mpi_utils.MPIImportError[source]#

Bases: Exception

Exception for MPI errors

pynucastro.mpi_utils.mpi_importer()[source]#

Import MPI (lazily), where we only throw an error if the import failed and then we attempt to use the object.

pynucastro.mpi_utils.mpi_numpy_decomp(MPI_N, MPI_rank, n)[source]#

Decompose a set of conditions for MPI_N MPI processes, where the conditions are a sequence of 3 sequences with ordering (composition_sequence, density_sequence, temperature_sequence). This structure for the dataset is necessary for the vectorized reduction algorithms.