Content
Submitting jobs on SLURM
If you are completely new to SLURM, we recommend reading the following simple guide https://blog.ronin.cloud/slurm-intro/
However if you just want to spring into action, feel free to keep on reading.
To submit a job with slurm, we use the sbatch command. For example, say you have created a script on your ssh-instance, called my-hpc-job.sh. To submit the job, you would use the following command:
sbatch my-hpc-job.sh
As mentioned this needs the script to be located on the SSH-instance/VM. Alternatively, you could create it on your local machine and transfer it via SSH using the scp command. For example:
scp C:\Users\YourUser\Documents\file.txt user@192.168.1.10:/home/user/documents
After submitting a job, you should see output like the following
Submitted job <job_id>
By using the command squeue you should now be able to see your job in the queue.
After the machine needed to run your job has been spun up, you can run sinfo to see all the current live compute nodes.
This instance will automatically run the given slurm script, and then terminate itself after a while. If you for any reason need direct SSH access into node running the job, you can connect to it from the main ssh-instance (not your own pc). For instance, if your node is, as seen above, live on "compute-hpc-node-728", you can write ssh compute-hpc-node-728 and youll have access to the given compute node.
Congratulations! You should now be ready to submit jobs.