Hi Raul,

I am assuming you are trying to install netcdf and hdf5 using the intel fortran compiler suite. For example, I use the newer Intel ® 64 Fortran and C compiler XE Suite v12.0. You may add the following lines to your ~/.bashrc file to set the proper environment to compile with intel fortran. The flags might be a bit different if you are using  older or AMD based processors.

# the C compiler (Composer XE suite)
export CC=icc
# the C++ compiler, the intel one.
export CXX=icpc
# the Fortran 9X compiler.
export FC=ifort
# the Fortran 77 compiler. For intel, is just the fortran one.
export F77=ifort
# C Compiler flags
export CFLAGS="-O3 -xHost -axSSE4.2 -fPIC"
# F9X Compiler flags
export FCFLAGS="-O3 -xHost -axSSE4.2 -fPIC"
# F77 Compiler flags
export FFLAGS="-O3 -xHost -axSSE4.2 -fPIC"
# CXX Compiler flags
export CXXFLAGS="-O3 -xHost -axSSE4.2 -fPIC"
# Linker flags
export LDFLAGS="-Wl,-rpath=/opt/intel/lib -Wl,-rpath=/opt/intel/lib/intel64 -i-dynamic"

Next, you need to get netcdf and hdf5. You could use your already downloaded version of netcdf and hdf5. Note, to use the NETCDF-4 features you should have at least HDF5-1.8.6 release installed. HDF5, in turn, must have been built with zlib, version 1.2.5. You can find a working version of HDF5 and zlib at the netCDF-4 ftp site at ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.

Otherwise download the latest versions of NETCDF and HDF5 at

http://www.unidata.ucar.edu/downloads/netcdf/netcdf-4_1_3/index.jsp

and

http://www.hdfgroup.org/ftp/HDF5/current/bin/linux-x86_64/hdf5-1.8.8-linux-x86_64-shared.tar.gz


extract the source files and to configure and build HDF5

>tar -zxvf hdf5-1.x.x.tar.gz (in place of x.x. , put the version you are using)

>cd hdf5-1.x.x.

>./configure --prefix=/path-to-hdf5/hdf5-1.x.x. --enable-fortran --enable-cxx

then

>make

and

>make install

Next, for NETCDF, configure with necessary options:

>./configure --prefix=/usr/local/netcdf --disable-dap --enable-netcdf4 --with-hdf5=/path-to-hdf5/hdf5 (note the default install root is /usr/local, and for this you need not use the --prefix argument)
 
If you get zlib errors, you may install zlib.

Next

make and make check, then make install.

You can have a look at this site (http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html) to see how some folk have achieved successful builds of netcdf on their OSes.

This site might also help with general information on netcdf installation.

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

Hope this helps a bit.

Cheers,

Bode





On Wed, Feb 1, 2012 at 1:13 PM, R Climate <rclimate@yahoo.com> wrote:
Dear Bode,
    I have 64-bit system with OpenSUSE 12.1

Thanks
Rahul

 


From: Bode Gbobaniyi <gbobaniyi@arcsstee.org>
To: R Climate <rclimate@yahoo.com>
Cc: "regcnet@lists.ictp.it" <regcnet@lists.ictp.it>
Sent: Wednesday, February 1, 2012 12:30:56 PM
Subject: Re: [RegCNET] the best procedure to install Netcdf4-HDF5?

Dear Rahul,

What flavour of Unix/Linux are you using? Is your OS x86 or x64 (32-bit or 64-bit)? These information might help regcneters give you a more suitable solution.

Regards,

Bode

On Wed, Feb 1, 2012 at 10:36 AM, R Climate <rclimate@yahoo.com> wrote:
Hi Regcnet,
    Can someone guide me to the best procedure to install Netcdf4-HDF5?  I get tired to install it with Intel-FORTRAN.
Which Netcdf4 and HDF5 versions are needed?

your help is welcome
 
Rahul



_______________________________________________
RegCNET mailing list
RegCNET@lists.ictp.it
https://lists.ictp.it/mailman/listinfo.cgi/regcnet



--
Emiola Olabode Gbobaniyi (PhD)
African regional Centre for Space Science and
Technology Education - English (ARCSSTE)
Obafemi Awolowo University Campus
Ile-Ife 220005, Nigeria
Tel: +234 8168034077
Web: http://www.arcsstee.org






--
Emiola Olabode Gbobaniyi (PhD)
African regional Centre for Space Science and
Technology Education - English (ARCSSTE)
Obafemi Awolowo University Campus
Ile-Ife 220005, Nigeria
Tel: +234 8168034077
Web: http://www.arcsstee.org