Batch Systems
🪵 How to use different known batch systems for scalable job execution.
Last updated
🪵 How to use different known batch systems for scalable job execution.
Last updated
Currently Isabl supports out-of-the-box the following Batch Systems to submit jobs with isabl_cli
:
Batch System | Import string | Resources |
---|---|---|
By default, all submissions are run locally using isabl_cli.batch_systems.submit_local
What about other systems?
To support other systems or to customize your own submission steps, you may need just to create your own method and define it on your isabl_cli
's SUBMIT_ANALYSES
setting.
Example:
For help, creating your custom submit method, follow direction from the existing ones.
Please consider contributing any new one to the Isabl Project!
isabl_cli
's settings have a SUBMIT_CONFIGURATION
dictionary to provide extra arguments to the submission methods. Current parameters used are:
Attribute | Type | Description | Example value |
---|---|---|---|
When running jobs using batch systems like LSF or Slurm, many programs detect whether their output is being sent to a terminal (TTY
) or a file and may disable features like color formatting or progress bars if they detect non-interactive output.
One workaround, using it carefully, is to use the unbuffer
utility from the expect
package. unbuffer
simulates a terminal by running the program in a pseudo-terminal (PTY), tricking the program into thinking it is running interactively in a terminal, so it continues to produce colored output.
Requirements:
Have unbuffer
available. See tips on how to install on an HPC.
unbuffer: True
, in your isabl_cli
s SUBMIT_CONFIGURATION
.
>=0.3.28
version of @papaemmelab/isabl_web
8c8ad75 commit of isabl_cli
Unbuffered output will redirect both stdout/stderr to the samehead_job.log
file, causing the file head_job.err
output to be empty from errors of the running application.
By simulating a pseudo-PTY, you can gain desired colored outputs, but some outputs like progress bars print undesired characters that can clutter your logs. Be aware to disable those if possible (i.e. toil ... --disableProgress),
or for specific applications add a dummy envTERM=dumb
to tell the program there's no effective terminal attached.
unbuffer
in an HPC with miniconda. Having $OPT_DIR
where you install your packages and $BIN_DIR
where you add your executable binaries, create a runnable script called unbuffer
, where you add your miniconda env's unbuffer
executable and add its shared libraries:
Test it works:
LSF
isabl_cli.batch_systems.submit_lsf
See more IBM Spectrum LSF Reference
Slurm
isabl_cli.batch_systems.submit_slurm
See more Slurm - Worload Manager
SGE
isabl_cli.batch_systems.submit_sge
See more Sun Grid Engine - queueing system
extra_args
String
Any additional extra arguments passed to the batch submission command.
" --time=48:00:00 "
. Add a maximum job array time.
get_requirements
Import String
To define custom resources needs for different applications or methods.
See the example above.
throttle_by
Integer
To control the maximum number of jobs running simultaneously in a job array submission.
50
unbuffer
Boolean
redirect stdout and stderr to same file with ascii characters that allow colored logs.
True
. If not defined, it is False
by default. See Colored Logs.