HP XC System Software User's Guide Version 3.2

5.6 Submitting a Job from a Host Other Than an HP XC Host
To submit a job from a host other than an HP XC host to the HP XC system, use the LSF -R
option, and the HP XC host type SLINUX64 (defined in lsf.shared) in the job submission
resource requirement string. The necessary resource requirement string to submit a job from a
host other than an HP XC host is specified as follows:
-R "type=SLINUX64"
The following example shows this resource requirement string in an LSF command:
$ bsub -R "type=SLINUX64" -n4 -I srun hostname
5.7 Running Preexecution Programs
A preexecution program is a program that performs needed setup tasks that an application needs.
It may create directories, input files, and so on.
Though LSF-HPC daemons only run on a node with resource manager role, batch jobs can run
on any compute node that satisfies the scheduling and allocation requirements.
Where preexecution commands run depends on the type of job:
For interactive jobs, preexecution commands run on the node where the sbatchd daemon
runs, typically, the resource manager node.
For normal batch jobs, preexecution commands run on the first node of the SLURM allocation.
Before starting a preexecution program, LSF-HPC sets the SLURM_JOBID environment variable.
To enable srun to launch preexecution on the first allocated node and other allocated nodes,
your preexecution program should pick up the SLURM_JOBID environment variable. The
SLURM_JOBID has the information LSF-HPC needs to run the job on the nodes required by your
preexecution program.
The following items provide the information you need to run the preexecution program on the
resource manager node, on the first allocated node, or on all the allocated nodes:
This is the default behavior. Run the preexecution program normally.
Your preexecution does not need to make use of the SLURM_JOBID
environment variable.
To run a preexecution program on the resource
manager node:
Use the SLURM srun -N 1 command. For example:
$ /opt/hptc/bin/srun -N 1 my_pre_exec
To run a preexecution program on the first
allocated node:
Use the SLURM srun directly without node options. For example:
$ /opt/hptc/bin/srun my_pre_exec
To run a preexecution program on all allocated
nodes:
NOTE: Do not use the srun -b command (for SLURM batch mode) inside preexecution
programs. The srun -b command returns immediately after a SLURM batch job is submitted.
This can cause the preexecution program to exit with success while the real task is still running
in batch mode.
See the SLURM srun(1) manpage for more information about the srun command, its options,
and the SLURM_JOBID environment variable.
5.6 Submitting a Job from a Host Other Than an HP XC Host 65