matflow.ElementResources#
- class matflow.ElementResources(scratch: 'Optional[str]' = None, parallel_mode: 'Optional[ParallelMode]' = None, num_cores: 'Optional[int]' = None, num_cores_per_node: 'Optional[int]' = None, num_threads: 'Optional[int]' = None, num_nodes: 'Optional[int]' = None, scheduler: 'Optional[str]' = None, shell: 'Optional[str]' = None, use_job_array: 'Optional[bool]' = None, max_array_items: 'Optional[int]' = None, time_limit: 'Optional[str]' = None, scheduler_args: 'Optional[Dict]' = None, shell_args: 'Optional[Dict]' = None, os_name: 'Optional[str]' = None, environments: 'Optional[Dict]' = None, SGE_parallel_env: 'str' = None, SLURM_partition: 'str' = None, SLURM_num_tasks: 'str' = None, SLURM_num_tasks_per_node: 'str' = None, SLURM_num_nodes: 'str' = None, SLURM_num_cpus_per_task: 'str' = None)#
Bases:
ElementResources
Methods
Get a tuple of resource attributes that are used to filter environment executable instances at submit- and run-time.
Get hash from all arguments that distinguish jobscripts.
Validate the values for os_name, shell and scheduler against those supported on this machine (as specified by the app configuration).
Attributes
Returns True if any SLURM-specific arguments indicate a parallel job.
Returns True if any scheduler-agnostic arguments indicate a parallel job.
- Parameters:
scratch (str | None) –
parallel_mode (ParallelMode | None) –
num_cores (int | None) –
num_cores_per_node (int | None) –
num_threads (int | None) –
num_nodes (int | None) –
scheduler (str | None) –
shell (str | None) –
use_job_array (bool | None) –
max_array_items (int | None) –
time_limit (str | None) –
scheduler_args (Dict | None) –
shell_args (Dict | None) –
os_name (str | None) –
environments (Dict | None) –
SGE_parallel_env (str) –
SLURM_partition (str) –
SLURM_num_tasks (str) –
SLURM_num_tasks_per_node (str) –
SLURM_num_nodes (str) –
SLURM_num_cpus_per_task (str) –
- property SLURM_is_parallel: bool#
Returns True if any SLURM-specific arguments indicate a parallel job.
- app = App(name='MatFlow', version='0.3.0a129')#
- classmethod from_json_like(json_like, shared_data=None)#
- Parameters:
json_like (Union[Dict, List]) –
shared_data (Optional[Dict[str, ObjectList]]) –
- static get_default_os_name()#
- classmethod get_default_scheduler(os_name, shell_name)#
- classmethod get_default_shell()#
- static get_env_instance_filterable_attributes()#
Get a tuple of resource attributes that are used to filter environment executable instances at submit- and run-time.
- get_jobscript_hash()#
Get hash from all arguments that distinguish jobscripts.
- property is_parallel: bool#
Returns True if any scheduler-agnostic arguments indicate a parallel job.
- set_defaults()#
- to_dict()#
- to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
- validate_against_machine()#
Validate the values for os_name, shell and scheduler against those supported on this machine (as specified by the app configuration).