Running VISWIR on HPC with SLURM¶
This section explains how to use the provided SLURM script to run VISWIR on a High Performance Computing (HPC) cluster.
Location¶
The SLURM job script is available in the tools/ directory:
tools/Singularity: definition file to build the containertools/job_viswir.slurm: SLURM batch script to launch VISWIR
Script Overview¶
The script performs the following steps:
Job configuration - Job name, partition, time limit, memory, CPUs - Email notifications on job completion or failure
Container execution - Loads Singularity - Runs the VISWIR container with mounted volumes for results, logs, config, and data
Safety checks - Verifies that the required
.siffile exists before executionJob efficiency report - Calls
seff $SLURM_JOB_IDto display resource usage statisticsResult transfer - Copies the
results.dbfile to a remote PC viascpfor post-processing
Script Excerpt¶
Here is an exemple configuration section for a SLURM script:
#SBATCH --job-name=VISWIR
#SBATCH --output=viswir_output.log
#SBATCH --error=viswir_error.log
#SBATCH --partition=long
#SBATCH --time=48:00:00
#SBATCH --ntasks=1
#SBATCH --mem=384G
#SBATCH --cpus-per-task=16
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=your.email@your.lab.xx
This configuration requests:
Partition:
long(long jobs)Time limit: 48 hours
Resources: 1 task, 16 CPUs, 384 GB RAM
Notifications: email sent at job end or failure
Customization¶
Adjust
--time,--mem, and--cpus-per-taskdepending on your cluster resources.Update the paths in the
-Bbindings to match your HPC environment.Replace the email address in
#SBATCH --mail-userwith your own.Modify the
scptarget to point to your workstation or storage server.
Submitting the Job¶
To submit the job:
sbatch tools/run_viswir.slurm
Checking Job Status¶
To check if the job has been accepted and is running:
squeue -u $USER
To see detailed information about the job:
scontrol show job <job_id>
After completion, you can check efficiency with:
seff <job_id>
Logs and Results¶
Standard output:
viswir_output.logErrors:
viswir_error.logResults: copied automatically to your workstation via
scp(see script). Depending on your configuration, this command may not work. In this case, remove it or comment it out.
Tip
Use the
--fastmode inside the container for quick parameter testing.Always check the
logs/directory for error messages and debugging information.If your cluster supports GPUs, request them with
#SBATCH --gres=gpu:1and ensure your container includes GPU-enabled PyTorch (not by default).