Difference between revisions of "Jobscript-examples"

From HPC Wiki
Jump to navigation Jump to search
m
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
These examples are very minimal and intended to give a rough overview of the functionality of [[Jobscript|jobscripts]].
+
[[Category:HPC-User]]
Comments that explain the code start with "###".
+
These examples are very minimal and intended to give a rough overview of the functionality of [[Jobscript|jobscripts]]. They contain comments starting with "###" that explain the code.
 +
* [[LSF#Jobscript_Examples|LSF]]
 +
* [[SLURM#Jobscript_Examples|SLURM]]
 +
* [[Torque#Jobscript_Examples|Torque]]
  
== Serial Job ==
+
If you are not sure, go to [[Schedulers|this overview]] to figure out, which [[Batch-Scheduler]] is used in your facility.
  
This job will run a given executable, in this case "myapp.exe".
+
== References ==
<syntaxhighlight lang="zsh">
 
#!/usr/bin/env zsh
 
 
 
### Job name
 
#BSUB -J MYJOB
 
 
 
### File where the output should be written
 
#BSUB -o MYJOB_OUTPUT.txt
 
 
 
### Time your job needs to execute, e. g. 1 h 20 min
 
#BSUB -W 1:20
 
 
 
### Memory your job needs, e. g. 1000 MB
 
#BSUB -M 1000
 
 
 
### Stack limit per process, e. g. 20 MB
 
#BSUB -S 20
 
 
 
### The last part consists of regular shell commands:
 
### Change to working directory
 
cd /home/user/mywork
 
 
 
### Execute your application
 
myapp.exe
 
</syntaxhighlight>
 
 
 
 
 
== OpenMP Job ==
 
  
This job will start the [[Parallel_Programming|parallel program]] "myapp.exe" with 24 threads.
+
[https://doc.itc.rwth-aachen.de/display/CC/Example+scripts More detailled LSF examples]
  
 
+
[https://user.cscs.ch/getting_started/running_jobs/jobscript_generator/#slurm-jobscript-generator SLURM jobscript generator]
== References ==
 
[https://doc.itc.rwth-aachen.de/display/CC/Example+scripts More detailled examples]
 

Latest revision as of 08:23, 4 September 2019

These examples are very minimal and intended to give a rough overview of the functionality of jobscripts. They contain comments starting with "###" that explain the code.

If you are not sure, go to this overview to figure out, which Batch-Scheduler is used in your facility.

References

More detailled LSF examples

SLURM jobscript generator