Difference between revisions of "Jobscript-examples"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
These examples are very minimal and intended to give a rough overview of the functionality of [[Jobscript|jobscripts]]. | These examples are very minimal and intended to give a rough overview of the functionality of [[Jobscript|jobscripts]]. | ||
− | + | Comments that explain the code start with "###". | |
== Serial Job == | == Serial Job == | ||
Line 6: | Line 6: | ||
This job will run a given executable, in this case "myapp.exe". | This job will run a given executable, in this case "myapp.exe". | ||
<syntaxhighlight lang="zsh"> | <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 | ||
+ | |||
+ | ### The last part consists of regular shell commands | ||
+ | ### Change to working directory | ||
+ | cd /home/user/mywork | ||
+ | ### Execute your application | ||
+ | myapp.exe | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 15:07, 28 March 2018
These examples are very minimal and intended to give a rough overview of the functionality of jobscripts. Comments that explain the code start with "###".
Serial Job
This job will run a given executable, in this case "myapp.exe".
#!/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
### The last part consists of regular shell commands
### Change to working directory
cd /home/user/mywork
### Execute your application
myapp.exe