Difference between revisions of "Jobscript"

From HPC Wiki
Jump to navigation Jump to search
Line 2: Line 2:
  
 
A jobscript can be used to submit the job you wish to execute to a batch system. It is similar to a [[sh-file]] and generally uses the same format, but is more powerful. Besides shell commands, you can put the so called magic cookie #BSUB. This allows you to specify the time and memory your application requires or - if your code runs in parallel - the number of compute slots to employ etc.
 
A jobscript can be used to submit the job you wish to execute to a batch system. It is similar to a [[sh-file]] and generally uses the same format, but is more powerful. Besides shell commands, you can put the so called magic cookie #BSUB. This allows you to specify the time and memory your application requires or - if your code runs in parallel - the number of compute slots to employ etc.
 +
 +
 +
== Usage ==
 +
 +
$ bsub < jobscript.sh
 +
 +
Note that, when you submit your job to the batch system as shown above, it may take some time before it leaves the queue and starts running. This waiting time depends on the current workload of the machines, as well as the time and memory you asked for in your jobscript. The rule of thumb is: the more resources your job needs (execution time, memory), the longer it will be queued.

Revision as of 13:27, 28 March 2018

General

A jobscript can be used to submit the job you wish to execute to a batch system. It is similar to a sh-file and generally uses the same format, but is more powerful. Besides shell commands, you can put the so called magic cookie #BSUB. This allows you to specify the time and memory your application requires or - if your code runs in parallel - the number of compute slots to employ etc.


Usage

$ bsub < jobscript.sh

Note that, when you submit your job to the batch system as shown above, it may take some time before it leaves the queue and starts running. This waiting time depends on the current workload of the machines, as well as the time and memory you asked for in your jobscript. The rule of thumb is: the more resources your job needs (execution time, memory), the longer it will be queued.