nipoppy.workflows.services.hpc.HPCRunner¶
- class nipoppy.workflows.services.hpc.HPCRunner(hpc_cluster, hpc_config, subcommand, dpath_root, dpath_hpc, pipeline_name, pipeline_version=None, pipeline_step=None, preamble=None, queue_limit=None, keep_workdir=False, fpath_layout=None, verbose=False)¶
Class for generating and submitting HPC jobs via PySQA.
- Parameters:
hpc_cluster (str)
hpc_config (nipoppy.config.hpc.HpcConfig)
subcommand (str)
dpath_root (nipoppy.env.StrOrPathLike)
dpath_hpc (nipoppy.env.StrOrPathLike)
pipeline_name (str)
pipeline_version (str | None)
pipeline_step (str | None)
queue_limit (int | None)
keep_workdir (bool)
fpath_layout (nipoppy.env.StrOrPathLike | None)
verbose (bool)
- generate_cli_command(participant_id, session_id, *, extra_flags=None, extra_options=None)¶
Generate the CLI command for a participant-session combination.
Skips the –simulate, –hpc, –write-list and –dry-run options.
- Parameters:
- Returns:
The CLI command as a list of string tokens.
- Return type:
- submit(job_name, job_array_commands, participant_ids, session_ids, dpath_work, dpath_hpc_logs, fname_hpc_error, fname_job_script, pipeline_name, pipeline_version, pipeline_step, dry_run=False)¶
Submit a job to the HPC scheduler.
- Parameters:
job_name (str) – Name of the job to submit.
job_array_commands (list) – List of commands to run.
participant_ids (list) – List of participant IDs associated with the job.
session_ids (list) – List of session IDs associated with the job.
dpath_work (Path) – Working directory for the job.
dpath_hpc_logs (Path) – Directory where HPC logs will be saved.
fname_hpc_error (str) – Filename of the HPC error log.
fname_job_script (str) – Filename of the job script to generate.
pipeline_name (str) – Name of the pipeline being run.
pipeline_version (str) – Version of the pipeline being run.
pipeline_step (str) – Step of the pipeline being run.
dry_run (bool, optional) – Whether to only generate the script without submitting, by default False.
- Returns:
The number of jobs submitted
- Return type:
- dpath_hpc¶
- dpath_root¶
- fpath_layout = None¶
- hpc_cluster¶
- hpc_config¶
- keep_workdir = False¶
- pipeline_name¶
- pipeline_step = None¶
- pipeline_version = None¶
- preamble = None¶
- queue_limit = None¶
- subcommand¶
- verbose = False¶