pycoupler.submit_lpjml#
- pycoupler.submit_lpjml(config_file, group='copan', sclass='short', ntasks=256, wtime=None, dependency=None, blocking=None, option=None, couple_to=None, venv_path=None)[source]#
Submit LPJmL run to Slurm using lpjsubmit and a generated (class LpjmlConfig) config file.
Provide arguments for Slurm sbatch depending on the run. Similar to R function lpjmlKit::submit_lpjml.
- Parameters:
config_file (str) – File name including path if not current to config_file
group (str, optional) – PIK group name to be used for Slurm. Defaults to “copan”.
sclass (str, optional) – Define the job classification, options are “short”, “medium”, “long”, “priority”, “standby”, “io”. For more information have a look at <https://www.pik-potsdam.de/en>. Defaults to “short”.
ntasks (int/str, optional) – Define the number of tasks/threads. More information at <https://www.pik-potsdam.de/en> and <https://slurm.schedmd.com/sbatch.html>. Defaults to 256.
wtime (str, optional) – Define the time limit. Setting a lower time limit than the maximum runtime for sclass can reduce the wait time in the SLURM job queue. More information at <https://www.pik-potsdam.de/en> and <https://slurm.schedmd.com/sbatch.html>.
dependency (int/str, optional) – If there is a job that should be processed first (e.g. spinup) then pass its job id here.
blocking (int, optional) – Cores to be blocked. More information at <https://www.pik-potsdam.de/en> and <https://slurm.schedmd.com/sbatch.html>.
option (str/list, optional) – Additional options to be passed to lpjsubmit. Can be a string or a list of strings.
couple_to (str, optional) – Path to program/model/script LPJmL should be coupled to
venv_path (str, optional) – Path to a venv to run the coupled script in. This should be the path to the top folder of the venv. If not set, python3 in PATH is used.
- Returns:
The submitted jobs id if submitted successfully.
- Return type: