Runner class
Runners are run on systems (desktop/servers) where the atomistic
simulations (or other related functions) are to be performed.
Runner name |
Runner Type |
Description |
Slurm |
||
Terminal |
A terminal based runner for simple tasks |
Multiple Runners can be attached to a database, running on their
respective machines. The Runners distinguish their rows by the
runner key_value_pairs
of the database row.
The BaseRunner class defines basic functions for each
kind of runner.
- class runner.runner.BaseRunner(name, database='database.db', interpreter='#!/bin/bash', pre_runner_data=None, max_jobs=50, cycle_time=30, keep_run=False, run_folder='./', multi_fail=0, logfile=None)[source]
Runner runs tasks
- Parameters:
database (str) – ASE database to connect
interpreter (str) – the interpreter for the shell
pre_runner_data (
RunnerData) – pre-run runnerdata Files, tasks, and scheduler_options can be added to be added to all the runs handled by this runner.max_jobs (int) – maximum number of jobs running at an instance
cycle_time (int) – time in seconds
keep_run (bool) – keep the folder in which the run was performed
run_folder (str) – the folder that needs to be populated
multi_fail (int) – The number of re-runs on failure
logfile (str) – log file for logging
- classmethod from_database(name, database)[source]
Get runner from database
- Parameters:
name (str) – name of runner
database (str) – database
- Returns:
returns relevant runner class
- Return type:
- get_job_id(input_id)[source]
Returns job id (slurm id, process id etc) depending on workflow manager of a running row.
- Parameters:
input_id (int) – Row id
- Returns:
job_id of input_id if running, else None
- Return type:
int or None
Status of run
The Runner runs based on a status key_value_pairs
in the database.
The status is given as:
Status |
Description |
‘submit’ |
Indicates the |
‘cancel’ |
Indicates the |
‘running’ |
|
‘failed’ |
|
‘done’ |
|
Note
When the status is set to cancel, the Runner changes the status to
‘failed’ after cancelling the run.
Runners
The BaseRunner is inherited by following implemented
runners: