Skip to content

Other potentially useful submission options or techniques

Capturing job submission information

fsl_sub can store the commands used to submit the job if you provide the option --keep_jobscript. When provided, post submission you will find a file in the current folder (assuming you have write permissions there) a script called wrapper-<jobid>.sh. This exact submission may be repeated by using:

fsl_sub -F wrapper-<jobid>.sh

​​The script contents is described below:

  • ​#!/bin/bash - ​Run the script in BASH
  • #SBATCH OPTION - SLURM options​​ ​
  • ​module load <module name> - Load a Shell Module
  • # Built by fsl_sub v.2.3.0 and fsl_sub_plugin_sge v.1.3.0 - ​Version of fsl_sub and plugin that submitted the job
  • ​# Command line: <command line> - ​Command line that invoked fsl_sub
  • ​# Submission time (H:M:S DD/MM/YYYY) <date/time> - ​Date and time that the job was submitted
  • ​<command> - command to run...

Passing environment variables to queued jobs

It is not possible to inherit all the environment variables from the shell that submits a job, so fsl_sub allows you to specify environment variables that should be transferred to the job. This can also be useful if you are scheduling many similar tasks and need to specify a different value for an environment variable for each run, for example SUBJECTS_DIR which FreeSurfer uses to specify where your data sets reside. The --export option is used for this purpose.

Skipping command validation

By default fsl_sub will check the command given (or the commands in the lines in an array task file) can be found and are executable. If this causes issues, often because a particular program is only available on the compute nodes, not on the submission host, then you can disable this check with -n (--novalidation).

Requesting a specific resource

Some resources may have a limited quantity available for use, e.g. software licenses or RAM. fsl_sub has the ability to request these resources from the cluster (the --coprocessor options do this to automatically to request the appropriate number of GPUs). The option -r (--resource) allows you to pass a resource string directly through to the SLURM software. If you need to do this you will be advised by the computing help team or software documentation the exact string to pass.