Boo & Ed's
Web Pages

Albums
News
Ed's CV/Resume
Computing
Ed's Blog
   Laptop & WQXGA ?
   XV RPM spec file
   FC5 on eMachine
   Subvert Subversion
   Baroquen
   Electric Shavers
   NetCDF for Intel
PGP Key




2006-01-07 :: Building netCDF for Intel/IA64 with ifort/icc

These steps show what was done on an Altix 350 system but they are very similar for most Linux installations:
  • Get the Linux compilers from Intel.
  • Get netCDF where the version used here was netcdf-3.6.0-p1.tar.gz
  • Install the compilers following the directions. I like to put the C/C++ compilers, Fortran compiler, and debugger in a single directory such as /opt/intel_9.0.03x which is not the default and perhaps not the most flexible approach, but works fine for my purposes.
  • Build and install netCDF with:
       mkdir /home/edhill/netcdf
       mkdir /home/edhill/netcdf/9.0.03x
       cd /home/edhill/netcdf
       tar -xzvf ~/netcdf-3.6.0-p1.tar.gz
       cd netcdf/src
       FC='/opt/intel_9.0.03x/bin/ifort' FFLAGS='-i-static' \
         CC='/opt/intel_9.0.03x/bin/icc' CFLAGS='-i-static' \
         CPPFLAGS="-fPIC -DpgiFortran" \
         ./configure --prefix=/home/edhill/netcdf/9.0.03x
       make
       make install
    
    where its helpful to note that:
    • the -fPIC option is not needed for netCDF itself but it is usually needed to build netcdf-dependent codes such as NCO which need to create shared libs
    • the -i-static works for v9.x and -static can be used for v8.x Intel compilers

  • Then, optionally, become root and copy the netCDF headers and libs into the standard locations used by the Intel compilers:
       cp /home/edhill/netcdf/9.0.03x/include/* /opt/intel_9.0.03x/include
       cp /home/edhill/netcdf/9.0.03x/lib/* /opt/intel_9.0.03x/lib