perun.monitoring.subprocess
Perun subprocess module.
Module Contents
Functions
|
Prepare sensors for monitoring. |
|
|
|
Create a data node from the sensor data. |
|
Parallel function that samples energy values from hardware libraries. |
Attributes
- perun.monitoring.subprocess.log
- perun.monitoring.subprocess.prepSensors(backends: Dict[str, perun.backend.backend.Backend], l_sensors_config: Dict[str, Set[str]]) Tuple[List[int], perun.data_model.measurement_type.MetricMetaData, List[List[numpy.number]], List[perun.data_model.sensor.Sensor]]
Prepare sensors for monitoring.
Parameters
- backendsDict[str, Backend]
A dictionary of backends.
- l_sensors_configDict[str, Set[str]]
A dictionary of sensor configurations.
Returns
- Tuple[List[int], MetricMetaData, List[List[np.number]], List[Sensor]]
A tuple containing the following: - timesteps (List[int]): A list of timesteps. - t_metadata (MetricMetaData): Metadata for the metrics. - rawValues (List[List[np.number]]): A list of raw sensor values. - lSensors (List[Sensor]): A list of sensors.
- perun.monitoring.subprocess._monitoringLoop(lSensors: List[perun.data_model.sensor.Sensor], timesteps: List[int], rawValues: List[List[numpy.number]], stopCondition: Callable[[], bool])
- perun.monitoring.subprocess.createNode(timesteps: List[int], t_metadata: perun.data_model.measurement_type.MetricMetaData, rawValues: List[List[numpy.number]], lSensors: List[perun.data_model.sensor.Sensor], perunConfig: configparser.ConfigParser) perun.data_model.data.DataNode
Create a data node from the sensor data.
Parameters
- timestepsList[int]
A list of timesteps.
- t_metadataMetricMetaData
Metadata for the metrics.
- rawValuesList[List[np.number]]
A list of raw sensor values.
- lSensorsList[Sensor]
A list of sensors.
- perunConfigConfigParser
The perun configuration.
Returns
- DataNode
A data node.
- perun.monitoring.subprocess.perunSubprocess(queue: multiprocessing.Queue, rank: int, backends: Dict[str, perun.backend.backend.Backend], l_sensors_config: Dict[str, Set[str]], perunConfig: configparser.ConfigParser, sp_ready_event, start_event, stop_event, sampling_rate: float)
Parallel function that samples energy values from hardware libraries.
Parameters
- queueQueue
Multiprocessing Queue object where the results are sent after finish
- rankint
Local MPI Rank
- backendsList[Backend]
Available backend list
- l_sensors_configDict[str, Set[str]]
Local MPI rank sensor configuration
- sp_ready_event_type_
Indicates monitoring supbrocess is ready, multiprocessing module
- start_event_type_
Indicates app start, multiprocessing module
- stop_event_type_
Indicates app stop, multiprocessing module
- sampling_ratefloat
Sampling rate in seconds