Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# `aiida.schedulers`

## Package Contents

### Classes

`JobInfo` |
`JobResource` |
`JobState` |
`JobTemplate` |
`MachineInfo` |
`NodeNumberJobResource` |
`ParEnvJobResource` |
`Scheduler` |
`SchedulerError` |
`SchedulerParsingError` |

### API

class aiida.schedulers.JobInfo(dictionary=None)

  Bases: `aiida.common.extendeddicts.DefaultFieldsAttributeDict`

  Initialization

  _default_fields = ('job_id', 'title', 'exit_status', 'terminating_signal', 'annotation', 'job_state', 'job_substate', ...
  _special_serializers = None
  static _serialize_job_state(job_state)
  static _deserialize_job_state(job_state)
  static _serialize_date(value)
  static _deserialize_date(value)
  classmethod serialize_field(value, field_type)
  classmethod deserialize_field(value, field_type)
  serialize()
  get_dict()
  classmethod load_from_dict(data)
  classmethod load_from_serialized(data)

class aiida.schedulers.JobResource(dictionary=None)

  Bases: `aiida.common.extendeddicts.DefaultFieldsAttributeDict`

  Initialization

  _default_fields = None
  abstract classmethod validate_resources(**kwargs)
  classmethod get_valid_keys()
  abstract classmethod accepts_default_mpiprocs_per_machine()
  classmethod accepts_default_memory_per_machine()
  abstract get_tot_num_mpiprocs()

class aiida.schedulers.JobState(*args, **kwds)

  Bases: `enum.Enum`

  Initialization

  UNDETERMINED = 'undetermined'
  QUEUED = 'queued'
  QUEUED_HELD = 'queued held'
  RUNNING = 'running'
  SUSPENDED = 'suspended'
  DONE = 'done'

class aiida.schedulers.JobTemplate(dictionary=None)

  Bases: `aiida.common.extendeddicts.DefaultFieldsAttributeDict`

  Initialization

  _default_fields = ('shebang', 'submit_as_hold', 'rerunnable', 'job_environment', 'environment_variables_double_quotes'...

class aiida.schedulers.MachineInfo(dictionary=None)

  Bases: `aiida.common.extendeddicts.DefaultFieldsAttributeDict`

  Initialization

  _default_fields = ('name', 'num_mpiprocs', 'num_cpus')

class aiida.schedulers.NodeNumberJobResource(**kwargs)

  Bases: `aiida.schedulers.datastructures.JobResource`

  Initialization

  _default_fields = ('num_machines', 'num_mpiprocs_per_machine', 'num_cores_per_machine', 'num_cores_per_mpiproc')
  classmethod validate_resources(**kwargs)
  classmethod get_valid_keys()
  classmethod accepts_default_mpiprocs_per_machine()
  get_tot_num_mpiprocs()

class aiida.schedulers.ParEnvJobResource(**kwargs)

  Bases: `aiida.schedulers.datastructures.JobResource`

  Initialization

  _default_fields = ('parallel_env', 'tot_num_mpiprocs')
  classmethod validate_resources(**kwargs)
  classmethod accepts_default_mpiprocs_per_machine()
  get_tot_num_mpiprocs()

class aiida.schedulers.Scheduler

  Initialization

  _logger = None
  _features: Dict[str, bool] = None
  _job_resource_class: Type[aiida.schedulers.datastructures.JobResource] = None
  __str__()
  classmethod preprocess_resources(resources, default_mpiprocs_per_machine=None)
  classmethod validate_resources(**resources)
  classmethod get_short_doc()
  get_feature(feature_name: str) → bool
  property logger
  job_resource_class() → Type[aiida.schedulers.datastructures.JobResource]
  classmethod create_job_resource(**kwargs)
  get_submit_script(job_tmpl)
  _get_submit_script_environment_variables(template)
  abstract _get_submit_script_header(job_tmpl)
  _get_submit_script_footer(job_tmpl)
  _get_run_line(codes_info, codes_run_mode)
  abstract _get_joblist_command(jobs=None, user=None)
  _get_detailed_job_info_command(job_id)
  get_detailed_job_info(job_id)
  abstract _parse_joblist_output(retval, stdout, stderr)
  get_jobs(jobs=None, user=None, as_dict=False)
  property transport
  set_transport(transport)
  abstract _get_submit_command(submit_script)
  abstract _parse_submit_output(retval, stdout, stderr)
  submit_from_script(working_directory, submit_script)
  kill(jobid)
  abstract _get_kill_command(jobid)
  abstract _parse_kill_output(retval, stdout, stderr)
  parse_output(detailed_job_info=None, stdout=None, stderr=None)

class aiida.schedulers.SchedulerError

  Bases: `aiida.common.exceptions.AiidaException`

class aiida.schedulers.SchedulerParsingError

  Bases: `aiida.schedulers.scheduler.SchedulerError`