25.06.2015 Views

Administering Platform LSF - SAS

Administering Platform LSF - SAS

Administering Platform LSF - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Passing Arguments on the Command Line<br />

Passing Arguments on the Command Line<br />

The environment variable LSB_JOBINDEX is used as a substitution string to<br />

support passing job array indices on the command line. When the job is<br />

dispatched, <strong>LSF</strong> sets LSB_JOBINDEX in the execution environment to the job<br />

array index of the current job. LSB_JOBINDEX is set for all jobs. For non-array<br />

jobs, LSB_JOBINDEX is set to sero (0).<br />

To use LSB_JOBINDEX, all the input files must be named consistently and with<br />

a variable part that corresponds to the indices of the job array. For example:<br />

input.1, input.2, input.3, ..., input.N<br />

You must escape LSB_JOBINDEX with a backslash, \, to prevent the shell<br />

interpreting bsub from expanding the variable. For example, the following<br />

command submits a job array of 1000 jobs whose input files are named<br />

input.1, input.2, input.3, ..., input.1000 and located in the current<br />

working directory. The executable is being passed an argument that specifies<br />

the name of the input files:<br />

% bsub -J "myArray[1-1000]" myJob -f input.\$LSB_JOBINDEX<br />

336<br />

<strong>Administering</strong> <strong>Platform</strong> <strong>LSF</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!