0% found this document useful (0 votes)
37 views6 pages

Install Notes

This document provides instructions for installing various libraries and dependencies needed to compile and run the COAWST modeling system, including zlib, hdf5, netcdf, mpich, libpng, jasperlib, and the MCT coupling library. It describes downloading, compiling, and installing each library, and modifying the bashrc file to set environment variables for library paths. Finally, it clones the COAWST source code repository from GitHub.

Uploaded by

Tio P Suwignyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Install Notes

This document provides instructions for installing various libraries and dependencies needed to compile and run the COAWST modeling system, including zlib, hdf5, netcdf, mpich, libpng, jasperlib, and the MCT coupling library. It describes downloading, compiling, and installing each library, and modifying the bashrc file to set environment variables for library paths. Finally, it clones the COAWST source code repository from GitHub.

Uploaded by

Tio P Suwignyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

install_notes.

md 2024-01-12

Libraries dependencies
1 Compiler

sudo apt update && \


sudo apt -y install gcc cpp g++ gfortran

2 zlib

mkdir -p /home/ict/workspaces/coawst/build_coawst/src && \


cd /home/ict/workspaces/coawst/build_coawst/src && \
wget http://www.zlib.net/fossils/zlib-1.2.11.tar.gz && \
tar xzvf zlib-1.2.11.tar.gz && \
cd zlib-1.2.11 && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/zlib && \
make && \
make install && \
nano ~/.bashrc

Add the following command at the end of the bashrc file

# zlib
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/zlib/lib
:$LD_LIBRARY_PATH

source ~/.bashrc

2 zlib

cd /home/ict/workspaces/coawst/build_coawst && \
mkdir -p /home/ict/workspaces/coawst/build_coawst/src && \
cd /home/ict/workspaces/coawst/build_coawst/src && \
wget http://www.zlib.net/fossils/zlib-1.2.11.tar.gz && \
tar xzvf zlib-1.2.11.tar.gz && \
cd zlib-1.2.11 && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/zlib && \
make && \
make install && \
nano ~/.bashrc
1/6
install_notes.md 2024-01-12

Add the following command at the end of the bashrc file

# zlib
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/zlib/lib
:$LD_LIBRARY_PATH

source ~/.bashrc

3 hdf5

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-
1.12.0/src/hdf5-1.12.0.tar.gz && \
tar xzvf hdf5-1.12.0.tar.gz && cd hdf5-1.12.0 && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5 --with-
zlib=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/zlib --enable-
fortran && \
make && \
make install && \
nano ~/.bashrc

Add the following command at the end of the bashrc file

# hdf5
export
PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5/bin:$PATH
export
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5/lib
:$LD_LIBRARY_PATH
export HDF5_HOME=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5
export HDF5_INCDIR=$HDF5_HOME/include
export CPATH=$HDF5_HOME/include
export HDF5_LIBDIR=$HDF5_HOME/lib

source ~/.bashrc

4 netcdf-c

2/6
install_notes.md 2024-01-12

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-
4.9.2.tar.gz && \
tar xzvf netcdf-c-4.9.2.tar.gz && \
cd netcdf-c-4.9.2 && \
sudo apt-get install libxml2-dev && \
sudo apt-get install m4 && \
sudo apt-get update && \
sudo apt-get install curl && \
sudo apt-get update && \
sudo apt-get install libcurl4-openssl-dev && \
sudo apt-get install zlib1g-dev && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf-c --
enable-netcdf-4 LDFLAGS="-
L/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5/lib" CPPFLAGS="-
I/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5/include" CC=gcc &&
\
make && \
make install && \
nano ~/.bashrc

Add the following command at the end of the bashrc file

# netcdf-c
export
PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf/bin:$PATH
export
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf/l
ib:$LD_LIBRARY_PATH
export NETCDF=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf
export NETCDF_INC=$NETCDF/include
export NETCDF_LIB=$NETCDF/lib
export NETCDF_INCDIR=$NETCDF/include
export NETCDF_LIBDIR=$NETCDF/lib
export NETCDFPATH=$NETCDF

