Subject: Re: tgcm cray mem bug

From: Steve Gombosi <[email-masked]>
Date: Sun, 3 Dec 2000 09:34:55 -0700 (MST)

Ben,

There are several levels of "debug" code available on the compilers.
You can specify which level you want with the -G (capital "G") option.
-G 0 prevents all optimizations. It's intended to permit line-by-line
symbolic debugging. On the Crays, this prevents vectorization as well
as any kind of instruction reordering. -G1 and -G2 generate somewhat
better code than -G0. The "-g" (little "g") is the same as specifying
-G0. Instead of "-g", try using "-G1" or "-G2". 

Whether you get a traceback or a dump (or both) is controlled by
a set of environment variables specified at run-time. These 
variables are decribed in the REPRIEVE man page. By default,
the Fortran error processing routines produce just a simple 
traceback. You can modify this behavior with the following
variables:
-----------------------------------------------

     TRACEBK     If set to 0, errors will cause a core dump but no
                 traceback.  If you intend to use a debugger to debug your
                 applications, or if you want to restart your core files,
                 you should set this variable to 0.

     TRACEBK2    If set to nonzero (and TRACEBK is not set to 0), programs
                 on UNICOS systems will use the enhanced traceback
                 mechanism.

     The variables below are used to customize an enhanced traceback and
     are available only on UNICOS systems if the TRACEBK2 variable is also
     set:

     TRBKCORE    If set to nonzero, it will give both a traceback and a
                 core dump on encountering an error.

     TRBKVEC     If set to nonzero, the vector registers will be printed
                 along with the other registers.
-----------------------------------------------

I would like you to specify the following environment settings in your
job:

setenv TRACEBK2 1
setenv TRBKVEC 1
setenv TRBKCORE 1

and compile your program with -G2.

This should allow us to get considerably more information with the least
impact on run time..

Steve