Other schedulers
This chapter provides some instructions to use Flux on a cluster using another Batch Scheduler than PBS.
Run Flux in the command line
- Memory management (JVM_MEMORY, MEMSIZC3, MEMSIZN3)
- Core management (FLUX_NCORES)
We recommend running Flux using a Python script and using non-interactive mode on a cluster. The command line should then looks like this:
# Run Flux
$PATH_TO_FLUX_EXECUTABLE -application $FLUX_APP -runPyInSilentModeAndExit
$YOUR_PYTHON_SCRIPT -batch
Batch scheduler-specific settings
Regarding a batch scheduler used 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 an automatic or
manual computation of the 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 fewer 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 set 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
- If SUBMIT_OPT_PRE = 1 (as for PBS), the environment
variables are defined before the script and the command line will be like
this:
qsub -N <job_name> -v <env_var_list> my_script.sh
- If SUBMIT_OPT_PRE = 2 (for example for Slurm), the
environment variables are defined after the script and the command line will
be like
this:
oarsub -N <job_name> my_script.sh -v <env_var_list>