Firstly you can create a Catwalk environment on your machine with the catwalk command with the -mpi option but no command follows. Then the catwalk proess becomes a daemon proess and output some message where some evironment variables setting are shown. Here is the example.
% catwalk -mpi export CATWALK_MPIIO=headnode:50052 setenv CATWALK_MPIIO headnode:50052 export CATWALK_DAEMON_PID=4884 setenv CATWALK_DAEMON_PID 4884 % export CATWALK_MPIIO=headnode:50052 % export CATWALK_DAEMON_PID=4884 % mpirun catwalk my_mpi_prog .. % catwalk -kill
The you cut the output messages and paste on a shell terminal. Thus a Catwalk environment is created. Finally you can run your MPI program(s) so that the files on the head node are accessed by the program. You can kill the Catwalk daemon process with the -kill option as shown in the above example.
This Catwalk daemon process enable remote access to any files on the machine. Thus it is very DANGEROUS to run the Catwalk daemon process and strongly recommended to use the Catwalk-ROMIO with the ssh described below.
mypc% catwalk -mpi -SSH head head% mpirun catwalk my_mpi_prog
When the Catwalk-ROMIO is invoked with the -SSH option, then Catwalk calls the ssh command with some appropriate options so that the TCP connections needed by Catwalk are established through the TCP forwarding of the ssh. In this case, the catwalk proess running on your machine is not a daemon process and when the ssh session terminates, the catwalk process also terminates.
The TCP forwarding port number on the head node can be specified when the remote host name is immediately followed by colon (:) and a port number (see below).
mypc% catwalk -mpi -SSH head:34567
Next, let us assume you have to go thtough a gateway machine to reach a cluster head node. The catwalk command only with the -SSH option can inherit the TCP forwarding settings. Note that if you put the -mpi option on the gateway node, in the example below, then the catwalk process running on the gateway will create a new Catwalk environment and no files on your machine will be able to access.
mypc% catwalk -mpi -SSH gate gate% catwalk -SSH head head% mpirun catwalk my_mpi_prog
The SSH optin sof Catwalk-ROMIO can also accept the SSH options. Here is the example of specifying the -Y option to forward the X11 protocol.
% catwalk -mpi -SSH -Y remote
% echo $CATWALK_MPIIO mymachine:50052 % emacs jobscript.sh ... mpirun catwalk -server mymachine:50052 my_mpi_prog ... # end of editing job script % qsub jobscript.sh
In the above example, it is assumed that you are already in a Catwalk environment. The only thining you have to do is that put the -server option followed by the value of the CATWALK_MPIIO environemnt variable.