perun.monitoring.subprocess =========================== .. py:module:: perun.monitoring.subprocess .. autoapi-nested-parse:: Perun subprocess module. Attributes ---------- .. autoapisummary:: perun.monitoring.subprocess.log Functions --------- .. autoapisummary:: perun.monitoring.subprocess.prepSensors perun.monitoring.subprocess.createNode perun.monitoring.subprocess.perunSubprocess Module Contents --------------- .. py:data:: log .. py:function:: prepSensors(backends: Dict[str, perun.backend.Backend], l_assigned_sensors: Dict[str, Tuple]) -> Tuple[perun.data_model.measurement_type.MetricMetaData, List[perun.data_model.sensor.Sensor]] Prepare sensors for monitoring. :param backends: A dictionary of backends. :type backends: Dict[str, Backend] :param l_assigned_sensors: A dictionary of sensor configurations. :type l_assigned_sensors: Dict[str, Tuple] :returns: A tuple containing the following: - timesteps (List[int]): A list of timesteps. - t_metadata (MetricMetaData): Metadata for the metrics. - rawValues (List[List[Number]]): A list of raw sensor values. - lSensors (List[Sensor]): A list of sensors. :rtype: Tuple[List[int], MetricMetaData, List[List[Number]], List[Sensor]] .. py:function:: createNode(timesteps: List[int], t_metadata: perun.data_model.measurement_type.MetricMetaData, rawValues: List[List[perun.data_model.measurement_type.Number]], lSensors: List[perun.data_model.sensor.Sensor], perunConfig: configparser.ConfigParser) -> perun.data_model.data.DataNode Create a data node from the sensor data. :param timesteps: A list of timesteps. :type timesteps: List[int] :param t_metadata: Metadata for the metrics. :type t_metadata: MetricMetaData :param rawValues: A list of raw sensor values. :type rawValues: List[List[Number]] :param lSensors: A list of sensors. :type lSensors: List[Sensor] :param perunConfig: The perun configuration. :type perunConfig: ConfigParser :returns: A data node. :rtype: DataNode .. py:function:: perunSubprocess(queue: multiprocessing.Queue, rank: int, l_assigned_sensors: Dict[str, Tuple], perunConfig: configparser.ConfigParser, sp_ready_event: multiprocessing.synchronize.Event, start_event: multiprocessing.synchronize.Event, stop_event: multiprocessing.synchronize.Event, close_event: multiprocessing.synchronize.Event, sampling_period: float) -> None Parallel function that samples energy values from hardware libraries. :param queue: Multiprocessing Queue object where the results are sent after finish :type queue: Queue :param rank: Local MPI Rank :type rank: int :param l_assigned_sensors: Local MPI rank sensor configuration :type l_assigned_sensors: Dict[str, Tuple] :param perunConfig: Global perun configuration :type perunConfig: ConfigParser :param sp_ready_event: Indicates monitoring supbrocess is ready, multiprocessing module :type sp_ready_event: EventClass :param start_event: Indicates start of the monitored application :type start_event: EventClass :param stop_event: Indicates the stop of a monitored application :type stop_event: EventClass :param close_event: Indicates that perun is closing, and the subprocess needs to close :type close_event: EventClass :param sampling_period: Sampling period in seconds :type sampling_period: float