Re: [netcdfgroup] Building netcdf-3.6.0-p1 with intel 2011 compilers

I have some experience with netcdf 3.6.2, but intel pre-2011 (which uses some 
–xST –xSSE etc options – current ones can guess these extensions and no longer 
support the options as they were used on earlier versions). But one sensitive 
remark on these old versions of NetCDF is the following:
ncvalues.cpp:238: error: 'strncpy' was not declared in this scope 
ncvalues.cpp: In member function 'virtual char* NcValues_char::as_string(long 
int) const':
ncvalues.cpp:246: error: 'strncpy' was not declared in this scope 
make[2]: *** [ncvalues.lo] Error 1

    If you get this error while compiling, open cxx/ncvalues.cpp and find in 
the beginning of the file a
#include <string>
    Change it to
#include <cstring>

    It should fix that problem. Moreover, you can set NetCDF to use the intel 
suite (both C and Fortran versions) by issuing ./configure this way:
FC=ifort F77=${FC} CPP="icc -E" CXX="${CPP}" CXXCPP="${CPP}" CFLAGS="-O2" 
FCFLAGS="${CFLAGS}" F77FLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" ./configure 
--prefix=${HOME}/netcdf3 && make all install

    This -should- do it using only intel compiler suite. I think additional 
flags could improve a bit the resulting binary, but this seems to be a vanilla 
ifort compilation flags that should work, given the problem in ncvalues.cpp is 
fixed.

I hope it helps,
Fabricio Murta

From: hossein shahbazi 
Sent: Sunday, February 03, 2013 9:52 AM
To: netcdfgroup@xxxxxxxxxxxxxxxx 
Subject: [netcdfgroup] Building netcdf-3.6.0-p1 with intel 2011 compilers

      Dear All

      I want to build netcdf-3.6.0-p1 with intel 2011 compilers on Ubuntu 12.04 
- 64bit
      Can anyone tell me please what flags should i use?

      Thanks in advance
      Hossein
     



--------------------------------------------------------------------------------
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/
  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: