15-859 Course Software


Libraries

I'll be supporting two platforms primarily, the cluster Sparcs and SGI's, both running UNIX. You may use other hardware and operating systems, but in that case you're more on your own. Porting to Linux PC's will be relatively easy. Porting/rewriting software for Windows 95, 98, or NT will be quite a bit more work. To avoid porting and installing a lot of software by yourself, I recommend that you use one of the two supported platforms.

Commands


Web Browsers

.mailcap file -- see this if your web browser (netscape, explorer) doesn't display Postscript or PDF or Quicktime or MPEG files properly.

Setup

Put the class bin directory in your path so that you'll have easy access to the programs we'll need in this class, such as fdesign.
    setenv pubdir /afs/cs/project/classes-ph/859E/pub
    set path = ($path $pubdir/bin)
It's probably a good idea to put these commands in your .login file.

Linking

The libraries to link OpenGL programs differ between SGI's and Suns. Typical link sequences are:
on SGI: -lforms -lGLU -lGL -lX11 -lm 
on Sun: -lforms -lMesaGLU -lMesaGL -lX11 -lXext -lsocket -lm 
Makefiles will be provided that take care of most of these details.

You'll need to type the command

setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:$pubdir/lib
If you don't set these environment variables correctly, you'll get error messages when you go to run a program that uses a shared object file such as the Xforms library (libforms.so). The error message might look like:
rld: Fatal Error: Cannot Successfully Map soname 'libforms.so.0.86'
It's probably a good idea to put these setenv commands in your .login .

For hackers: If you have access to an SGI Octane or other SGI machine with a MIPS R8000 or better, you might get some performance advantages by compiling with the cc or CC option "-n32" or "-64" instead of "-o32", which is the default on Indy's. To set up for this, you'll probably want

setenv LD_LIBRARYN32_PATH /usr/local/lib32:$pubdir/lib32
If you compile with the -n32 option (as opposed to -o32) then you'll need to use lib32 directories, not lib's, and use the LD_LIBRARYN32_PATH variable. If you're not using an SGI or (not using -n32 compilation and not running executables compiled with -n32), then you won't need that latter environment variable. For more info on this gripping topic, see "man cc" or run "insight" on an SGI, and look in the SGI Developer collection for the "MIPSpro 64-Bit Porting and Transition Guide".

For hackers: You can get a list of shared object files that a given executable looks for, by running elfdump -Dl <PROGRAM> on an SGI or ldd <PROGRAM> on a Sun. If you're really curious about which versions of shared object files are getting linked in, you can set the following environment variables and this will affect the runtime linker, rld (on SGI's):

setenv _RLD_ARGS "-quickstart_info -v"
setenv _RLD_PATH /usr/lib/rld.debug
so that every time you run a program it will print gobs of info. To turn off the linker debugging info, do
unsetenv _RLD_ARGS
unsetenv _RLD_PATH

Documentation

For documentation, use the "rtfm" command or "man" command, e.g. "rtfm pgm" prints info on the PGM file format, "rtfm tifftopnm" prints info on the tifftopnm command. If "man" doesn't find manuals for all the programs you're able to run, you might need to change your MANPATH (probably defined in your .cshrc or .login). I have mine set to
setenv MANPATH /usr/share/man:/usr/man:/usr/contributed/man:/usr/local/man
Many interesting programs are in /usr/contributed, so don't forget that dir.
15-859E, Hierarchical Methods for Simulation
Paul Heckbert, Sept. 1998