Installation

Getting the source code

First you need to have an account either

Todo

move jorekdjango to the new gitlab of INRIA and create the git mirrors

First, you need to clone all the external libraries and plugins you intend to use. Rename the example file config.ini.EXAMPLE to config.ini and edit it. The config file is explained in section config. Then run:

python setup.py --init

This will clone all dependencies in external, switch to the default branch (for each plugin, you can specify a branch).

Installation

To install jorekdjango and its dependencies, run:

python setup.py --make --prefix=MY_INSTALL_PATH

At the end, you’ll get two new files called make_project and set_env that you can use directly with the path of the model to install. Please read carefully the prompted message, for examples of use. The make_project file is installed in CLAPP_DIR/scripts.

The setup.py file

running the following command, will give you all the possible options for the setup.py script:

python --help

The results is:

usage: setup.py [-h] [--filename FILENAME] [--clone] [--checkout] [--pull]
                [--init] [--status] [--make] [--clean] [--clear] [--install]
                [--prefix PREFIX] [--doc] [--detail DETAIL] [--cmd CMD]

Jorek-Django Installation.

optional arguments:
  -h, --help           show this help message and exit
  --filename FILENAME  config filename. default: config.ini
  --clone              run: git clone $url
  --checkout           run: git checkout $branch
  --pull               run: git pull origin $branch
  --init               run: initializes Jorek-Django. This runs both clone &
                       checkout & pull
  --status             run: git status
  --make               run: cmake & make & make install
  --clean              run: make clean
  --clear              run: make clean & rm CMakeCache.txt
  --install            run: clone & checkout & make
  --prefix PREFIX      Install directory. Default value: $project/usr
  --doc                generates documentation
  --detail DETAIL      log level detail.CRITICAL: 50, ERROR: 40, WARNING: 30,
                       INFO: 20, DEBUG: 10, NOTSET: 0
  --cmd CMD            run any command for all projects

The config.ini file

You can change the configuration of your installation by editing the config.ini file. In the directory config, we give some examples using gfortran and gcc-mpi in both release and debug modes.

The config.ini file is composed of sections that we can classify into two parts. The first part, contains general informations:

[general]
branch: devel
project_install: fema

[fortran]
compiler: mpif90
flags: -fbounds-check -O2

[flags]
BUILD_PACKAGE: ON
BUILD_LIBRARY:  ON
BUILD_TESTING:  ON
BUILD_MODELS: ON
LAPACK_ENABLED: OFF
HDF5_ENABLED: OFF
MPI_ENABLED: OFF
SUPERLU_ENABLED: OFF
BUILD_AGMG: OFF

while the second one, contains specific informations to each plugin, and should look like:

[clappio]
url: git@gitlab.mpcdf.mpg.de:clapp/clappio.git
branch: devel

[plaf]
url: git@gitlab.mpcdf.mpg.de:clapp/plaf.git
branch: devel

[spl]
url: git@gitlab.mpcdf.mpg.de:clapp/spl.git
branch: devel

[glt]
url: git@gitlab.mpcdf.mpg.de:clapp/glt.git
branch: devel

[disco]
url: git@gitlab.mpcdf.mpg.de:clapp/disco.git
branch: devel

[fema]
url: git@gitlab.mpcdf.mpg.de:clapp/fema.git
branch: devel

[selalib]
url: git@gitlab.mpcdf.mpg.de:clapp/selalib.git
branch: develop