source ~/.bashrc

5 netcdf-fortran

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget https://downloads.unidata.ucar.edu/netcdf-fortran/4.6.1/netcdf-
fortran-4.6.1.tar.gz && \
tar xzvf netcdf-fortran-4.6.1.tar.gz && \
cd netcdf-fortran-4.6.1 && \

3/6
install_notes.md 2024-01-12

sudo apt-get install libnetcdf-dev && \


./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf_fortran
LDFLAGS="-
L/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf_fortran/lib"
CPPFLAGS="-
I/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf_fortran/include"
FC=gfortran F77=gfortran && \
make && \
make install

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget https://downloads.unidata.ucar.edu/netcdf-cxx/4.3.1/netcdf-cxx4-
4.3.1.tar.gz && \
tar xzvf netcdf-cxx4-4.3.1.tar.gz && \
cd netcdf-cxx4-4.3.1 && \
CC=gcc CXX=g++ FC=gfortran FCFLAGS="-m64" \
F77=gfortran FFLAGS="-m64" \
CPPFLAGS="-I/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5/include
-I/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf/include" \
LDFLAGS="-L/home/ict/workspaces/coawst/build_coawst/LIBRARIES/hdf5/lib -
L/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf/lib" && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/netcdf && \
make && \
make install

6 mpich

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz && \
tar -xzvf mpich-3.3.2.tar.gz && \
cd mpich-3.3.2 && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/mpich FFLAGS=-
fallow-argument-mismatch && \
make && \
make install && \
nano ~/.bashrc

#mpich
export
PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/mpich/bin:$PATH
export
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/mpich/li
b:$LD_LIBRARY_PATH

4/6
install_notes.md 2024-01-12

source ~/.bashrc

7 libpng

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz && \
tar xzvf libpng-1.6.37.tar.gz && \
cd libpng-1.6.37 && \
./configure --
prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/libpng && \
make && \
make install && \
nano ~/.bashrc

# libpng
export
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/libpng/l
ib:$LD_LIBRARY_PATH

source ~/.bashrc

8 jasperlib

cd /home/ict/workspaces/coawst/build_coawst/src && \
wget https://www.ece.uvic.ca/~frodo/jasper/software/jasper-2.0.10.tar.gz &&
\
tar -xvzf jasper-2.0.10.tar.gz && \
cd jasper-2.0.10/build && \
sudo apt install cmake && \
cmake -G "Unix Makefiles" -
H/home/ict/workspaces/coawst/build_coawst/src/jasper-2.0.10 -
B/home/ict/workspaces/coawst/build_coawst/src/jasper-2.0.10/build -
DCMAKE_INSTALL_PREFIX=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/ja
sper && \
make install && \
nano ~/.bashrc

# jasper
export
PATH=/home/ict/workspaces/coawst/build_oawst/LIBRARIES/jasper/bin:$PATH
5/6
install_notes.md 2024-01-12

export
LD_LIBRARY_PATH=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/jasper/l
ib64:$LD_LIBRARY_PATH

source ~/.bashrc

COAWST Code

cd /home/ict/workspaces/coawst/ && \
sudo apt install git && \
git clone https://github.com/DOI-USGS/COAWST.git

MCT

cd /home/ict/workspaces/coawst/COAWST/Lib/MCT
MPIHEADER=-
I/home/ict/workspaces/coawst/build_coawst/LIBRARIES/mpich/include && \
./configure --prefix=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/MCT
&& \
make && \
make istall && \
nano ~/.bashrc

export
MCT_INCDIR=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/MCT/include
export
MCT_LIBDIR=/home/ict/workspaces/coawst/build_coawst/LIBRARIES/MCT/lib

6/6

You might also like