cat brain.log | less

Getting it down on `paper`

NetCDF4, HDF5, dynamic libraries

// First, get and install zlib (for compression)

wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/zlib-1.2.7.tar.gz
tar xzf zlib-1.2.7.tar.gz 
cd zlib-1.2.7
./configure --prefix=/usr/local
make check
sudo make check install
cd ..
rm -rf zlib-1.2.7*

// Obtain and install the HDF5 libraries

wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/hdf5-1.8.9.tar.gz
tar xzf hdf5-1.8.9.tar.gz
cd hdf5-1.8.9
./configure --with-zlib=/usr/local --prefix=/usr/local

// If installing on Ubuntu 11, 12, you’ll need to reduce optimization.

CFLAGS=-O1 ./configure --with-zlib=/usr/local --prefix=/usr/local

// If installing on Mac OS X 10.7 and 10.8

CFLAGS=-O0 ./configure --with-zlib=/usr/local --prefix=/usr/local
make check
sudo make check install
cd ..
rm -rf hdf5-1.8.9*

// On ubuntu, if you want to use netcdf’s –enable-dap option, install curl.

sudo apt-get install libcurl4-openssl-dev

// Obtain and install NetCDF libraries.
// There are a few gotchas depending on distribution.

wget http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.2.1.1.tar.gz
tar xzf netcdf-4.2.1.1.tar.gz
cd netcdf-4.2.1.1
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local
make check
sudo make check install

// If this failed, you may need to specify the library path
// The way to do it specifying library path… (See note)

sudo LD_LIBRARY_PATH=/usr/local/lib make check install
cd ..
rm -rf netcdf-4.2.1.1*

// NOTE: If LD_LIBRARY_PATH was required.
On Ubuntu 12,

cd /etc/ld.so.conf.d
cat *.conf | grep /usr/local/lib

// If not found, create a file

sudo vi netcdf.conf

Contents:

/usr/local/lib

// Update the dynamic loader

sudo ldconfig

// Test to confirm changes are permanent

cd /usr/local/bin
ldd ncdump

// If libnetcdf.so.7 => not found, you’ll need to try something else.

vi ~/.profile

Add contents:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/usr/local/lib

External references:

 

Comments

No comments so far.

(comments are closed)