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

[netCDF #XWL-678268]: Update for the Sun/Solaris Studio compiler support



Hi,

> This isn't really a support request, just a bit of additional
> information that I wanted to send to you.

Thanks!  I've included your report in our "other builds" page at

  http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html

Maybe it will be of help to future netCDF users.

--Russ
   
> I am using NetCDF 4.1.2 compiled with the Solaris Studio 12 update 2
> compilers (the new name for Sun Studio) on Linux (CentOS release 5.5),
> which is one of your "other builds". Another user reported a working
> setup previously, with the combination NetCDF 4.1 / SS 12.1. The
> resulting code mostly works but fails the make check because of some
> NaN issues ("NetCDF: Numeric conversion not representable").
> 
> This user sets "-fast" in his FLAGS, which is a macro that includes
> "-fsimple=2", the aggressive floating point optimization flag. The SS
> 12.2 documentation states (amongst other things) that:
> * -fsimple=0 is the only one preserving strict IEEE 754 conformance
> * -fsimple=1 assumes that "computations with Infinity or NaNs (?Not
> a Number?) as operands need not propagate NaNs to their results"
> 
> "-fsimple=1" doesn't work (checked), so the solution here is to
> specify "-fsimple=0" after "-fast" (which should work but I didn't
> test it!), or to set things up like this:
> 
> CPPFLAGS="-DsunFortran"
> CC=suncc CFLAGS="-O3 -xtarget=native -fsimple=0"
> CXX=sunCC CXXFLAGS="-O3 -xtarget=native -fsimple=0"
> F77=sunf77 FFLAGS="-O3 -xtarget=native -fsimple=0 -dalign"
> FC=sunf90 FCFLAGS="-O3 -xtarget=native -fsimple=0 -dalign"
> 
> Note that adding "-D__FUNCTION__=__func__" to the CPPFLAGS isn't
> necessary anymore.
> 
> I also needed the attached patch to "configure" as for some reason
> autoconf is broken on the development machine here, so impossible to
> do autoreconf.
> 
> The configuration line I used was:
> ./configure --prefix=${PREFIXDIR} \
> --enable-static \
> --enable-shared \
> --enable-large-file-tests \
> --with-hdf5=${PREFIXDIR} \
> --with-szlib=${PREFIXDIR} \
> --with-libcf \
> --enable-netcdf4 \
> --enable-cxx-4
> 
> With all that, all tests pass and further use of the library didn't
> show any error. Note that enabling netdcf4 without enabling cxx-4 will
> result in a build error.
> 
> Thanks!
> Regards,
> JF Le Fillâtre
> 
> --
> Departamento de Ingeniería Matemática
> Facultad de Ciencias Físicas y Matemáticas
> Universidad de Chile


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



Ticket Details
===================
Ticket ID: XWL-678268
Department: Support netCDF
Priority: Normal
Status: Closed