Other schedulers
This chapter provides some instructions to use Flux on a cluster using another Batch Scheduler than PBS.
Run Flux in command line
Most of the requirements to use Flux through a Batch scheduler are actually the same as running Flux in command line. You can refer to this documentation: How to run Flux in command lines?. You’ll see how to set all the mandatory environment variables for:
- Memory management (JVM_MEMORY, MEMSIZC3, MEMSIZN3)
- Core management (FLUX_NCORES)
# Run Flux
$PATH_TO_FLUX_EXECUTABLE -application $FLUX_APP -runPyInSilentModeAndExit
$YOUR_PYTHON_SCRIPT -batch
Batch scheduler specific settings
Regarding a batch scheduler use for Flux, some additional settings are needed.
export FLUX_NODEFILE=$PBS_NODEFILE
Parametric distribution
- FLUX_PARAMETRIC: Indicator for using parametric distribution. Must be set to true
- FLUX_PARAM_AUTO: Indicator for using automatic or manual
computation of number of jobs. Must be set to Automatic
or Manual
- In Automatic, Flux will submit a maximum of 127 jobs (+1 for the master) to solve the project. The number of solved parameters per job is automatically computed, and if there are less than 127 parameters, each job will solve 1 parameter.
- In Manual mode, the environment variable FLUX_PARAM_MAXJOBS must be set to the maximum number of cores you want to allocate for the job. One of these cores will be used for the master, and the other will be jobs submitted by Flux to solve the project. The number of solved parameters per job is automatically computed, and if there are less parameters than remaining cores, each job will solve 1 parameter and the exceeding cores won’t be used and will be free for other jobs. On the other hand, the number of cores used by the secondary Flux may be setted with the following variable: FLUX_PARAM_NCORES.
# Use parametric distribution
export FLUX_PARAMETRIC=true
export FLUX_PARAM_AUTO=Manual
export FLUX_PARAM_MAXJOBS=32
export FLUX_PARAM_NCORES=1
export SUBMITNAME=qsub -N
export SUBMITVAR=-v
Finally, as the different batch schedulers handle the order of the arguments differently, SUBMIT_OPT_PRE environment variable is used and take the value 1 or 2:
qsub -N <job_name> -v <env_var_list> my_script.sh
oarsub -N <job_name> my_script.sh -v <env_var_list>