A P P E N D I X  C

Manual Configuration Information

This appendix provides instructions on some manual procedures that are alternatives to the configuration procedures in Chapter 4. If you perform the procedures as described in Chapter 4, which make use of the vglserver_config script, you do not need the information in this appendix.

This appendix contains configuration information for both Solaris and Linux based Sun Shared Visualization 1.1 servers. Topics include:


Adding Graphics to Sun Grid Engine Manually

This section describes how to add graphics resources to Sun Grid Engine. This section is an alternative to the procedures in Adding Graphics to Sun Grid Engine. The procedures in Chapter 4 should be simpler to perform in most cases than the alternative procedures here. However, if you need to set or update graphics resources manually, either procedure can be followed.

There is more information regarding the graphics resources and their meaning, with advice on sizing, in Sun Grid Engine Graphics Resources.

You must first install Sun Grid Engine and the Sun Shared Visualization 1.1 software before continuing with the procedures in this appendix.

These steps are to be performed as the sgeadmin user on the queue master host, or on an administrative host that mounts $SGE_ROOT read-write.


procedure icon  To Set the Variables

1. Set the $SGE_ROOT and PATH:


% source /gridware/sge/default/common/settings.csh

where /gridware is the base directory of your $SGE_ROOT.

2. Set your DISPLAY environment variable to the system whose X server keyboard you are using:


% setenv DISPLAY myhost:0.0

where myhost is the hostname of the X server and :0.0 identifies the X screen and display.


procedure icon  To Add Graphics to Sun Grid Engine



Note - If you are upgrading an existing Sun Shared Visualization software installation, you only need to perform Step 1, Step 8, and Step 9.


1. If the optional software was not already installed on the grid’s NFS server, then, as superuser, install that software.



Note - Ensure that your $SGE_ROOT value is your answer to the installation prompt, “Please enter your SGE_ROOT directory.”


2. Set an administrative email for Sun Grid Engine so all errors are reported by email.

a. Type:


% qconf -mconf

This command starts your $EDITOR with a file containing configuration variables.

b. Add the email address for the administrator_mail configuration variable, and save and quit the file.

3. Add resource names to the Sun Grid Engine complex.

The complex is the vocabulary of variables that can be specified. The five resources to add are described in TABLE C-1 and explained later in this chapter.


TABLE C-1 Resources to Add to Sun Grid Engine Complex

Resource 1

Resource 2

Resource 3

Resource 4

Name

graphics

maximum_graphics

graphics_alone

chromium

Shortcut

gfx

maxgfx

alone

cr

Type

INT

INT

INT

INT

Relation

<=

<=

<=

<=

Requestable

YES

YES

YES

YES

Consumable

YES

NO

NO

YES

Default

0

0

0

0

Urgency

0

0

0

0


Use one of the following three ways to add resource names:

As the sgeadmin, type:


% cd $SGE_ROOT/graphics
% ./add_to_complex

The script adds the information in TABLE C-1 to your Sun Grid Engine complex. In addition, the script adds resources for use with Sun Scalable Visualization software. These resources are named headnode, sc_rows, and sc_cols.



Note - Using the script is only successful if you have not defined the resources previously.


a. Start qmon.

b. Click on Complex Configuration.

The complex is displayed.

c. Add new entries to define new resources, using the information in TABLE C-1.

d. Click Add to add each new resource and Commit to save the updated complex.

a. Start qconf -mc.

This command opens your $EDITOR with the complex configuration.

b. Copy the slots line, and edit subsequent copies to look like the following:


graphics 				gfx     INT     <=      YES     YES     0 	0
maximum_graphics 				maxgfx  INT     <=      YES     NO      0 	0
graphics_alone 				alone   INT     <=      YES     NO      0 	0
chromium 				cr      INT     <=      YES     YES     0 	0

c. Save and quit the file.

d. Verify the complex configuration with qconf -sc.

The output can be minimized with just headings and the graphics lines:


% qconf -sc | sed -n ’1p;/graphics/p’

4. Define which hosts have how many graphics resources available.

This is the maximum number of simultaneous graphics jobs that Sun Grid Engine could start on that host. For example, if your host has two graphics boards and the boards can accommodate three jobs each, your resources would be 2 x 3, or 6.

There are two ways to define graphics resources:

a. Start qmon.

b. Click the Host Configuration button.

c. Click the Execution Host tab.

d. Select the host to specify the graphics resource.

