slurm

How to monitor resources during slurm job?

南笙酒味 提交于 2019-12-05 01:31:45
问题 I'm running jobs on our university cluster (regular user, no admin rights), which uses the SLURM scheduling system and I'm interested in plotting the CPU and memory usage over time, i.e while the job is running. I know about sacct and sstat and I was thinking to include these commands in my submission script, e.g. something in the line of #!/bin/bash #SBATCH <options> # Running the actual job in background srun my_program input.in output.out & # While loop that records resources JobStatus="$

Questions on alternative ways to run 4 parallel jobs

前提是你 提交于 2019-12-04 18:51:25
Below are three different sbatch scripts that produce roughly similar results. (I show only the parts where the scripts differ; the ## prefix indicates the output obtained by submitting the scripts to sbatch .) Script 0 #SBATCH -n 4 srun -l hostname -s ## ==> slurm-7613732.out <== ## 0: node-73 ## 1: node-73 ## 2: node-73 ## 3: node-73 Script 1 #SBATCH -n 1 #SBATCH -a 1-4 srun hostname -s ## ==> slurm-7613733_1.out <== ## node-72 ## ## ==> slurm-7613733_2.out <== ## node-73 ## ## ==> slurm-7613733_3.out <== ## node-72 ## ## ==> slurm-7613733_4.out <== ## node-73 Script 2 #SBATCH -N 4 srun -l

one-to-one dependency between two job arrays in SLURM

怎甘沉沦 提交于 2019-12-04 15:02:00
The server just switched from CONDOR to SLURM, so I am learning and trying to translate my submission script to SLURM. My question is the following, I have two job arrays. The second is dependent on the first one. For the time being, I something like the following events1=$(sbatch --job-name=events --array=1-3 --output=z-events-%a.stdout myfirst.sh) jobid_events1=`echo ${events1} | sed -n -e 's/^.*job //p' ` echo "The job ID of the events is "${jobid_events1} postevents1=$(sbatch --job-name=postevents --dependency=afterany:${jobid_events1} --array=1-3 mysecond.sh) jobid_postevents1=`echo $

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

你。 提交于 2019-12-04 13:34:35
问题 I have a problem where I need to launch the same script but with different input arguments. Say I have a script myscript.py -p <par_Val> -i <num_trial> , where I need to consider N different par_values (between x0 and x1 ) and M trials for each value of par_values . Each trial of M is such that almost reaches the time limits of the cluster where I am working on (and I don't have priviledges to change this). So in practice I need to run NxM independent jobs. Because each batch jobs has the

How to use multiple nodes/cores on a cluster with parellelized Python code

大城市里の小女人 提交于 2019-12-04 11:13:09
I have a piece of Python code where I use joblib and multiprocessing to make parts of the code run in parallel. I have no trouble running this on my desktop where I can use Task Manager to see that it uses all four cores and runs the code in parallel. I recently learnt that I have access to a HPC cluster with 100+ 20 core nodes. The cluster uses SLURM as the workload manager. The first question is: Is it possible to run parallelized Python code on a cluster? If it is possible, Does the Python code I have need to be changed at all to run on the cluster, and What #SBATCH instructions need to be

Adding time to a running slurm job

我与影子孤独终老i 提交于 2019-12-04 08:47:53
问题 I have a job running a linux machine managed by slurm. Now that the job is running for a few hours I realize that I underestimated the time required for it to finish and thus the value of the --time argument I specified is not enough. Is there a way to add time to an existing running job through slurm? 回答1: Use the scontrol command to modify a job scontrol update jobid=<job_id> TimeLimit=<new_timelimit> Requires admin privileges on some machines. 来源: https://stackoverflow.com/questions

slurm: DependencyNeverSatisfied error even after crashed job re-queued

谁说胖子不能爱 提交于 2019-12-04 07:38:41
My goal is to build a pipeline using slurm dependencies and handle a case where a slurm job crashes. Based on following answer and guide 29th section, it is recommended to use scontrol requeue $jobID , that will re-queue the already cancelled job. if job crashes can be detected from within the submission script, and crashes are random, you can simply requeue the job with scontrol requeue $SLURM_JOB_ID so that it runs again. After I have re-queued a cancelled job, its dependent job remain as DependencyNeverSatisfied and even dependent job completed nothing happens. Is there any way to update

SLURM sbatch multiple parallel calls to executable

北城以北 提交于 2019-12-04 07:23:48
I have an executable that takes multiple options and multiple file inputs in order to run. The executable can be called with a variable number of cores to run. E.g. executable -a -b -c -file fileA --file fileB ... --file fileZ --cores X I'm trying to create an sbatch file that will enable me to have multiple calls of this executable with different inputs. Each call should be allocated in a different node (in parallel with the rest), using X cores. The parallelization at core level is taken care of the executable, while at the node level by SLURM. I tried with ntasks and multiple sruns but the

How to hold up a script until a slurm job (start with srun) is completely finished?

≡放荡痞女 提交于 2019-12-04 05:27:49
问题 I am running a job array with SLURM, with the following job array script (that I run with sbatch job_array_script.sh [args] : #!/bin/bash #SBATCH ... other options ... #SBATCH --array=0-1000%200 srun ./job_slurm_script.py $1 $2 $3 $4 echo 'open' > status_file.txt To explain, I want job_slurm_script.py to be run as an array job 1000 times with 200 tasks maximum in parallel. And when all of those are done, I want to write 'open' to status_file.txt . This is because in reality I have more than

Sbatch: pass job name as input argument

梦想与她 提交于 2019-12-04 02:42:08
I have the following script to submit job with slurm: #!/bin/sh #!/bin/bash #SBATCH -J $3 #job_name #SBATCH -n 1 #Number of processors #SBATCH -p CA nwchem $1 > $2 The first argument ($1) is my input, the second ($2) is my output and I would like the third ($3) to be my jobname. If I do like this, the job name is '$3'. How can I proceed to give the jobname as an argument of the script? Thanks The SBATCH directives are seen as comments by the shell and it does not perform variable substitution on $3 . There are several courses of action: Option 1: pass the -J argument on the command line: