meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general:computerenvironment:slurm [2020/04/27 07:37] – [Job status] ingo | general:computerenvironment:slurm [2023/10/16 12:04] (current) – [sview] ingo | ||
---|---|---|---|
Line 16: | Line 16: | ||
===== Creating a script file ===== | ===== Creating a script file ===== | ||
- | The script file tells SLURM what should be done. The example below serves as a general guideline. Please do not simply copy it, but instead try to understand what information is provided to SLURM, and then modify the information to match your requirements. This applies, in particular, to the options –cpu-per-task and –mem-per-cpu. If you set the values for these options too high, your job will either remain pending until the requested resources are free on the cluster, or alternatively, | + | The script file tells SLURM what should be done. The example below serves as a general guideline. Please do not simply copy it, but instead try to understand what information is provided to SLURM, and then modify the information to match your requirements. This applies, in particular, to the options |
Line 22: | Line 22: | ||
==== Example ==== | ==== Example ==== | ||
- | This example uses a simple seed file that provides input for the program calls, e.g. file names, parameter values and the like. | + | This example uses a simple seed file that provides input for the program calls, e.g. file names, parameter values and the like |
+ | |||
+ | You can use any text editor like '' | ||
< | < | ||
#!/bin/bash | #!/bin/bash | ||
- | #SBATCH --partition=pool | + | #SBATCH --partition=pool |
- | #SBATCH --nodelist=pool18 | + | #SBATCH --account=intern |
- | # CAREFUL: Use this option only when necessary, | + | #SBATCH --cpus-per-task=1 |
- | # because SLURM will have to wait until the specified computer is free | + | #SBATCH --mem-per-cpu=1mb |
- | #SBATCH --account=intern | + | #SBATCH --job-name=" |
- | #SBATCH --cpus-per-task=1 | + | |
- | #SBATCH --mem-per-cpu=1mb | + | |
- | #SBATCH --profile=task | + | |
- | #SBATCH --job-name=" | + | |
- | #SBATCH --output=Test_%A_%a.o.out # specifies the name of the output file. Feel free to replace | + | |
- | #the ' | + | |
- | #SBATCH --error=Test_%A_%a.e.out | + | |
- | # the ' | + | |
- | #SBATCH --array=1-8%4 | + | |
- | # The %4 specifies that never more than 4 jobs run in parallel | + | |
- | + | ||
- | echo This is task $SLURM_ARRAY_TASK_ID # executes the command " | + | |
- | # about your job | + | |
- | + | ||
- | SEED=$(awk " | + | |
- | # into the variable $SEED | + | |
- | echo " | + | echo " |
- | # the seed file. Place here any command that you want to run on the | + | |
- | # remote computer | + | |
</ | </ | ||
- | You can now start using slurm by simply changing the program call to the task you want to perform. Find below a number of settings that are specific to the Applied Bioinformatics system. | ||
- | - **partition** | + | ===== Job submission ===== |
- | - all (compute01-compute10) | + | |
- | - pool (pool00-pool22) | + | |
- | - inteli7 (compute11-compute14) | + | |
- | - wks (16 workstations) | + | |
- | - teaching (compute14-15) | + | |
- | - **account** | + | |
- | - intern | + | |
- | - praktikant | + | |
- | - **cpus-per-task** | + | |
- | - min: 1 | + | |
- | - max: 64 | + | |
- | - **mem-per-cpu** | + | |
- | - max: 1000gb <wrap important> | + | |
- | - **array** | + | |
- | - min: 1 | + | |
- | - max: There is currently an upper limit of 500 jobs((Note, this number is subject to change. You will get a notification if you try to submit too many jobs)) in an array that can be submitted. | + | |
- | ===== Create a Seedfile ===== | + | Use the command // |
- | + | ||
- | A seedfile is no more than a textfile which enlists | + | |
< | < | ||
- | cd my_dir; | + | sbatch |
- | + | ||
- | ls -d $PWD/*> seedfile.txt | + | |
</ | </ | ||
- | You can generate an example seedfile by copying | + | After your script was send to the cluster, SLURM will automatically create |
- | < | + | |
- | ANOGA@7165@1.fa | + | |
- | AQUAE@224324@1.fa | + | |
- | ARATH@3702@1.fa | + | |
- | ASPFU@330879@1.fa | + | |
- | BACSU@224308@1.fa | + | |
- | BACTN@226186@1.fa | + | |
- | BATDJ@684364@1.fa | + | |
- | BOVIN@9913@1.fa | + | |
- | BRADU@224911@1.fa | + | |
- | BRAFL@7739@1.fa | + | |
- | CAEEL@6239@1.fa | + | |
- | CANAL@237561@1.fa | + | |
- | CANLF@9615@1.fa | + | |
- | CHICK@9031@1.fa | + | |
- | CHLAA@324602@1.fa | + | |
- | </ | + | |
- | + | ||
- | ===== Job submission ===== | + | |
- | + | ||
- | Use the command | + | |
- | + | ||
- | < | + | |
- | sbatch /path/to/script.slurm | + | |
- | </ | + | |
+ | Your script will run using your current (Anaconda) environment meaning that you can use all programs which are in the environment from which you issue the '' | ||
===== Job status ===== | ===== Job status ===== | ||
Line 120: | Line 59: | ||
See [[https:// | See [[https:// | ||
- | ===== Cancle | + | ===== Cancel |
Use the command [[https:// | Use the command [[https:// | ||
Line 128: | Line 67: | ||
</ | </ | ||
+ | <wrap important> | ||
===== Information about slurm settings on our system ===== | ===== Information about slurm settings on our system ===== | ||
Use the command [[https:// | Use the command [[https:// | ||
Line 134: | Line 74: | ||
sinfo | sinfo | ||
</ | </ | ||
+ | |||
+ | ===== More info of what is going on ===== | ||
+ | To open a window with a whole array of informations about the cluster like current running jobs/ | ||
+ | < | ||
===== Common mistakes ===== | ===== Common mistakes ===== | ||
This is a non-exhaustive list of issues and mistakes in the context of SLURM | This is a non-exhaustive list of issues and mistakes in the context of SLURM | ||
Line 142: | Line 86: | ||
* your job is in pending state forever -> it might be that non of the computers in the queue has the capacity((e.g. number of cpus, amount of memory)) that you specified | * your job is in pending state forever -> it might be that non of the computers in the queue has the capacity((e.g. number of cpus, amount of memory)) that you specified | ||
+ | <WRAP tabs> | ||
+ | * [[general: | ||
+ | </ |