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 Unread post by tarankalra »

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

navin
Posts: 12
Joined: Mon Jun 08, 2015 4:40 pm
Location: Indian Institute of Technology Delhi

Re: Finished COAWST installation ubuntu 18.04

#2 Unread post by navin »

Hi, Taran,
Till now I was using ROMS. Now I need to run the ROMS+WRF. You have mentioned here the openmpi installation, which does not work for WRF. It's a kind request can you please
tell me the complete installation of COAWST starting from scratch. I am able to successfully compile COAWST(ROMS-only) not COAWST(ROMS+WRF). It is giving me errors related to NetCDF
/usr/bin/ld: warning: libnetcdf.so.13, needed by /home/navin/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.so, may conflict with libnetcdf.so.15.

I have installed all the libraries after watching https://www.youtube.com/watch?v=_SzRNpL8Ibs.

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Finished COAWST installation ubuntu 18.04

#3 Unread post by jcwarner »

that is only a warning.
For WRF you need to
export NETCDF=/location/of/netcdf
did you set that?

Post Reply