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.

Chapter 33<br />

Running Interactive and Remote Tasks<br />

Resource usage<br />

Resource reservation is only available for batch jobs. If you run jobs using only<br />

<strong>LSF</strong> Base, LIM uses resource usage to determine the placement of jobs.<br />

Resource usage requests are used to temporarily increase the load so that a<br />

host is not overloaded. When LIM makes a placement advice, external load<br />

indices are not considered in the resource usage string. In this case, the syntax<br />

of the resource usage string is<br />

res[=value]:res[=value]: ... :res[=value]<br />

The res is one of the resources whose value is returned by the lsload<br />

command.<br />

rusage[r1m=0.5:mem=20:swp=40]<br />

The above example indicates that the task is expected to increase the 1-minute<br />

run queue length by 0.5, consume 20 MB of memory and 40 MB of swap space.<br />

If no value is specified, the task is assumed to be intensive in using that<br />

resource. In this case no more than one task will be assigned to a host<br />

regardless of how many CPUs it has.<br />

The default resource usage for a task is r15s=1.0:r1m=1.0:r15m=1.0. This<br />

indicates a CPU-intensive task which consumes few other resources.<br />

Running a task on a specific host<br />

If you want to run your task on a particular host, use the lsrun -m option:<br />

% lsrun -m hostD mytask<br />

Running a task by using a pseudo-terminal<br />

Submission of interaction jobs using pseudo-terminal is not supported for<br />

Windows for either lsrun or bsub <strong>LSF</strong> commands.<br />

Some tasks, such as text editors, require special terminal handling. These tasks<br />

must be run using a pseudo-terminal so that special terminal handling can be<br />

used over the network.<br />

The -P option of lsrun specifies that the job should be run using a pseudoterminal:<br />

% lsrun -P vi<br />

Running the same task on many hosts in sequence<br />

Running parallel tasks<br />

The lsgrun command allows you to run the same task on many hosts, one<br />

after the other, or in parallel.<br />

For example, to merge the /tmp/out file on hosts hostA, hostD, and hostB<br />

into a single file named gout, enter:<br />

% lsgrun -m "hostA hostD hostB" cat /tmp/out >> gout<br />

lsgrun -p<br />

The -p option tells lsgrun that the task specified should be run in parallel.<br />

See lsgrun(1) for more details.<br />

To remove the /tmp/core file from all 3 hosts, enter:<br />

% lsgrun -m "hostA hostD hostB" -p rm -r /tmp/core<br />

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

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

Saved successfully!

Ooh no, something went wrong!