mpacts.core. configuration

In order to be able to use this module import it like this:

import mpacts.core.configuration
#or assign it to a shorter name
import mpacts.core.configuration as con

ContactDataStorageConfiguration

class mpacts.core.configuration.ContactDataStorageConfiguration

Bases: mpacts.core.baseobject.BaseObject

Configuration object for contactdata storage

object __init__(tuple args, dict kwds)

ContactDataStorageConfiguration(name, parent, **kwargs)

ParallelConfiguration

class mpacts.core.configuration.ParallelConfiguration

Bases: mpacts.core.baseobject.BaseObject

Configuration object parallel performance

object __init__(tuple args, dict kwds)

ParallelConfiguration(name, parent, **kwargs)

RandomNumberGeneratorConfiguration

class mpacts.core.configuration.RandomNumberGeneratorConfiguration

Bases: mpacts.core.baseobject.BaseObject

Configuration object for random number generation

object __init__(tuple args, dict kwds)

RandomNumberGeneratorConfiguration(name, parent, **kwargs)

UnitConfiguration

class mpacts.core.configuration.UnitConfiguration

Bases: mpacts.core.baseobject.BaseObject

Configuration object for dealing with units

object __init__(tuple args, dict kwds)

UnitConfiguration(name, parent, **kwargs)
mpacts.core.configuration.compiler_info() → str :

Returns a string describing the name and version number of the compiler used to compile this version of mpacts.

mpacts.core.configuration.contactdatastorage_configuration() → BaseObject :

The returned BaseObject has a property ‘default_factory’ which you can set to your preferred default ContactDataStorageFactory, e.g. ‘ContactDataStorageFactoryMappedMatrix’ (default) or ‘ContactDataStorageFactoryVector’.

mpacts.core.configuration.disable_fp_exceptions() → None :

This does what its name claims on gcc.

mpacts.core.configuration.enable_fp_exceptions() → None :

This does what its name claims, but only using gcc, and if you are also using e.g. numpy, be aware that this will turn floating-point exception off again.

mpacts.core.configuration.git_revision() → str :

If the git information is compiled-in, this gets it.

mpacts.core.configuration.is_debug_version() → bool :

Check if the DEBUG macro was used to compile.

mpacts.core.configuration.parallel_configuration() → BaseObject :

The returned BaseObject has three properties: a writable ‘n_threads’, which allows you to set with how many threads you want to run, ‘parallel_grainsize’ which allow you to set the size of the batch to be processed by a single thread and a read-only ‘is_multithreaded’ to allow for a quick check.

mpacts.core.configuration.rng_configuration() → BaseObject :

The returned BaseObject has a property ‘random_seed’ that you want to set...

mpacts.core.configuration.unit_configuration() → BaseObject :

The returned BaseObject sets the behavior of the unit system and how strict units are enforced.