...
Code Block |
---|
export HAL_CONTAINER_REGISTRY="/path/to/custom/registry" |
Script Mode
Code Block |
---|
swbatch [-h] RUN_SCRIPT [-v] |
Same as original slurm batch.
- RUN_SCRIPT (required) : Specify a batch script as input.
Within the run_script:
- partition (required) : cpu_mini, cpun1, cpun2, cpun4, cpun8, cpun16, gpux1, gpux2, gpux3, gpux4, gpux8, gpux12, gpux16.
- job_name (optional) : job name.
- output_file (optional) : output file name.
- error_file (optional) : error file name.
- cpu_per_gpu (optional) : 16 cpus (default), range from 16 cpus to 40 cpus.
- time (optional) : 24 hours (default), range from 1 hour to 72 hours (walltime).
- singularity (optional) : Specify a singularity image to use. The container image is searched for from the container registry directory environment variable in the swconf.yaml configuration.
Example:
Consider demo.swb, which is a batch script such as
Code Block |
---|
#!/bin/bash |
...
#SBATCH --partition=gpux1 |
...
srun hostname |
or using a container image with a time of 42 hours
Code Block |
---|
#!/bin/bash |
...
#SBATCH --job_name="demo" |
...
#SBATCH --output="demo.%j.%N.out" |
...
#SBATCH --error="demo.%j.%N.err" |
...
#SBATCH --partition=gpux1 |
...
#SBATCH --time=42 |
...
#SBATCH --singularity=dummy |
...
srun hostname |
You can run the script as below but remember to export the container registry variable if you are using some custom singularity images.
Code Block |
---|
swbatch demo.swb |
Monitoring Mode
Code Block |
---|
swqueue |
Same as original slurm squeue, which show both running and queueing jobs, the swqueue shows running jobs and computational resource status.