This document will be updated throughout the course
RNPL_RNPL RNPL_RNPL_FLAGS (only needed on Crays) RNPL_F77 RNPL_F77LOAD RNPL_F77PP RNPL_FLIBSThe natural place to set these is in your (and your group's) ~/.cshrc files. Note that in your ~/.cshrc on the SGIs you may want to detect whether you are on a 64-bit or 32-bit machine. This can be done with the following csh construct:
if( `uname` == IRIX64 ) then setenv RNPL_F77 "f77 -64 -O3 -YI,/usr/local/include" . . . else setenv RNPL_F77 "f77 -n32 -O -YI,/usr/localn32/include" . . . endifCurrent valid settings of the above environment variables for various local machines are listed here.
% new Makefile.rnpl.f77.generic % mv Makefile.rnpl.f77.generic Makefile
usage: bsnew lo hiIntializes the search interval limits to lo and hi and echoes the limits to stdout.
usage: bscurrEchoes the current search value--(lo + hi) / 2--to stdout
usage: bsloReplaces the low end of the search interval with the current search value and echoes the search limits
usage: bshiReplaces the high end of the search interval with the current search value and echoes the search limits
usage: bsfracEchoes the fractional size of the search interval--(hi - lo) / hi--to stdout.
usage: bsdone [tol]Exits with a return code of 0 (success) if `bsfrac` < tol, or 1 (failure) otherwise.
% bsnew 0.0 1.0 0.0 1.0 % bscurr 5.000000000000000e-01 % bslo 5.000000000000000e-01 1.0 % bslo 7.500000000000000e-01 1.0 % bslo 8.750000000000000e-01 1.0 % bshi 8.750000000000000e-01 9.375000000000000e-01 % bshi 8.750000000000000e-01 9.062500000000000e-01 # Pass the current search value to another command % Setpar rnpl_file search_parameter `bscurr` % bsfrac 3.508771929824561e-02
% newwith no arguments, you will get a listing of available template files. Among these will be
Makefile.rnpl.f77.32 Makefile.rnpl.c.32Typing
% new Makefile.rnpl.f77.32or
% new Makefile.rnpl.c.32will copy a template Makefile for a f77 or C application to the current working directory. You will then have to rename the file; for example
% mv Makefile.rnpl.f77.32 Makefileand then follow the instructions in the Makefile for tailoring to your specfic application.
% sdftovs sdf_file [ sdf_file ... ]or to scivis via
% sdftosv sdf_file [ sdf_file ... ]Typing either command without arguments will result in a usage message. Note that the .sdf file format is binary and machine-independent; further details concerning the full .sdf interface may be found here
% setenv BBHSV on % setenv BBHHOST einstein.ph.utexas.eduthen output generated via vsxynt goes directly to scivis, so that you interactively watch the output from your calculations. To revert to .sdf file output, be sure to unset both environment variables.
% unsetenv BBHSV % unsetenv BBHHOST
% setenv VSHOST einstein.ph.utexas.eduYour group accounts' .cshrc files will generally set VSHOST to the proper value, so normally you shouldn't have to worry about explicitly setting it.
% seg2vs segdat_file [ segdat_file ... ]Again, the VSHOST environment variable in the invoking shell must point to the machine on which the server is running.
character*2 itoc . . . level = i4arg(1,i4_never) . . . call vsxynt('u'//itoc(level),t,x,u,nx) . . .itoc is implemented as
character*(*) itocso that the (mandatory!) declaration of itoc in the invoking routine can, in general, be character*N, where N is the maximum anticipated number of digits in the integer(s) to be converted.
% usage: vsget window_name indexTwo-column ascii data (x, y pairs separated by whitespace only) can be piped to the server using the v1 and vn commands:
% v1 [ window_name ]where window_name defaults to Standard input, or
% vn window_name [ time ]Note that although ser/vs has no intrinsic facilities for hard-copy output, it implements an interface to sm (Supermongo) accessible via the sm selection on the pull-down menu. In addition, .mpeg movies of the data in any window can be created via the mpeg pulldown menu---I recommend that you make movies using a ``quarter-size window'' such as this one. If you only have a single (full size) window open in the server, clone the window (either from the control sub-menu, or by typing SHIFT-C in the window) to get two windows of reduced size. Finally, note that the mpeg generation facility, creates .rgb images which can be converted into .gifs for use in .gif sequence animations.
You should be able to use scivis on the SGI machines simply by typing
% jserIf you want to send data from another machine to the server, make sure that on the remote machine (where the data is coming from), the environment variable JSERHOST is set to the machine where scivis is running. Also note that scivis is an X-based application so that you can run it on one machine and have the graphics displayed on another (i.e. the machine you are sitting in front of) via the DISPLAY environment variable.
Note: Due to a bug in SGI's implementation of Java, you must resize any window that scivis creates in order for the keyboard accelerators to work---i.e. so that CTRL-a starts animation, CTRL-s stops it etc.
ser
is a very powerful tool for analyzing
the output of finite-difference codes in one spatial dimension
and time. Any of the Center for Relativity graduate students
or postdocs who are working with me will be happy to give you
a quick tutorial, as will I.
% explorerHere are links to the IRIS Explorer Center and Postscript versions of the User's Guide with graphics and without graphics.
gft_out_bboxshould suffice. Here is a usage example:
integer nx, ny parameter ( nx = 65, ny = 33 ) real*8 gfcn(nx,ny) real*8 xmin, xmax, ymin, ymax, & time integer shape(2), rank real*8 bbox(4) . . . c------------------------------------------------------ c 'bbox' defines 'bounding box' of coords. c associated with the data: c c bbox := ( xmin, xmax, ymin, ymax ) c------------------------------------------------------ bbox(1) = xmin bbox(2) = xmax bbox(3) = ymin bbox(4) = ymax rank = 2 shape(1) = nx shape(2) = ny do it = 1 , nt . . . c------------------------------------------------------ c The first (string) arg. to 'gft_out_bbox' c is stripped of non alphanumeric/underscore c characters (including punctuation) if necessary, c and then used as the 'stem' for a filename of c the form 'stem.sdf'. All calls to 'gft_out_bbox' c with the same string result in output to the c same file. c------------------------------------------------------ time = it * 1.0d0 call gft_out_bbox('gfcn',time,shape,rank, & bbox,gfcn) end do . . .
The gft_ routines use a machine-independent binary format; thus data output using gft_out_bbox on a Cray, for example, can be processed on an SGI. On the SGIs, 2- and 3-D data is best visualized using IRIS Explorer. A locally developed module, called ReadSDF_GFT0, is available for Explorer input of data written using the gft_ routines. Here's an image of an Explorer map which uses this module.
% nbody 2.0 0.01 < nbody_input | pp2d % nbody 2.0 0.01 < nbody_input | pp2d -mHelp is available via
% pp2d -hThe source code, pp2d.c and pp2d.h, may be of interest to those of you interested in using OpenGL for graphics programming. Makefile for pp2d.
% cc -n32 -I/usr/local/include pp2d.c -L/usr/localn32/lib -lglut \ -lMesaaux -lMesatk -lMesaGLU -lMesaGL -lXmu -lXi -lXext -lX11 \ -lm -o pp2d
p329fsa.f
.
See
source
code
and course notes for further information.% f77 pgm.f -L/usr/localn32/lib -lp329 -o pgm
einstein% set DISPLAY linux1.ph.utexas.edu:0 einstein% ghostview somefile.psNote: Not all Postscript files will have .ps extensions, but many do by convention.
einstein% gnuplot . . . Terminal type set to 'x11' gnuplot> help . . . gnuplot> quit
einstein% sm Can't find entry for iris-ansi-net in /usr/local/lib/sm/termcap Hello Matt, please give me a command : device x11 : help . . . : quit
% ls document.tex % latex document.tex This is TeX, Version 3.14159 (C version 6.1) (document.tex LaTeX2e <1996/06/01> Hyphenation patterns for english, german, loaded. . . . No file document.aux. [1] (document.aux) ) Output written on document.dvi (1 page, 696 bytes). Transcript written on document.log. % ls document.aux document.dvi document.log document.tex
% ls document.aux document.dvi document.log document.tex % xdvi document
% ls document.aux document.dvi document.log document.tex % dvips document Got a new papersize This is dvips 5.58 Copyright 1986, 1994 Radical Eye Software ' TeX output 1997.01.22:1442' -> document.ps. [1] % ls document.aux document.dvi document.log document.ps document.tex