Batch script

From bwHPC Wiki
Revision as of 16:21, 8 January 2024 by K Siegmund (talk | contribs) (Created page with "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 read...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, 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.