mpi_array.logging.get_rank_logger

mpi_array.logging.get_rank_logger(name, comm=None, ranks=None)[source]

Returns logging.Logger object for message logging.

Parameters:
  • name (str) – Name of logger (note that the name of logger actually created will be name + ".rank." + ("%04d" % comm.Get_rank())).
  • comm (mpi4py.MPI.Comm) – MPI communicator. Used for determining the rank of this process. If None uses mpi4py.MPI.COMM_WORLD.
  • ranks (None or list-of-int) – Limits logging output to ranks specified in this list. If None, all ranks produce logging output.
Return type:

logging.Logger

Returns:

Logger object.