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.

Running Remote Tasks<br />

Running Remote Tasks<br />

lsrun is a non-batch utility to run tasks on a remote host. lsgrun is a nonbatch<br />

utility to run the same task on many hosts, in sequence one after the<br />

other, or in parallel.<br />

The default for lsrun is to run the job on the host with the least CPU load<br />

(represented by the lowest normalized CPU run queue length) and the most<br />

available memory. Command-line arguments can be used to select other<br />

resource requirements or to specify the execution host.<br />

To avoid typing in the lsrun command every time you want to execute a<br />

remote job, you can also use a shell alias or script to run your job.<br />

For a complete description of lsrun and lsgrun options, see the lsrun(1)<br />

and lsgrun(1) man pages.<br />

In this section ◆ “Running a task on the best available host” on page 416<br />

◆ “Running a task on a host with specific resources” on page 416<br />

◆ “Running a task on a specific host” on page 417<br />

◆ “Running a task by using a pseudo-terminal” on page 417<br />

◆ “Running the same task on many hosts in sequence” on page 417<br />

◆ “Running parallel tasks” on page 417<br />

◆ “Running tasks on hosts specified by a file” on page 418<br />

Running a task on the best available host<br />

To run mytask on the best available host, enter:<br />

% lsrun mytask<br />

<strong>LSF</strong> automatically selects a host of the same type as the local host, if one is<br />

available. By default the host with the lowest CPU and memory load is<br />

selected.<br />

Running a task on a host with specific resources<br />

If you want to run mytask on a host that meets specific resource requirements,<br />

you can specify the resource requirements using the -R res_req option of<br />

lsrun.<br />

For example:<br />

% lsrun -R 'cserver && swp>100' mytask<br />

In this example mytask must be run on a host that has the resource cserver<br />

and at least 100 MB of virtual memory available.<br />

You can also configure <strong>LSF</strong> to store the resource requirements of specific tasks.<br />

If you configure <strong>LSF</strong> with the resource requirements of your task, you do not<br />

need to specify the -R res_req option of lsrun on the command-line. If you<br />

do specify resource requirements on the command line, they override the<br />

configured resource requirements.<br />

See the <strong>Platform</strong> <strong>LSF</strong> Reference for information about configuring resource<br />

requirements in the lsf.task file.<br />

416<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!