Having not worked with ROMS in a few years and being possessed of a shiny empty workstation to set-up, I decided to work through the minimum necessary steps to getting ROMS running from bare metal. Here's my road map to creating a functional Linux ROMS version in some minimal number of steps (please note the disclaimers at the end):Having lurked here for a few years and seen a number of "how do I install ..." posts, I thought I'd try to work through the minimal steps from a bare machine to a functioning multi-core ROMS installation running on Linux. I based my build on Ubuntu; in my experience the most idiot-proof of distros, and tried to minimize the necessary steps and installation complexities.
What I have NOT determined is why Ubuntu's standard NetCDF library package doesn't seem to work; if anyone has any insight into this, I'd love to hear it. As far as I can determine, they are built with the correct compilers, though there may be a version mismatch. Fortunately NetCDF builds are now fairly trivial.
If anyone feels this is worthy of the Wiki, they are welcome to move it there and hack it as they wish. If anyone wishes to change it, they're welcome to email me. I understand that this installation is neither optimized nor efficient, but it has been determined to generate usable executables on several systems.
Start by installing Ubuntu (in my case, 10.04 Server). This has, in most cases, become an automatic process as simple (or difficult) as any other OS installation. You will need to enable networking or use a work-around to install the packages listed below. Ubuntu supports package upgrades without network if you look around enough. All of the following SHOULD be doable on a dumb terminal system, without graphics or anything more than a shell account.
Log in to your new linux system. You will need someone with administrative privileges which you will have because a stock Ubuntu install only has one account and that account has administrative privileges.
First, install the necessary Ubuntu packages (this is the only step which requires administrative privileges, if you are not an administrator, this is what you need to talk your sysadmin into doing for you):
Code: Select all
sudo apt-get -y install gfortran g++ libmpich2-dev subversion
Code: Select all
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.gz
tar xzvf netcdf.tar.gz
cd netcdf*
export FC=gfortran F77=gfortran
NETCDFDIR=${PWD}/gfortran
mkdir ${NETCDFDIR}
./configure --prefix=${NetCDFDIR} --disable-netcdf-4
make check install
cd
Code: Select all
svn checkout https://www.myroms.org/svn/src/trunk ROMS
Code: Select all
cd ROMS
sed -i_release "s#NETCDF_INCDIR ?= /usr/local#NETCDF_INCDIR ?= $NETCDFDIR#;s#NETCDF_LIBDIR ?= /usr/local#NETCDF_LIBDIR ?= $NETCDFDIR#" Compilers/Linux-gfortran.mk
sed -i_release 's.FORT ?= pgi.FORT ?= gfortran.' makefile
make
Code: Select all
./oceanS < ./ROMS/External/ocean_upwelling.in
Code: Select all
sed -i 's/USE_OpenMP ?=/USE_OpenMP ?= yes/' makefile
make clean;make
./oceanO < ./ROMS/External/ocean_upwelling.in
Code: Select all
sed -i 's/USE_OpenMP ?= yes/USE_OpenMP ?=/;s/USE_MPI ?=/USE_MPI ?= yes/;s/USE_MPIF90 ?=/USE_MPIF90 ?= yes/' makefile
make clean;make
Code: Select all
echo MPD_SECRETWORD=roms > ~/.mpd.conf
chmod 600 ~/.mpd.conf
mpd &
Code: Select all
mpirun -n 1 ./oceanM ./ROMS/External/ocean_upwelling.in
Code: Select all
sed -i_release 's/NtileJ == 1/NtileJ == 2/' ROMS/External/ocean_upwelling.in
mpirun -n 2 ./oceanM ./ROMS/External/ocean_upwelling.in