The preferred way of running sbatch command is with a script. We can write these with the help of an editor, such as vi/vim, nano, emacs, or gedit, which are all available on the cluster. If you are unfamiliar with Linux text editors, we recommend using gedit, but bear in mind that it requires a graphical tunnel.
#!/bin/bash
if you are using the bash shell, or #!/bin/csh
if you are using the c shell.#SBATCH
directive. Each option should appear on a separate line, with each line beginning with #SBATCH
. sbatch will stop processing further #SBATCH directives once the first non-comment non-whitespace line has been reached in the script.#SBATCH
directives), then slurm will assign default values and ignore any out-of-place slurm option directives. T he default values for job resources are: 2 hour time limit, 1 CPU core and 7.5GB RAM memory.An example sbatch script, with an explanation, can be found here.