nbodykit package

Subpackages

Module contents

class nbodykit.CurrentMPIComm[source]

Bases: object

A class to faciliate getting and setting the current MPI communicator.

Methods

enable(func) Decorator to attach the current MPI communicator to the input keyword arguments of func, via the comm keyword.
get() Get the current MPI communicator, returning MPI.COMM_WORLD if it has not be explicitly set yet.
set(comm) Set the current MPI communicator to the input value.
static enable(func)[source]

Decorator to attach the current MPI communicator to the input keyword arguments of func, via the comm keyword.

classmethod get()[source]

Get the current MPI communicator, returning MPI.COMM_WORLD if it has not be explicitly set yet.

classmethod set(comm)[source]

Set the current MPI communicator to the input value.

nbodykit.setup_logging(log_level='info')[source]

Turn on logging, with the specified level.

Parameters:log_level ('info', 'debug', 'warning') – the logging level to set; logging below this level is ignored