salvus.flow.executors.mpi.utils
salvus.flow.executors.mpi.utils salvus flow executors mpi utils Run simulations on MPI distributed meshes.
Functions
compute_halo_selection()
compute_halo_selection()def compute_halo_selection(
core_global_element_ids: npt.NDArray, halo_width_in_meters: float
) -> collections.abc.Callable[[Mesh], npt.NDArray]: ...Compute a selection function that selects all elements within a halo around the given core global element IDs.
Parameters
core_global_element_idsnpt.NDArray — The global element IDs of the core region.halo_width_in_metersfloat — The width of the halo in meters.
Returns collections.abc.Callable[[Mesh], npt.NDArray]
get_solver_precision()
get_solver_precision()def get_solver_precision(
comm: int, execution_config: MPIExecutionConfiguration
) -> typing.Literal["single", "double"]: ...Get the solver precision for a given MPI execution configuration.
Collective operations.
This function will only check it on rank 0 and then broadcast the result. In addition it will be cached so that it is only computed once per binary. This should make the cost of this function negligible.
Parameters
commint — The MPI communicator.execution_configMPIExecutionConfiguration — The MPI execution configuration. The assumption is that it is the same across all ranks.
Returns typing.Literal['single', 'double']