mpacts.tools. system_info

Collection of functions that provide information of the hardware and software environment, the build information of the current version of mpacts, as well as the general settings of mpacts that can be set globally (such as the number of threads, or the contact data storage type). This information will be stored automatically in hdf5 data files and is useful for diagnostics and benchmarking purposes.

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

import mpacts.tools.system_info
#or assign it to a shorter name
import mpacts.tools.system_info as sys
mpacts.tools.system_info._guess_processor_name()
mpacts.tools.system_info.list_all_contactdetectors(sim)
mpacts.tools.system_info.mpacts_contactdatastorage_name(sim)

Finds out the contact data storage type by looping over all contact detectors and extracting their contact data storage. If different contact data storages are found, the last one found will be returned.

Parameters:sim (mpacts.core.simulation.Simulation) – a valid mpacts simulation object
mpacts.tools.system_info.mpacts_cpp_compiler()

C++ compiler that was used to build the current version of mpacts

mpacts.tools.system_info.mpacts_git_branch()

Branch for the compilation

mpacts.tools.system_info.mpacts_git_revision()

Revision number in the central repository of the currently used build of mpacts

mpacts.tools.system_info.mpacts_is_debug_version()

Specifies whether the currently library of mpacts is a debug build or not

mpacts.tools.system_info.process_elapsed_time()

Elapsed real time since a fixed point in the past (in seconds) as specified by the os.times() function. This method is not available in Windows-based system. For these process_elapsed_time() will return -1

mpacts.tools.system_info.process_n_threads()

Returns the number of threads currently available for multi-threaded builds and 1 for single-threaded builds of mpacts

mpacts.tools.system_info.process_peak_memory(unit='MB')

Returns the peak memory used by the (calling) process For Windows operating systems, this will return -1, since the underlying ‘resource’ module is not available.

Parameters:unit (str) – unit of memory to be reported (‘B’, ‘kB’, ‘MB’ or ‘GB’ are accepted).
mpacts.tools.system_info.process_system_time()

Total ‘system’ time taken up by the current process (in seconds)

mpacts.tools.system_info.process_user_time()

Total ‘user’ time taken up by the current process (in seconds)

mpacts.tools.system_info.system_architecture()

Hardware architecture of the underlying system (e.g. x86_64, or arm). Level of detail provided might vary between different platforms.

mpacts.tools.system_info.system_cpu_info()

Technical information about the central processing unit (CPU)

mpacts.tools.system_info.system_libc_version()

Version of C standard library (libc) that is used by this system

mpacts.tools.system_info.system_linux_distribution()

If the current system is a Linux distribution, returns the distribution name and version, if the current system is not a Linux distribution, this will return an empty string

mpacts.tools.system_info.system_node_name()

Returns the name of the currently used computing node in which this process is running (e.g. the system’s host name in Linux).

mpacts.tools.system_info.system_os_family()

Family of operating system used, e.g. Windows, Darwin (=Mac), or Linux

mpacts.tools.system_info.system_python_implementation()

Specifies the currently used implementation of Python (e.g. CPython, JPython, RPython).

mpacts.tools.system_info.system_python_version()

Version of the python interpreter that is used by mpacts

mpacts.tools.system_info.system_release()

Release version of the system’s kernel