nbodykit

Functions

setup_logging([log_level]) Turn on logging, with the specified level.

Classes

CurrentMPIComm A class to faciliate getting and setting the current MPI communicator.
set_options(**kwargs) Set global configuration options.
class nbodykit.CurrentMPIComm[source]

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.

class nbodykit.set_options(**kwargs)[source]

Set global configuration options.

Parameters:
  • dask_chunk_size (int) – the number of elements for the default chunk size for dask arrays; chunks should usually hold between 10 MB and 100 MB
  • dask_cache_size (float) – the size of the internal dask cache in bytes; default is 1e9
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