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:
ser
is still ser
is currently SGI-specific since it makes use of the SGI propietary
gl
library, rather than (for example) OpenGL
in conjunction
with some window management library. Thus you must be at an SGI graphics console in
order to use the application.
ser
must be carefully terminated (see
below), or subsequent
users (including yourself) may have trouble re-starting the application.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 einsteinwill 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.eduI 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` endifIf you do this you will, for the most part, be able to forget about setting
VSHOST
explicitly.
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
% serYou should see a window like the following appear in the upper-right hand corner of the screen:
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:VSHOST
environment variable
to the machine on which the server is running, type
% cli -1
ser: Server already runningsomeone has probably failed to do a proper shut-down. If you were the culprit, then type
% killall rvs_serthen 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).
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):
65/65 (65)mean that the server is displaying time step 65 of 65 stored and that there are 65 data points being displayed.
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
.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_nameTo send the data in a 1d RNPL-style
.sdf
file to the server, use
% sdftovs file_name
ser
window, and at a
particular time index, use
% vsget window_name indexIf the specified data exists it will be echoed to standard output.
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.