Adaptive Grid Refinement In Fortran


Blabla bla

Install :


  • a fortran compiler and a proper mpi implementation
  • cmake > 2.8

The install consists in 3 steps. First configuration of the package, makefile and other files generation, then build of the underlying fortran libraries and finally copy of the required files in the appropriate place.

We denote :

  • SOURCEDIR as the directory which contains the sources (and this INSTALL file)
  • BUILDDIR the directory where the package will be configured and build
  • INSTALLDIR the directory where the package will be installed. Those 3 locations must be different.

Configuration :

You need to generate a makefile that fits with your platform, your compilers, the libraries versions and so on. That will take place in BUILDDIR.

  1. get SOURCEDIR (i.e. download the package any way you want)
  2. create BUILDDIR. Any place, preferably local to your machine for efficiency reasons.
  3. enforce a fortran compiler using FC environment variable
  4. Change to BUILDDIR and run cmake
mkdir $BUILDIR
export FC=mpif90

At the end of this step BUILDDIR contains all makefiles, and other required files for compilation.

Some useful options for cmake :

  • -DUSE_DOXYGEN=ON : to use doxygen to generate source code documentation
  • -DCMAKE_INSTALL_PREFIX=somewhere to choose where you want to install the library

example :

mkdir /home/mylogin/build_agrif
cd /home/mylogin/build_agrif
export FC=mpif90
module load cmake-2.8
cmake ~/Softs/agrif