perun.core

Core perun functionality.

Attributes

log

Classes

Perun

Perun object.

Module Contents

perun.core.log[source]
class perun.core.Perun(config: configparser.ConfigParser)[source]

Perun object.

config
warmup_round: bool = False
property comm: perun.comm.Comm

Lazy initialization of mpi communication object.

property hostname: str

Lazy initialization of hostname.

Returns:

Local rank hostname.

Return type:

str

property backends: dict[str, perun.backend.Backend]

Lazy initialization of backends dictionary.

Returns:

Dictionary of available backends.

Return type:

dict[str, Backend]

property host_rank: dict[str, list[int]]

Lazy initialization of host_rank dictionary.

Returns:

Dictionary with key (hostname) and values (list of ranks in host)

Return type:

dict[str, list[int]]

property l_available_sensors: dict[str, tuple]

Lazy initialization of local available sensors.

Returns:

Local available sensor.

Return type:

dict[str, tuple[str]]

property g_available_sensors: list[dict[str, tuple]]

Lazy initialization of global available sensors.

Returns:

Global available sensor.

Return type:

list[dict[str, tuple[str]]]

property g_assigned_sensors: list[dict[str, tuple]]

Lazy initialization of global sensors assignment.

Returns:

Local assigned sensors.

Return type:

list[dict[str, tuple[str]]]

property l_assigned_sensors: dict[str, tuple]

Lazy initialization of local assigned sensors.

Returns:

Local assigned sensors.

Return type:

dict[str, tuple[str]]

property l_host_metadata: dict[str, Any]

Lazy initialization of local metadata dictionary.

Returns:

Metadata dictionary

Return type:

dict[str, Any]

property l_backend_metadata: dict[str, Any]

Lazy initialization of local metadata dictionary.

Returns:

Metadata dictionary

Return type:

dict[str, Any]

mark_event(region_id: str) None[source]

Mark an event for a specific region.

Parameters:

region_id (str) – The ID of the region to mark the event for.

monitor_application(app: perun.monitoring.application.Application) tuple[perun.monitoring.monitor.MonitorStatus, Any][source]

Execute coordination, monitoring, post-processing, and reporting steps, in that order.

Parameters:

app (Path) – App script file path

Returns:

Return the output status from the monitoring process, and the last result of the application execution (if any).

Return type:

tuple[MonitorStatus, Any]

import_from(filePath: pathlib.Path, format: perun.io.io.IOFormat) perun.data_model.data.DataNode[source]

Import data node from given filepath.

Parameters:
  • filePath (Path) – Perun data node file path.

  • format (IOFormat) – File format.

Returns:

Imported DataNode.

Return type:

DataNode

export_to(dataOut: pathlib.Path, dataNode: perun.data_model.data.DataNode, format: perun.io.io.IOFormat, mr_id: str = '') None[source]

Export data to selected format.

Parameters:
  • dataOut (Path) – Directory where data will be saved.

  • dataNode (DataNode) – Data node to export.

  • format (IOFormat) – Format to export data.

  • mr_id (str, optional) – The id of the multi_run to be exported, the last one if left empty.