Installation of the main program/code: Parflow/CLM - an integrated parallel watershed model coupled with Community Land Model (CLM)
- Hypre
- SiLo - library for reading and writing a wide variety of scientific data to binary, disk filesb [optional]. Used only if planning to use VisIt visualisation package
- OpenMPI - check what version I'm running at Xubuntu and which version is available in CSF
- TCL
$ sudo apt-get install gcc
$ sudo apt-get install g++
$ sudo apt-get install gdc
$ sudo apt-get install gfortran
If you compile on CSF3 cluster, make sure that these compilers are available in the shell either
out-of-the-box or loaded with module load [module-name]
From repos: $ sudo apt-get install tcl-dev
and $ sudo apt-get install tk-dev
On the CSF3 cluster tcl-dev and tk-dev should be already installed
Check OpenMPI version in the CSF3 cluster
Either tar.gz or via git clone
nano ~/.bash_aliases
export CC=gcc
export CXX=g++
export FC=gfortran
export F77=gfortran
export PARFLOW_DIR=/path-to-parflow-dir/parflow/parflow
export SILO_DIR=/path-to-parflow-dir/silo
export HYPRE_DIR=/path-to-parflow-dir/hypre
export PATH=$PATH:/path-to-parflow-dir/visit/bin
Then source ~/.bash_aliases
cd openmpi[tab]
sudo ./configure
sudo make all
sudo make check
sudo make all install
cd ..
or install from repos
cd silo
./configure --prefix=$SILO_DIR --disable-silex
make all
make check
make all install
cd ..
cd hypre/src
./configure --prefix=$HYPRE_DIR --with-MPI [if you’re not using MPI, use --without-MPI]
make all
make check
make all install
cd ../..
cd parflow/pfsimulator
./configure --prefix=$PARFLOW_DIR --enable-timing --with-clm --with-silo=$SILO_DIR --with-hypre=$HYPRE_DIR --with-amps=mpi1 [if you’re not using MPI, leave the last flag off]
make install
cd ../pftools
./configure --prefix=$PARFLOW_DIR --with-silo=$SILO_DIR --with-amps=mpi1 [if you’re not using MPI, leave the last flag off]
make install
cd ../test
sudo ldconfig
make check
From a different source:
$ ./configure –prefix=${HOME}/Downloads/PARFLOW/parflow.693 –enable-timing –with-clm \
–with-silo=${HOME}/Downloads/PARFLOW/silo-4.7.2 –with-hypre=${HOME}/Downloads/PARFLOW/hypre-2.9.0b/src/hypre \
–with-amps=mpi1
Sometimes compilation errors may be encountered:
Next to build parflow run $ make install. Under ubuntu you might get errors at the very end of the building process related to gfortran and m libraries. This is probably a bug in the configuration process and you need to edit manually the Makefile.config under the config folder. If your current directory is the ../pfsimulator do the following: $ gedit config/Makefile.config. Search for a line that starts with LDLIBS = $(LDLIBS_EXTRA) (Note this is a very long line).
In this line you may see a gfortran m. Change those to -lgfortran -lm. Further right on the same line you may see two -l -l. Those probably are the -ls that where missing. Anyway now delete them. Keep going right you may see some gfortran and m that they apart from their -ls i.e. -l gfortran -l m. Remove the spaces between them.
Save the file, cross fingers and rerun $ make install. (DO NOT RERUN .configure).