netcdf ビルドログ @ hamachi-epa

準備

必要なファイルの取得

必要なファイル

ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.1.1.tar.gz
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.2.tar.gz

ビルド

netcdf

ビルドは ~/tmp/netcdf で行う.

展開

% tar xvf netcdf-4.3.1.1.tar.gz
% cd netcdf-4.3.1.1

環境変数の設定, configure, make

% setenv CC pgcc
% setenv CXX pgc++
% setenv FC pgf90
% setenv F90 pgf90
% ./configure --prefix=/home/yot/local/netcdf-4.3.1.1-pgi | & tee zzz-config.log
(% make |& tee zzz-make.log)
% make check |& tee zzz-make_check.log
% make install |& tee zzz-make_install.log

edit ~/.cshrc to include a following line.

% setenv LD_LIBRARY_PATH "/home/yot/local/netcdf-4.3.1.1-pgi/lib:$LD_LIBRARY_PATH"
% source ~/.cshrc

% cd ..
% tar xvf netcdf-fortran-4.2.tar.gz
% cd netcdf-fortran-4.2
% setenv CPPFLAGS "-I/home/yot/local/netcdf-4.3.1.1-pgi/include"
% setenv LDFLAGS "-L/home/yot/local/netcdf-4.3.1.1-pgi/lib"
% setenv LIBS "-lnetcdf"
% ./configure --prefix=/home/yot/local/netcdf-4.3.1.1-pgi | & tee zzz-config.log
(% make |& tee zzz-make.log)
% make check |& tee zzz-make_check.log
% make install |& tee zzz-make_install.log