[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #YYM-734195]: 64 bit SunStudio cc/f90 netcfd 4.0



Hi Udo,

First, thanks very much for confirming my suspicion that the problem
you originally reported was a compiler optimization bug.  From reading
the cc man page, I was under the impression that -O2 was the default
when you specify -O with no level number, but that no optimization was
performed if -O was not specified.  Evidently -O0 must be explicitly
specified to turn off optimization on the Sun Studio 12 compiler.

I'm also grateful that you will report the compiler bug to Sun, since
otherwise I would feel obligated to take the time to do that, and it
seems that you have a better understanding of the bug, and therefor a
better chance of convincing the developers that it is a bug.

Finally, I have a solution for the symbol referencing errors you are
seeing in nf_test.  According to the netCDF installation guide, it is
now necessary to use FCFLAGS rather than F90FLAGS if you have a flag
that is common to both f77 and f90/f95 compilers:

 
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install.html#Environment

So you need to specify FCFLAGS=-m64 rather than F90FLAGS=-m64.  I have
duplicated your original problem and verified that using FCFLAGS
instead of F90FLAGS fixes the problem.

I note that F90FLAGS is still documented for use when different flags are
needed for the f77 and f90/f95 compilers, so I'm not sure why it doesn't
work to specify the same flags in both FFLAGS and F90FLAGS.  I'm Cc:ing
Ed in case he can explain that.

In reward for your work on the compiler bug, your next 3 downloads of netCDF
software are free ... :-).

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: YYM-734195
Department: Support netCDF
Priority: Normal
Status: Closed