irradiapy.utils.mpi

Utilities for MPI-related functionalities.

Functions

ap_rm_file(original, target, comm)

Append content from original to target and delete original.

broadcast_variables(root, comm, *variables)

Broadcasts variables.

cp_file(original, target, comm)

Copy a file from original to target, overwriting target if it exists.

mpi_safe_method(method)

Decorator that wraps an MPI-using method so any exception prints a traceback with the current rank and then calls MPI.Abort.

mpi_subdomains_decomposition(n)

Factor n into three integers nx, ny, nz for MPI decomposition into subdomains.

mv_file(original, target, comm)

Move a file from original to target, overwriting target if it exists.

rm_file(path_file, comm)

Remove a file.

Classes

MPIExceptionHandlerMixin()

Provides a common MPI exception handler method when mpi_safe_method cannot be used.

MPITagAllocator()

A class to allocate unique tags for processes.