User Tools

Site Tools


sbatch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
sbatch [2021/05/27 13:17]
root
sbatch [2021/10/22 12:05] (current)
root
Line 1: Line 1:
 ====== sbatch ====== ====== sbatch ======
  
-**sbatch** submits a script to be executed to the slurm controller and returns immediately. The script may be queued for running later if there are currently no resources (cores) available to run it. The script is "detached" from your terminal, so even if you log out it will run, or continue to run.+**sbatch** submits a script to be executed to the slurm controller and returns immediately. The script may be queued for running later if there are currently no resources (cores or memory) available to run it. The script is "detached" from your terminal, so even if you log out it will run, or continue to run.
  
 The working directory for the script will be set to the current working directory when you submit the job. The working directory for the script will be set to the current working directory when you submit the job.
Line 50: Line 50:
  
 sbatch -N4 ex1.bash one two sbatch -N4 ex1.bash one two
 +
 +** Unless you intend to use srun from within your script, the -N option is probably not what you want. **
  
 The "-N4" option requests an allocation of 4 nodes for this job. **sbatch** only runs the script once. What it is doing is allocating 4 nodes and running the script on the first one. Tasks can be run on the allocated nodes by using srun from within your script. The "-N4" option requests an allocation of 4 nodes for this job. **sbatch** only runs the script once. What it is doing is allocating 4 nodes and running the script on the first one. Tasks can be run on the allocated nodes by using srun from within your script.
sbatch.1622135867.txt.gz ยท Last modified: 2021/05/27 13:17 by root