pyLOM.utils#
Module contents#
- pyLOM.utils.raiseError(errmsg)[source]#
Raise a controlled error and abort execution on all processes.
- pyLOM.utils.raiseWarning(warnmsg, allranks=False)[source]#
Raise a controlled warning but don’t abort execution on all processes.
- pyLOM.utils.worksplit(istart, iend, whoAmI, nWorkers=MPI_SIZE)[source]#
Divide the work between the processors
- pyLOM.utils.writesplit(npoints, write_master)[source]#
Divide the write array between the processors
- pyLOM.utils.is_rank_or_serial(root=0)[source]#
Return whether the rank is active or True in case of a serial run
- pyLOM.utils.pprint(rank, *args, **kwargs)[source]#
Print alternative for parallel codes. It works as python’s print with the rank variable, which can be negative for everyone to print or equal to the rank that should print.
- pyLOM.utils.mpi_scatter(sendbuff, root=0, do_split=False)[source]#
Send an array among the processors and split if necessary.
- pyLOM.utils.mpi_gather(sendbuff, root=0, all=False)[source]#
Gather an array from all the processors.