For most of the CDF code run on R10000 processors,
we suggest the following compiler options.
-32 -mips2 -O2 -static
Considering each option in turn:
-32 This is an option which deals with the addressing space
(but not the data representation).
The -32 option is the default under IRIX 6.2. The
other possibilities are -64 and -n32
We don't currently have a need for the larger address space
made available by the -64 addressing option. By using -32 we
avoid changing existing source code which uses addresses
(for example, YBOS).
Using -n32 would also be a possibility, as it also
does not require changing existing source code.
However, this option excludes linking against libraries
created under IRIX 5.3
Note: this is the key choice, as the
-64,-n32 & -32 addressing options are not compatible.
Hence, one needs the CDF code, the CERN
library, the Fermilab rbio and ocs libraries,
and the tcl library to all be compiled with the same
addressing option.
-mips2 This is an option related to the hardware instruction
set on the machine.
This choses the fastest hardware instruction set
available under -32 addressing.
-O2 This is an option related to the software optimization
levels of the compiler.
The -O2 option is the highest available option that
is convenient to use.
Code compiled with the -O3 option may run somewhat faster
as a global optimization is used. However, this
option appears to be too difficult to use in practice.
Note: a handful of routines may need to be compiled with
the lower optimization -O1 to avoid various bugs in the
compilers.
-static Use as required. Old code such as the CDF libraries
and the CERN Mathlib require this qualifier. It is
mentioned it here as it affects benchmarking results.
This set of qualifiers has been tested and found to
produce executables which run on R4400 and R5000 processors,
in addition to the R10000 where the executable was built.
The "Tiny" benchmark program (designed to be similar to HEP
reconstruction programs) has been found to run at approximately
the same speed on the R10000 (to within 15%) whether compiled with
-32 -mips2 -O2 -static
or with
-n32 -mips3 -O2 -static
The Run II code development requires -32, please note the following
mail message from Liz Sexton-Kennedy:
To: wicklund
cc: sexton@b0nd18, marafino@fnal.gov
Subject: Re: Preliminary proposal for IRIX 6.2 compiler options (from Oct 28th)
Date: Thu, 27 Mar 1997 12:15:29 CST
From: Liz Sexton-Kennedy
Hi Eric,
You might also add that g++ ONLY works with the -32 option. Run2
developers really doesn't have a choice. We MUST start with:
-32 -mips2 -O2 (-static as necessary)
for IRIX 6.2 systems (ie. when cdfsga is first upgraded). As the compiler
situation changes we should re-evaluate this decision for run2 code but for
run1 I see no real benefit to changing.
Cheers, Liz
In summary:
When we use the options
-32 -mips2 -O2 -static
we obtain executables which run on the
R4400, R5000 and R10000 machines that CDF has.
We retain the ability to link against libraries created
under IRIX 5.3 Moreover, such executables run
with high efficiency.
References:
Please see URLs:
http://www.sgi.com/Products/software/IRIX6.2/irix6.2TR.html#HDR42
http://www.sgi.com/Technology/TechPubs/dynaweb_bin/0610/bin/
nph-dynaweb.cgi/dynaweb/SGI_Developer/Mpro_n32_ABI/@Generic__BookView
for more information.
Acknowledgements:
Liz Sexton-Kennedy and John Marraffino made the key recommendations herein.
J.J. Schmidt ran the "Tiny" benchmarks.
Last updated and validated August 28th, 1997 by Eric J. Wicklund