LSF Version 7.3 - Administering Platform LSF
Load Sharing X Applications
610 Administering Platform LSF
Start an xterm in Exceed
To start an xterm:
1 Double-click the Best icon.
An
xterm starts on the least loaded host in the cluster and is displayed on your
screen.
Examples
Running any application on the least loaded host
To run appY on the best machine licensed for it, you could set the command line in
Exceed to be the following and set the description to appY:
lsrun -R "type==any && appY order[mem:cpu]" sh -c "appY -display your_PC:0.0 &"
You must make sure that all the UNIX servers licensed for appY are configured with
the resource "
appY". In this example, appY requires a lot of memory when there are
embedded graphics, so we make "
mem" the most important consideration in
selecting the best host among the eligible servers.
Starting an X session on the least loaded host in any X desktop environment
The above approach also applies to other X desktop environments. In general, if you
want to start an X session on the best host, run the following on an LSF host:
lsrun -R "resource_requirement" my_Xapp -display your_PC:0.0
where
resource_requirement is your resource requirement string
Script for automatically specifying resource requirements
The above examples require the specification of resource requirement strings by
users. You may want to centralize this such that all users use the same resource
specifications.
You can create a central script (for example
lslaunch) and place it in the /lsf/bin
directory. For example:
#!/bin/sh
lsrun -R "order[cpu:mem:login]" $@
exit $?
Which would simplify the command string to:
lslaunch xterm -sb -ls -display your_PC:0.0
Taking this one step further, you could create a script named lsxterm:
#!/bin/sh
lsrun -R "order[cpu:mem:login]" xterm -sb -ls $@
exit $?
Which would simplify the command string to:
lsxterm -display your_PC:0.0