5 Submitting Jobs

This chapter describes how to submit jobs on the HP XC system; it addresses the following topics:

“Overview of Job Submission” (page 49)“Submitting a Serial Job Using LSF” (page 49)“Submitting a Parallel Job” (page 51)

“Submitting a Parallel Job That Uses the HP-MPI Message Passing Interface” (page 52)

“Submitting a Batch Job or Job Script” (page 56)“Submitting a Job from a Host Other Than an HP XC Host” (page 61)“Running Preexecution Programs” (page 61)

5.1Overview of Job Submission

On an HP XC system, a job is submitted to LSF, which places the job in a queue and allows it to run when the necessary resources become available. The LSF bsub command is the primary method for submitting jobs on the HP XC system.

The format of the bsub command depends on the type of the job, as listed here:Serial job; that is, a job that runs on a single coreNon-MPI parallel jobHP-MPI parallel jobA batch job script

The remaining sections describe how to submit a job for each of these job types.

The examples in this section submit the hostname command or a variation of a "hello, world" program. Most examples are run as interactive jobs to display the output.

The examples in this chapter are run on an HP XC system configuration in which lsfhost.localdomain is the virtual IP name of the LSF execution host and nodes n[1-16]are compute nodes in the lsf partition. All nodes contain 2 cores, providing 32 cores for use by LSF jobs.

5.2 Submitting a Serial Job Using LSF

There are various methods for submitting a serial job on the HP XC system:Using the LSF bsub command alone.Using the LSF bsub command in conjunction with the SLURM srun command.

Using the LSF bsub command in conjunction with the SLURM srun command and the LSF-SLURM External Scheduler.

Using the SLURM srun command alone.These methods are explored in this section.

For most instances, the recommended method for submitting a job is to use the LSF bsub command in conjunction with the SLURM srun command.

5.2.1 Submitting a Serial Job with the LSF bsub Command

Use the bsub command to submit a serial job on the LSF execution host using the following format:

bsub [bsub-options ] [ srun [srun-options]]jobname [job-options]

The bsub command launches the job.Use the bsub command's -Ioption to launch an interactive serial job.

5.1 Overview of Job Submission

49