Questions tagged [sbatch]

sbatch submits a batch script to SLURM (Simple Linux Utility for Resource Management). The batch script may be given to sbatch through a file name on the command line, or if no file name is specified, sbatch will read in a script from standard input. The batch script may contain options preceded with "#SBATCH" before any executable commands in the script.

sbatch submits a batch script to SLURM (Simple Linux Utility for Resource Management). The batch script may be given to sbatch through a file name on the command line, or if no file name is specified, sbatch will read in a script from standard input. The batch script may contain options preceded with "#SBATCH" before any executable commands in the script.

231 questions
2
votes
2 answers

How to update job node number in Slurm?

I have a pending job and I want to resize it. I tried: scontrol update job NumNodes=128 It does not work. Note: I can change the walltime using scontrol. But when I try to change number of nodes, it failed. It looks like I can change the…
Jason
  • 316
  • 3
  • 14
2
votes
1 answer

Create jobs with slurm within python script that iterates over items in a list

Background: I wrote a python script to convert files from format to another. This code uses a text file (subject_list.txt) as input and iterates through source directory names listed in that text file (several hundred directories, each with…
kdestasio
  • 69
  • 1
  • 9
2
votes
1 answer

How does one make sure that the python submission script in slurm is in the location from where the sbatch command was given?

I have a python submission script that I run with sbatch using slurm: sbatch batch.py when I do this things do not work properly because I assume, the batch.py process does not inherit the right environment variables. Thus instead of running…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
2
votes
1 answer

How to avoid running code on head node of the cluster

I am using a cluster to run my code. I use a runm file to run my code on the cluster. runm script is as below: #!/bin/sh #SBATCH --job-name="....." #SBATCH -n 4 #SBATCH --output=bachoutput #SBATCH --nodes=1-1 #SBATCH -p all #SBATCH…
Sonia Sohi
  • 117
  • 1
  • 12
2
votes
1 answer

SLURM sbatch job array for the same script but with different input string arguments run in parallel

My question is similar with this one, and the difference is that my different arguments are not numbers but strings. If I have a script (myscript.R) that takes two strings as arguments: "text-a", "text-A". My shell script for sbatch would…
Yan
  • 499
  • 6
  • 20
2
votes
1 answer

sbatch pass exit codes of dependent jobs

I have some jobs started with sbatch, e.g. a=$(sbatch ...) b=$(sbatch ...) Now a third job is queued after a or b are done: c=$(sbatch --dependency=afterany:$a:$b ...) How can I pass the exit status of task a and b to the script of c?
Philipp H.
  • 1,513
  • 3
  • 17
  • 31
2
votes
1 answer

How to use sbatch in SLURM with a config file

I wanted to run a python script with sbatch, however, it seems that the only way to run a python script with sbatch is to have a bash script that then run the python script. As in having batch_main.sh: #!/bin/bash #SBATCH…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
2
votes
1 answer

Use slurm JobID as input?

Is it possible to use the JobID as an input of the script you are submiting? I know you can use %j to name the log file with the JobID, but is it possible to do, for example, something similar to sbatch make-dir.sh %j where make-dir.sh…
Israelcma
  • 53
  • 7
2
votes
1 answer

How do I use sbatch with SLURM and a makefile?

I am trying to submit batch jobs to SLURM but I keep getting JobState=FAILED Reason=NonZeroExitCode. I can compile and run the code fine on regular g++ but I have to use SLURM for an assignment for school. I thought I was running them properly and I…
Johnny
  • 675
  • 3
  • 15
  • 25
1
vote
1 answer

Storing slurmd node computation outputs in a database?

I have a slurm cluster of 8 separate rhel9 server nodes to serve as master, compute, and database nodes. The master and compute nodes are up and talking, but I have not activated the database node yet. I know that the slurmdbd node can be configured…
1
vote
0 answers

Job submission in SLURM

I am trying to use all the nodes but not able to do so. As CPU load is always around 0.1-0.5. where am i going wrong? My job is at node 7 #script #!/bin/bash #BATCH --job-name=atg7-3-7-3 #SBATCH --output=atg7-3-7-3.out #SBATCH --nodes=1 #SBATCH…
shan
  • 11
  • 2
1
vote
0 answers

How to run two scripts in parallel on the same node but different cores with sbatch?

I am new to SLURM and I want to run two scripts (each of them take 2 minutes to run) in the same time (parallel) on the same node, same socket, but on different cores. I have a system where one node has 2 sockets, and each socket has 10 cores. Based…
thezbx
  • 39
  • 3
1
vote
1 answer

How can I save output files on storage disk on cluster using slurm?

I have a Fortran code that I have to run on a cluster with slurm. I have compiled the code in the home directory (which is mounted in all the cluster nodes) and always ran on it. However, the partition where the home is mounted has only 250 GB or…
riky_cv
  • 11
  • 2
1
vote
0 answers

A python slurm script that read every file in a folder

I'm working with HPC and am trying to run a python script that reads and modify every tif files in a folder and its subfolders. Right now I'm running a for loop: files = glob.glob("./Examples/**/*.tif", recursive = True) for file in files: But it…
jxaiye
  • 13
  • 4
1
vote
1 answer

how to produce multiple readlength.tsv at once from multiple fastq files?

ı have 16 fastq files under the different directories to produce readlength.tsv seperately and ı have some script to produce readlength.tsv .this is the script that ı should use to produce readlength.tsv zcat ~/proje/project/name/fıle_fastq | paste…
pierogi
  • 25
  • 4