netCDF-3.6.3 install with Intel compilers on Scientific Linux 6.1 x86-64

Table of Content

I could not install netcdf when I upgraded to Scientific Linux 6.1 (x86-64). After “configure” I found an error like

Error: ld: cannot find -lm

This error appears because the static version of glibc is not installed anymore on a newer redhat like linux (see here). Thus you need to install it.

# yum install glibc-static.x86_64


netCDF-3.6.3 may still be better to be installed for FVCOM. In case using Intel compilers 12.1.3 for FVCOM, you also need to compile netCDF using the same compilers. The following environmental parameters in bash may be fine. Here “-xHost” is a flexible option for optimization available on each system.

export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static'
export F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static'
export CPP='icc -E'
export CXXCPP='icpc -E'

Then you can compile and install netCDF in the extracted directory as follows:

$ ./configure --prefix=/usr/local/netcdf-3.6.3-ifc12.1.3

$ make

$ make check  # optional test

# make install


メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください