Next: Conventions used in this
Up: GRASP Installation
Previous: Making the GRASP binaries
  Contents
There are a number of simple things that one can do during or after the
installation process that may make GRASP easier to maintain and/or use at your
site. For example, if is often extremely convenient for debugging
purposes to have a GRASP library (libgrasp.a) constructed with all the
symbol table information turned on, and another library constructed
with all the optimization switches turned on. Users who want their
code to run as fast as possible can link to the optimized library.
Users who want to track down problems within GRASP, or to step through
internal GRASP functions can link to the debug library. You can accomplish this
easily by building two separate GRASP libraries, as follows. (Note: since the
normal C-compiler debugging option is -g the debug library has
a _g appended to its name.)
- Edit your SiteSpecific.mysite file so that the debugging
switches are turned on (CFLAGS = -g, typically). You may also
want to build the GRASP example programs with the ``debug'' versions
of the Numerical Recipes libraries, in which case you should set
LRECIPES=recipes_cg in SiteSpecific.mysite. In simiilar
fashion you might also choose to link to FRAME libraries compiled with debugging
turned on.
- Build GRASP as described above, by running
InstallGRASP SiteSpecific.mysite.
- Make a copy of the GRASP library:
cp /usr/local/GRASP/lib/libgrasp.a
/usr/local/GRASP/lib/libgrasp_g.a
- Make a copy of the ``debug'' GRASP example programs:
cp -r /usr/local/GRASP/bin /usr/local/GRASP/bin_g
Note: the /usr/local/GRASP/bin directory contains links
to the actual executables, but for most unix systems this copy command
will copy the actual files. Your mileage may vary - choose the copy
option
which copies the files not the links!
- Remove your GRASP installation (i.e. everything but the
library and the executables, and original GRASP package) by typing:
RemoveGRASP
- Modify SiteSpecific.mysite so that the optimization options are
turned on (typically, CFLAGS = -O). You should also set the
Numerical Recipes library to the optimized versions, typically via
LRECIPES=recipes_c in SiteSpecific.mysite. In simiilar
fashion you might also choose to link to FRAME libraries compiled with optimization
turned on.
- Install GRASP again:
InstallGRASP SiteSpecific.mysite
Your GRASP installation will now contain two GRASP libraries:
/usr/local/GRASP/lib/libgrasp.a and
/usr/local/GRASP/lib/libgrasp_g.a and two sets of
executables, in
[4]/usr/local/GRASP/bin and
/usr/local/GRASP/bin_g.
Another useful trick is if you are building versions of GRASP for
several different architectures, on a shared /usr/local/ disk.
Here the procedure is the following:
- Create a SiteSpecific.arch1 file for the first machine
type.
- Install GRASP in the usual way:
InstallGRASP SiteSpecific.arch1
- Copy the libraries:
cp /usr/local/GRASP/lib/libgrasp.a
/usr/local/GRASP/lib/libgrasp_arch1.a
- Make a copy of the GRASP example programs:
cp -r /usr/local/GRASP/bin /usr/local/GRASP/bin_arch1
Note: the /usr/local/GRASP/bin directory contains links
to the actual executables, but for most unix systems this copy command
will copy the actual files. Your mileage may vary - choose the copy
option
which copies the files not the links!
- Remove your GRASP installation (i.e. everything but the
library and the executables, and original GRASP package) by typing:
RemoveGRASP
- Return to the first step above, and begin this process again, but this
time for the second machine architecture (i.e. change arch1 to arch2 above).
This method will avoid duplication of source files, documentation,
etc, while still providing a set of libraries and executables for
different machine types.
Next: Conventions used in this
Up: GRASP Installation
Previous: Making the GRASP binaries
  Contents
Bruce Allen
2000-11-19