Running X Window Applications under SCore

A little explanation is needed for running X Window applications under SCore. If you execute your X Window program using scrun(1) an X Window connection is forwarded from the application to the host where scrun is invoked, and a connection will be established between that host and the X Window server, rather than between the X server and the hosts running the application on the cluster. This means you will only need to add the host, where scrun is invoked, on the X server. An example of the command line is:
$ xhost +server
It is not necessary to add all compute host names to the list allowed to connect to the X server if the X server runs without X Authority. If the X server is running with X Authority, then the $HOME/.Xauthority or $XAUTHORITY file must be readable from any host in the cluster and the host where scrun is invoked (See also xauth(1) X11 man page). The scrun command sets the Xauthority file appropriately.

The following diagram will help to explain the internal mechanism that allows this to work:

[X Window diagram]
If you submit your program using scrun(1) to the cluster, scrun forks itself a sub-process for each X Window connection that is required by the X Window application. The sub-processes act as forwarders for X Window input and output requests from the a.out processes to the display terminal.

In order for this to work you must allow the sub-processes to make connections to the X server running on the display terminal so that the X server can forward input and output requests to the sub-processes. The above diagram shows one sub-process that has been forked to service the input and output requests of one X client that is running on host 'comp0' of the cluster. In this case, all X Window input and output requests are handled by one X client and the a.out processes forward requests to this client. The client then forwards or receives requests from the sub-process.

Here are the commands that were executed to display the X client:

server$ xhost +server
server$ scout -g pcc
server$ scrun -nodes=8 ./a.out
The value of the DISPLAY environment variable is automatically substituted with an appropriate value.

Multiple X clients and X servers are also supported. In this case, multiple sub-processes are created to service the X clients. You only need to add the host where scrun is invoked to the list allowed to connect to each X server.


$Id: xwindow.html,v 1.1.1.1 2002/02/12 02:00:13 kameyama Exp $