Both sides previous revisionPrevious revision | |
services:cluster:slurm [2024/03/13 14:16] – [Example of a very basic job script] behrmj87 | services:cluster:slurm [2024/04/26 14:36] (current) – hoffmac00 |
---|
#!/bin/bash | #!/bin/bash |
| |
#SBATCH --job-name=job1 # Job name, will show up in squeue output | #SBATCH --job-name=example_job # Job name, will show up in squeue output |
#SBATCH --ntasks=1 # Number of cores | #SBATCH --ntasks=1 # Number of individual tasks, usually 1 except when using MPI, etc. |
#SBATCH --nodes=1 # Ensure that all cores are on one machine | #SBATCH --cpus-per-task=1 # Number of CPUs |
| #SBATCH --nodes=1 # Number of nodes, usaully 1 except when using MPI, etc. |
#SBATCH --time=0-00:01:00 # Runtime in DAYS-HH:MM:SS format | #SBATCH --time=0-00:01:00 # Runtime in DAYS-HH:MM:SS format |
#SBATCH --mem-per-cpu=100 # Memory per cpu in MB (see also --mem) | #SBATCH --mem-per-cpu=100 # Memory per cpu in MB (see also --mem) |
#SBATCH --output=job1_%j.out # File to which standard out will be written | #SBATCH --output=job_%j.out # File to which standard out will be written |
#SBATCH --error=job1_%j.err # File to which standard err will be written | #SBATCH --error=job_%j.err # File to which standard err will be written |
#SBATCH --mail-type=END # Type of email notification- BEGIN,END,FAIL,ALL | #SBATCH --mail-type=END # Type of email notification- BEGIN,END,FAIL,ALL |
#SBATCH --mail-user=j.d@fu-berlin.de # Email to which notifications will be sent | #SBATCH --mail-user=j.d@fu-berlin.de # Email to which notifications will be sent |
dreger@sheldon-ng:..dreger/quickstart> pwd | dreger@sheldon-ng:..dreger/quickstart> pwd |
/scratch/dreger/quickstart | /scratch/dreger/quickstart |
dreger@sheldon-ng:..dreger/quickstart> sbatch -p test job1.sh | dreger@sheldon-ng:..dreger/quickstart> sbatch -p test example_job.sh |
Submitted batch job 26495 | Submitted batch job 26495 |
dreger@sheldon-ng:..dreger/quickstart> squeue -l -u dreger | dreger@sheldon-ng:..dreger/quickstart> squeue -l -u dreger |
JOBID PARTITION NAME USER STATE TIME TIMELIMIT NODES NODELIST(REASON) | JOBID PARTITION NAME USER STATE TIME TIMELIMIT NODES NODELIST(REASON) |
26495 test job1 dreger RUNNING 0:24 1:00 1 x001 | 26495 test job1 dreger RUNNING 0:24 1:00 1 x001 |
dreger@sheldon-ng:..dreger/quickstart> cat job1_26495.out | dreger@sheldon-ng:..dreger/quickstart> cat job_26495.out |
JobId=26495 Name=job1 | JobId=26495 Name=example_job |
UserId=dreger(4440) GroupId=fbedv(400) | UserId=dreger(4440) GroupId=fbedv(400) |
Priority=10916 Account=fbedv QOS=normal | Priority=10916 Account=fbedv QOS=normal |
Features=(null) Gres=(null) Reservation=(null) | Features=(null) Gres=(null) Reservation=(null) |
Shared=OK Contiguous=0 Licenses=(null) Network=(null) | Shared=OK Contiguous=0 Licenses=(null) Network=(null) |
Command=/clusterfs/scratch/dreger/quickstart/job1.sh | Command=/clusterfs/scratch/dreger/quickstart/example_job.sh |
WorkDir=/clusterfs/scratch/dreger/quickstart | WorkDir=/clusterfs/scratch/dreger/quickstart |
| |