Finished COAWST installation ubuntu 18.04

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
tarankalra
Posts: 5
Joined: Wed Dec 10, 2014 9:34 pm
Location: University of Maryland

Finished COAWST installation ubuntu 18.04

#1 Post by tarankalra » Sun Apr 21, 2019 5:45 pm

I recently had to reinstall ubuntu 18.04 after upgrading from ubuntu 14.04. COAWST requires 3 external software packages to be installed (Fortran/C compilers, netcdf and mpi).

One advantage of the new version of ubuntu is that netcdf installation becomes straightforward with a single line of command and the installation required fewer steps than ubuntu 14.04 because there was no need to get zlib, hdf5. It would help create images on cloud environments without complicating things.

Step 1. To get fortran and C compilers
--------------------------------------------------------
sudo apt-get install gcc-8 gfortran-8 g++-8
--------------------------------------------------------

Step 2. Install netcdf libraries
--------------------------------------------------------
sudo apt-get install libnetcdf-dev libnetcdff-dev
--------------------------------------------------------
-At this point, one can add netcdf libaries in their path by doing:
--------------------------------------------------------
export NETCDF_LIBDIR=/usr/include
export NETCDF_INCDIR=/usr/include
----------------------------------------------
- Save the changes
----------------------------------------------
source .bashrc

Step 3: Install OpenMPI
-Download openmpi-1.4.4.tar.bz2 from http://www.open-mpi.org
-extract the package using
----------------------------------------------
tar -jxf openmpi-1.4.4.tar.bz2
----------------------------------------------
-Make a folder for openmpi installation, I did that in my home directory
----------------------------------------------
sudo mkdir $HOME/opt/openmpi
----------------------------------------------
- Compile openmpi
----------------------------------------------
./configure --prefix=$HOME/opt/openmpi
----------------------------------------------
- Make and make install
----------------------------------------------
make all
make install
----------------------------------------------
- Add the MPI path and LD_LIBRARY_PATH in the .bashrc
----------------------------------------------
export PATH=/opt/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH
----------------------------------------------
- Save the changes
----------------------------------------------
source .bashrc
----------------------------------------------
After this point mpif90 and mpiexec should both be linked to the same openmpi folder and this can be checked by:
----------------------------------------------
mpif90 -version
mpiexec --version
----------------------------------------------

Step 4: Installing MCT.
- Enter the MCT folder in COAWST via (/COAWST/Lib/MCT)
----------------------------------------------
make clean
./configure F90=gfortran
make
make install
----------------------------------------------
Add the installed library paths in the environment using .bashrc.


Hope it helps.
Taran

References:

1. https://cloud-gc.readthedocs.io/en/late ... ing-system
2. http://edu.itp.phys.ethz.ch/hs12/progra ... penmpi.pdf

Post Reply