This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Patrick Guio <address@hidden> >Subject: problem with ncdump (fwd) >Organization: . >Keywords: 199610020843.AA13593 Patrick, > > The patched version works on our 64-bit SGI when we use the compiler > > option > > > > -OPT:IEEE_comparisons > > > > This works even if -O is also used. > > > > On a 32-bit SGI, it works when we use the compiler options > > > > -n32 -OPT:IEEE_comparisons > > > > Hi Russ > > I don't really understand what is this option compiler. I have been > looking at the cc man pages, I don't find something similar to this. I > cannot figure out how to use this option on the SGI. With the cc and c89 MIPS and MIPSPro C compilers under IRIX 6.2, the -OPT:IEEE_comparisons compiler flag is an example of an "option group" specification, for which the man page says: Many options to cc are grouped into option groups of related options The command line format used for group options is -groupname:option[=value][:opt2[=val2]]... Thus, the group name is followed by a colon-separated list of options, each of which is an option name possibly followed by an equal sign and a value. The option names may generally be abbreviated by truncating them to a unique prefix (which may change when new options are added to the group). These options groups are available only when compiling -n32 or -64 Maybe your SGI compiler only supports the "-32" Application Binary Interface, instead of "-n32" or "-64", in which case the option groups aren't available. But I've found yet another solution that seems to work on all our UNIX platforms without any special compiler options to inhibit optimization. Just #include <math.h> at the top of ncdump/vardata.c, change the definition of the IS_FINITE() macro from #define IS_FINITE(x) (((x)-(x))==((x)-(x))) to #define IS_FINITE(x) (finite(x)) and link ncdump with a "-lm" option, if necessary, to get the finite() function from the math library. Although this seems to be portable to all our desktop Unix platforms, I don't know if it works on MSDOS, Windows, VMS, UNICOS, ... --Russ