Batch script
Jump to navigation
Jump to search
A batch script is usually a shell script, which consists of two parts:
- a header section, which contains special comments. These comments are ignored by the shell reading the file, but are interpreted by the batch system and contain information on the resources needed by the job. Typically that is:
- number of compute cores (the smallest cpu unit on a computer able to run run one sequence of commands)
- the time the job will need to finish
- if required, disk space
- memory required by the job
- the (shell) script section, which is interpreted like any script. This contains a sequence of commands that do
- some preparatory tasks (copying files to the local disk)
- run the actual compute job
- copy data back to the user's HOME directory and clean up after the job.