pyiron.base.server.scheduler package

Submodules

pyiron.base.server.scheduler.cmmc module

class pyiron.base.server.scheduler.cmmc.Cmmc(working_directory=None, scheduler_name=None, cores=None, runtime=20000, wait_for_job_id=False, return_que_id=True)[source]

Bases: pyiron.base.server.scheduler.generic.JobScheduler

Example Cluster configuration for the CMMC cluster of the Max Planck Institute fuer Eisenforschung

Parameters:
  • working_directory (str) – working directory - None by default
  • scheduler_name (str) – scheduler name - None by default
  • cores (int) – number of cores - None by default
  • runtime (int) – run time in seconds - 20000 by default
  • wait_for_job_id (int) – wait for a specific job id - False by default
  • return_que_id (bool) – [True/False] - True by default

pyiron.base.server.scheduler.generic module

class pyiron.base.server.scheduler.generic.JobScheduler(scheduler_command, schedulers_available, scheduler_default, scheduler_script_name, scheduler_wrapper, scheduler_options)[source]

Bases: object

The job scheduler is an abstract class which is implemented by the individual servers and handles the communication between the internal job scheduling and the job scheduling provided by the server.

Parameters:
  • scheduler_command (str) – job scheduler command
  • schedulers_available (list) – list of available job schedulers, each as a Que object
  • scheduler_default (str) – name of the default scheduler
  • scheduler_script_name (str) – name of the scheduler script
  • scheduler_wrapper (list) – content of the scheduler script
  • scheduler_options (dict) – scheduler command line options
active_scheduler

Get a que for the current simulation

Returns:Queue object
Return type:(Queue)
available_schedulers_dict()[source]

Display all available queues and their settings

Returns:dictionary of all available queues
Return type:dict
cores

Get the number of cores selected for the current simulation

Returns:number of cores
Return type:int
list_scheduler_options()[source]

Generate the list of queue options including the queue command, so it can be used as input for an sub process.

Returns:list of queue options
Return type:list
quick_config(working_directory=None, scheduler_name=None, cores=None, runtime=None, wait_for_job_id=None, return_que_id=False)[source]

Quick configuration of the Job Scheduler, sets all necessary properties, especially useful for tests.

Parameters:
  • working_directory (str) – working directory - None by default
  • scheduler_name (str) – scheduler name - None by default
  • cores (int) – number of cores - None by default
  • runtime (int) – run time in seconds - None by default
  • wait_for_job_id (int) – wait for a specific job id - None by default
  • return_que_id (bool) – [True/False] - False by default
return_scheduler_id

Some job schedulers are able to return the internal job scheduler job ID, which can be helpful for complex simulation protocols.

Returns:[True/False]
Return type:bool
run_time

Get the run_time for the current simulation

Returns:run time in seconds
Return type:int
script_name

Get the name of the script submitted to the queing system usually a bash script named run_queue.sh .

Returns:script name
Return type:str
support_cores_limit

Verify that the QueSystem is able to execute multicore jobs.

Returns:[True/False]
Return type:bool
support_run_time_limit

Verify that the QueSystem is able to stop an existing job after it reached its runtime limit.

Returns:[True/False]
Return type:bool
support_wait_for_prev_job

Verify that the QueSystem is able to wait for an existing job to be finished first based on the que id.

Returns:[True/False]
Return type:bool
support_working_directory

Verify that the QueSystem is able to force the execution to a specific directory.

Returns:[True/False]
Return type:bool
wait_for_job_id

Get the Queue ID the current job waits for until it is released from the queuing system

Returns:queue ID
Return type:int
working_directory

Get the working directory for the current simulation.

Returns:absolute path of the working directory
Return type:str
wrapper

Get the shell script which is executed by the queuing system, it usually contains a shell specification and the run_job.py command.

Returns:job wrapper script splitted by lines
Return type:list
write_wrapper(job_id=None)[source]

Write the wrapper script based on the information stored in self.wrapper into the script self.script_name.

pyiron.base.server.scheduler.generic.QUEUE_SCRIPT_SUFFIX = '.sh'

JobScheduler class - template for job schedulers

pyiron.base.server.scheduler.localhost module

class pyiron.base.server.scheduler.localhost.Localhost(working_directory=None, scheduler_name=None, cores=None, runtime=None, wait_for_job_id=None, return_que_id=None)[source]

Bases: pyiron.base.server.scheduler.generic.JobScheduler

Example Cluster configuration for an local host system without a real queuing system, mainly designed for development and testing purposes.

Parameters:
  • working_directory (str) – working directory - None by default
  • scheduler_name (str) – scheduler name - None by default
  • cores (int) – number of cores - None by default
  • runtime (int) – run time in seconds - None by default
  • wait_for_job_id (int) – wait for a specific job id - None by default
  • return_que_id (bool) – [True/False] - None by default

Module contents