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

Re: 20030411: Intel 7.1 compiler and netCDF



>To: Bill Skamarock <address@hidden>
>cc: <address@hidden>
>From: Tim Hoar <address@hidden>
>Subject: Intel 7.1 compiler and netCDF
>Organization: NCAR/CGD
>Keywords: 200304112246.h3BMkX7U003978 netCDF Intel 7.1 compilers

Hi Tim,

> I am now installing the Intel 7.1 suite of compilers and
> I am having trouble building the netcdf libraries.
> 
> (as per 
> http://www.unidata.ucar.edu/packages/netcdf/other-builds.html#intel-ifc)
> I dutifully applied the patch and set the following environment variables:
> 
> source /opt/Intel/compiler70/ia32/bin/iccvars.sh
> export CC=icc
> export FC=ifc
> export F90=ifc
> export CXX=icc
> export CFLAGS="-O -mp"
> export CXXFLAGS="-O -mp"
> export CPPFLAGS=""
> export FFLAGS="-O -mp -lPEPCF90"
> export FLIBS="-L/opt/Intel/compiler70/ia32/lib"
> export INCLUDE="-I/opt/Intel/compiler70/ia32/include"
> 
> the configure went fine, but the subsequent "make" bombed:
> 
> ...
> 
> Making `all' in directory /usr/local/src/netcdf-3.5.0/src/cxx
> 
> make[2]: Entering directory `/usr/local/src/netcdf-3.5.0/src/cxx'
> icc -c -O -mp -I../libsrc -I.   ncvalues.cpp
> ncvalues.h(40): warning #68: integer conversion resulted in a change of sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> 
> ncvalues.cpp(313): error: no instance of overloaded function
> "std::basic_ostream<_Elem, _Traits>::flags [with _Elem=char,
> _Traits=std::char_traits<char>]" matches the argument list
>             argument types are: (long)
>             object type is: std::ostream
>       os.flags(save);
>          ^
> 
> ncvalues.cpp(325): error: no instance of overloaded function
> "std::basic_ostream<_Elem, _Traits>::flags [with _Elem=char,
> _Traits=std::char_traits<char>]" matches the argument list
>             argument types are: (long)
>             object type is: std::ostream
>       os.flags(save);
>          ^
> 
> compilation aborted for ncvalues.cpp (code 2)
> make[2]: *** [ncvalues.o] Error 2
> make[2]: Leaving directory `/usr/local/src/netcdf-3.5.0/src/cxx'
> make[1]: *** [subdir_target] Error 1
> make[1]: Leaving directory `/usr/local/src/netcdf-3.5.0/src'
> make: *** [cxx/all] Error 2

These errors in compiling the C++ interface are due to problems with
netCDF 3.5.0 complying to earlier versions of C++ compilers and
standards.  netCDF 3.5.1beta10 has been updated to comply with the
current C++ standard:

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-beta.tar.Z

Unfortunately, the patches for 3.5.0 may not work with this newer
version.  At your convenience, please try the above beta test version
without any patches for the Intel 7.1 compilers and let us know
whether it works.

Alternatively, if you don't need the C++ interface, you could just
set the environment variable CXX='' before running the configure
script in version 3.5.0 to indicate that the C++ interface should not
be built ...

> I then tried to use the gcc compilers instead of the ifc ones to
> no avail (haven't tried to see what switches make the ifc compiler
> compatible with gcc stuff -- my computers shut down in 20+ minutes ...)

The 3.5.1-beta10 release has been tested with the latest gcc 3.x
compilers.

--Russ

_____________________________________________________________________

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