qcg.pilotjob.parseres module¶
-
qcg.pilotjob.parseres.
parse_resources_file
(config)¶
-
qcg.pilotjob.parseres.
get_resources
(config)¶ Return available resources according to environment.
Function returns available resources according to specified information source. The user may specify in configuration (
resources
configuration parameter) the information source. This parameter can take values:- auto (default one) - automatically detect the source of information
- local - detect information about number of nodes and cores from configuration parameters, and if they are not
- defined, detect local system number of cores (no remote nodes will be available)
- slurm - detect Slurm allocation resources
- Automatic detection of source of information checks (in following order):
- QCG-PilotJob parameters for resource definition
- Slurm allocation environment
- information about local system cores
Parameters: config (dict) – QCG-PilotJob configuration Returns: available resources information Return type: Resources Raises: ValueError
– for unknown value ofresources
configuration parameter value