Guide: Configuring Custom Variables for Cluster Job Submission Scripts
Last updated
Last updated
The information in this section applies to CryoSPARC v4.1+.
User-set variables can be injected into cluster submission scripts before a job is queued. This may be useful for running jobs with different submission parameters on-the-fly, such as adjusting memory requirements in accordance with job resource demands, or keeping track of user quotas.
Custom variables can be configured at the instance level, the target level, and the job level.
Instance-wide and per-target level custom variables for cluster job submissions can be configured in the "Cluster Configuration" tab of the Admin Panel.
At the instance level, custom variables and their values will be applied to all targets which include the respective custom variables in their templates. If a target's submission script does not contain an instance level custom variable, that custom variable will not apply to the target.
At the target level, template variable names are parsed from the cluster submission script. Variables parsed from a target's script can be assigned values specific to that target. Any values for custom variables applied at the target level will override those that are set at the instance level. For example, if the custom instance level variable var
is set to 'x' and the custom target level variable var
is set to 'y', the value 'y' will be applied when the job is queued to the cluster.
At the job level, the values of instance level and target level custom variables can be modified before the job is queued. Modifications of the custom variable values at this level will override the default values set at the target level and instance level. Similarly to the previous example, if there is an instance level custom variable var
set to 'x', there is a target level custom variable var
set to 'y', and var
is set to 'z' at the job level, then the value 'z' will be applied when the job is queued to the cluster.
To edit a custom variable at the job level, a dropdown menu will appear after selecting a cluster lane while queueing a job. Instance level and target level custom variables will appear here, as well as editable variables provided by CryoSPARC.
Below is a list of internal variables set by CryoSPARC that cannot be used as custom variables or be overridden by custom variables.
num_cpu
, num_gpu
, and ram_gb
are script variables provided by CryoSPARC specifying the job's estimated required resources needed to run. Sometimes before submitting jobs to a cluster, these values may need to be adjusted depending on the accuracy of the job's required resources estimation. Custom cluster script variables can be used in this case to modify the values requested of the cluster.
For example, below is a SLURM cluster configuration where the value for the amount of RAM required is modified by a ram_gb_multiplier
custom variable.
Default values for the custom variables are required for Cluster Setup Testing