Overview of `ser'


Introduction and caveats

ser (also known as vs) is an interactive graphics utility primarily designed for analyzing data generated from finite-difference solution of time-dependent problems in one space dimension. However, it has also proved useful in the anaysis of time-dependent computations in multiple-space dimensions. `ser' was designed in the client/server paradigm, and I will frequently refer to the program simply as "the server" in the following. The prospective user should carefully note the following:

Setting up your environment to use `ser'

ser and its supporting software uses the environment variable VSHOST to specify on which machine's graphics console ser is to run (or is running). The value of VSHOST should be the internet address of a machine in a sufficiently qualified form that the local machine (possibly the same machine) can resolve the address. If you are working on the local Center for Relativity machines, something like
   % setenv VSHOST einstein
will suffice, whereas if you are running a finite-difference application on the HPCF J-90, and want to send data directly to the server running on einstein you should type
   % setenv VSHOST einstein.ph.utexas.edu
I strongly recommend that you put the following lines in your .cshrc on the Center SGI machines (I'm assuming you are running the tcsh or csh):
   if ( $?REMOTEHOST ) then
      setenv VSHOST $REMOTEHOST
   else
      setenv VSHOST `hostname`
   endif
If you do this you will, for the most part, be able to forget about setting VSHOST explicitly.

Starting-up and Shutting-down `ser'

ser should always be run in a dedicated shell, as it will occasionally write diagnostic output to standard error. To start ser, first ensure that the VSHOST environment variable has been set to the name of the machine on whose console you are logged-in---probably einstein. Note again that ser must be run from the console of an SGI machine. You cannot, for example, run it on an X-term connected to an SGI. Then simply type
   % ser
You should see a window like the following appear in the upper-right hand corner of the screen:

This is the server status window. It can be relocated but cannot be resized.

Very important: Never kill the server status window by double clicking on the Motif "lightning"-bar on the upper left corner of the window. Rather, do one of the following to terminate execution of the program:

I cannot overemphasize how important it is to follow the above shutdown instructions. If you try to start the server and you get a message such as
   ser: Server already running
someone has probably failed to do a proper shut-down. If you were the culprit, then type
   % killall rvs_ser
then try starting the server again. If this doesn't work, contact Steve Liebling (steve@einstein.ph.utexas.edu) or myself (matt@infeld.ph.utexas.edu).

Sending data to `ser' from Fortran or C programs

The basic mechanism for sending data from a Fortran or C program to the server is the routine vsxynt. Typical Fortran usage is as follows:
      integer        maxn,      n
      parameter    ( maxn = 10 000 )
      real*8         x(maxn),   y(maxn)
      real*8         t

c     Define t, n and x(i), y(i) , i = 1 , n
                     .
                     .
                     .

c     Send the time=t data to the server

      call vsxynt('data',t,x,y,n)
which would send the vector data x(i), y(i), i = 1 , n as well as the scalar t to the server window named data. If such a window does not exist, the server will open it automatically.

An equivalent C example is:

 
   int  vxsynt(char *name, double time, double *x, double *y, int n);

   int        n;
   double     x[10000],  y[10000];
   double     t;

/* Define t, n and x[i], y[i] , i = 0 , n-1 */
                     .
                     .
                     .

/* Send the time=t data to the server */

   (void) vsxynt("data",t,x,y,n);

In either case, to link to the server library, use -L/usr/localn32/lib and -lvs:

   % f77 pgm.f -n32 -L/usr/localn32/lib -lvs -o pgm
   % cc  Pgm.c -n32 -L/usr/localn32/lib -lvs -o Pgm

Here is a short, but complete, Fortran program, vswave.f, which sends data representing the solution of a simple wave equation to the server; and here is a C program, Vswave.c which does precisely the same thing. Here is a Makefile for both applications. If you build vswave, for example, then run it in a shell where you have set VSHOST appropriately, then provided the server is running, you should end up with a display which looks like this (as the program runs, you should also see the data being displayed as it is generated):

The large yellow number is the time associated with the viewed profile, the numbers in parentheses in the lower-left and upper-right corners are the (x,y) coordinates of those corners, and the numbers in the upper-left corner
    65/65 (65)
mean that the server is displaying time step 65 of 65 stored and that there are 65 data points being displayed.

Sending data to `ser' from standard input

To send a single data set to the server from standard input, use either of the programs v1 or vn which have the following usages (arguments enclosed in [...] are optional):
   % v1 window_name         # defaults to 'Standard input'
   % vn window_name [time]
Both programs read (x,y) pairs from standard input, then transfer data to the server. Try
   % v1
   0.0  0.0
   1.0  1.0
   2.0  4.0
   3.0  9.0
   CTRL-D

Sending data to `ser' from files

There are two basic types of files which typically contain data which can be transmitted to the server: .segdat and 1d RNPL-style .sdf files. Both formats are binary, the .sdf format has the advantage of being machine-independent. The server can save the data in any window in either of the two formats (see the file menu).

To transmit the data in a .segdat file to the server, use

   % seg2vs file_name
To send the data in a 1d RNPL-style .sdf file to the server, use
   % sdftovs file_name

Extracting data from `ser' to standard output

To extract data from a particular ser window, and at a particular time index, use
   % vsget window_name index
If the specified data exists it will be echoed to standard output.

Some basic `ser' features

Under construction!!

Getting more information

Unfortunately, ser is, at this time, completely undocumented. In the absence of a manual, the best way to get some help is to ask someone familiar with the program. Any of the graduate students or postdocs working with me in the Center for Relativity will be happy to give you a quick tutorial, as will I.
Supported in part by NSF ACS/PHY 9318152 (ARPA supplemented)
Maintained by Matthew Choptuik
Please direct comments & suggestions to matt@infeld.ph.utexas.edu