e. Click the Modify button.

f. Click the Consumables/Fixed Attributes tab.

g. Click the Name button, select the resource name (for example, graphics), and click OK.

h. In the Value field, type the number of graphics cards available on this host.

i. Repeat Step g and Step h for the other resource names (maximum_graphics, graphics_alone, chromium, and so on).

j. Click OK and click Done.



Note - For more information about graphics resources, see More Graphics Resource Allocation Information.


k. Repeat from Step d for every host with graphics resources shared through Sun Grid Engine.

a. Type the qconf command:


% qconf -mattr exechost complex_values resourcename=value hostname

where resourcename is the names provided in TABLE C-1 and value is the number of resources on the hostname.



Note - Set the value of graphics_alone=1 to enable a dedicated graphics accelerator. Set the value of chromium=1 to identify the host as a Chromium head node.


b. Verify the setting:


% qconf -se hostname

The output is a list similar to:


qconf -se hostname
hostname              hostname
load_scaling          NONE
complex_values        graphics=2
:
:

Piping the output through grep can list just the complex values:


% qconf -se hostname | grep graphics

a. Use the qconf command to set graphics resources to queues:


% qconf -mattr queue complex_values graphics=value queue@hostname

b. Verify the complex_values file by typing one of the following commands:


% qconf -sq queue | grep graphics


% qconf -sq queue@hostname | grep graphics

5. Set the starter and epilog scripts for Sun Grid Engine’s all.q cluster queue.

These scripts are hooks supported by Sun Grid Engine to provide queue-specific activity before and after a job runs. There are several ways to set these scripts

a. As an SGE administrative login or as root, type:


% cd $SGE_ROOT/graphics
% ./use_standard

This action sets the starter and epilog scripts for all Sun Grid Engine queues.

b. Use the qconf command to set the starter script:


% qconf -mattr queue starter_method $SGE_ROOT/graphics/starter all.q

c. Use the qconf command to set the epilog script:


% qconf -mattr queue epilog $SGE_ROOT/graphics/epilog all.q

d. Use the qconf command to edit the queue:


% qconf -mq all.q

e. Use qmon’s Queue Control panel.

i. Type:


% qmon

ii. Select the Cluster Queue all.q.

iii. Click the Modify button at the right.

iv. Find the Execution Method tab.

v. In the fields for Epilog and Start Methods, type the path. For example:


Epilog						/gridware/sge/graphics/epilog
Starter Method						/gridware/sge/graphics/starter

6. (Optional) Copy the graphics/docs/README file to a more user accessible location.



Tip - The contents of the README file summarize Sun Grid Engine use. Edit the file to better describe your particular site, rename the file, and make the file available to users in $SGE_ROOT.


7. Ensure that your DISPLAY environment variable refers to your X server:


% setenv DISPLAY myhost:0.0

where myhost is the hostname of the X server.

8. Attempt to run a graphics job.

This example submits to any Shared Visualization graphics server:


% qrsh -b n /opt/VirtualGL/bin/vglrun -c proxy -spoil \
$SGE_ROOT/graphics/RUN.glxspheres

where:



Note - This step uses the -c proxy option, which usually is not recommended due to its impact on performance. However, using this option here simplifies the verification process without ongoing impact.


The next example names a graphics execution host:


% qrsh -b n -q all.q@hostname /opt/VirtualGL/bin/vglrun -c proxy -spoil  \
$SGE_ROOT/graphics/RUN.glxspheres

9. Start $SGE_ROOT/graphics/empty_jobs from /etc/init.d/sgeexecd.

/etc/init.d/sgeexecd is the Sun Grid Engine standard startup script and the script initiates shepherd processes. If these processes are shut down before the graphics jobs, you cannot reclaim the resources of those graphics jobs. To alleviate any possibility of this problem:

a. Edit the /etc/init.d/sgeexecd file and around line 245, find $bin_dir/sge_execd.

b. Insert the following text before that line:


pgrep -u sgeadmin sge_execd || $SGE_ROOT/graphics/empty_jobs

Replace sgeadmin if your site uses a different SGE administrative login.



Note - Unless /etc/init.d/sgeexecd softstop was used, graphics jobs that are still running when execd is shut down lose their the sge_shep shepherd processes, so the epilog script is not started for the jobs. Consequently, the job allocator does not know about any graphics resources being consumed by such orphan jobs.




Note - You need to repeat this step if the Sun Grid Engine software is upgraded.