Tutorial on using UCI SLURM Servers for GPU-accelerated tasks
- ICS Openlab Account
- Access to UCI SLURM servers
- Log in to your ICS Openlab account.
- Verify the correct user by running:
This should return your UCI Net ID.
whoami
- Check out the available SLURM servers here:
UCI SLURM Wiki - Load SLURM onto your Openlab instance by running the following commands:
module load slurm module initadd slurm
- Clone this repository or create your project. For this tutorial, we will use the Python file included in this repository.
- Load the Python environment:
To submit the enviorment load script, use the following command:
sbatch -p opengpu.p load.shRunning this on the opengpu server will ensure that we correctly load all binary Output of this command will be located in a file called "slurm-{jobnumber}.out" where the job number is of the job you just loaded
We will use an SBATCH script to submit the job. Keep in mind:
- SBATCH "comments" (lines starting with
#SBATCH) are not just comments; they configure the nodes assigned by the SLURM instance. - Detailed documentation can be found here.
To submit the job, use the following command:
sbatch -p opengpu.p slurmscript.shReplace slurmscript.sh with the name of your SLURM script or Python file.
To check the output and errors generated by the SLURM script:
- View output logs:
tail -n +1 -f myoutput.out
- View error logs:
tail -n +1 -f myerrors.err