pymor

Subpackages

Submodules

Package Contents

Functions

_init_mpi

provides a way to manually set the thread init mode for MPI if necessary.

load_defaults_from_file

Loads default values defined in configuration file.

set_log_levels

Set log levels for pyMOR's logging facility.

set_log_format

Set log levels for pyMOR's logging facility.

quit_event_loop

Attributes

config

revstring

__version__

filename

pymor._init_mpi()[source]

provides a way to manually set the thread init mode for MPI if necessary. Needs to happen as early as possible, otherwise mpi4py might auto-init somewhere else.

pymor.config[source]
pymor.load_defaults_from_file(filename='./pymor_defaults.py')[source]

Loads default values defined in configuration file.

Suitable configuration files can be created via write_defaults_to_file. The file is loaded via Python’s exec function, so be very careful with configuration files you have not created your own. You have been warned!

Parameters

filename

Path of the configuration file.

pymor.revstring[source]
pymor.__version__[source]
pymor.filename[source]
pymor.set_log_levels(levels=None)[source]

Set log levels for pyMOR’s logging facility.

Parameters

levels

Dict of log levels. Keys are names of loggers (see logging.getLogger), values are the log levels to set for the loggers of the given names (see setLevel).

pymor.set_log_format(max_hierarchy_level=1, indent_blocks=True, block_timings=False)[source]

Set log levels for pyMOR’s logging facility.

Parameters

max_hierarchy_level

The number of components of the loggers name which are printed. (The first component is always stripped, the last component always preserved.)

indent_blocks

If True, indent log messages inside a code block started with with logger.block(...).

block_timings

If True, measure the duration of a code block started with with logger.block(...).

pymor.quit_event_loop()[source]