Install the TELEMAC system

From SourceWiki
Jump to navigation Jump to search

It is possible to install the TELEMAC system in one go with subversion by checking out the meta project systel90-meta. This will pull from the server the full dependencies for ESTEL-3D and ESTEL-2D. This article describes how to download, configure and compile a full installation of the TELEMAC system for ESTEL.

Downloading the TELEMAC system

To download the code, it is recommended to use "subversion" and the meta project systel90-meta. From now on, we assume that the user wants to install the TELEMAC system into the systel90 folder located at /path/to/systel90/. The command to use is:

$ svn checkout http://source.ggy.bris.ac.uk/subversion/systel90-meta systel90

This will create a systel90 folder containing all necessary source files for the TELEMAC system. The typical folder tree obtained after downloading is shown at the bottom of this page.

Configuration

Before being able to compile the TELEMAC system, a few configuration steps are necessary.

Paths

The executable files for the TELEMAC systel are located in the bin/ directory of the TELEMAC tree. The directory needs to be added to the PATH variable of the user. Moreover, the TELEMAC launching scripts require the current directory (./) to be in the PATH as well. A typical entry in a user login file (for instance .bashrc) would be:

PATH=./:/path/to/systel90/bin:$PATH
export PATH

systel.ini

The folder config-template contains an example configuration file. By default, the TELEMAC system looks for configuration files in the config directory of the systel90 tree. To get started, one can simply rename config-template/ to config/:

$ mv config-template config

Then, the file systel.ini in /path/to/systel90/config needs editing. This files contains a number of sections.

The [GENERAL] section

The [GENERAL] section starts with the default language and version number for each modules in the TELEMAC system. This consists of a long list of LNGcode (use for the default language) and VERScode (used for the version) lines. By default, this file is setup for the English language (value2, French is value 1) and version "v5p7". For instance, for ESTEL-3D, the entries are:

#---ESTEL3D
LNGESTEL3=2
VERSESTEL3=v5p7

This section finish with the location of the systel90 tree (variable PROJECT)and the type of machine (variable HOSTTYPE).

If the systel90 tree is installed in /path/to/systel90, then the PROJECT variable should be set /path/to/systel90.

There is no predefined value to enter for the HOSTTYPE variable, the user is free to set the HOSTTYPE freely but it is usual to use a string which can be used to identify a combination of the type computer, the operating system and the Fortran compiler. For instance, if the machine is a 32-bit Linux machine (x86 type) using the Portland Group compiler, one could use "linux-x86-pgf90". For a 64-bit machine (x86_64 type) using the Intel Fortran compiler, one could use "linux-x86_64-ifort", this is the string used in the example systel.ini but

PROJECT=/path/to/systel90
HOSTTYPE=linux-x86_64-ifort

These values are used at a later stage to recognise which compiler option and which pre-compiled versions of the libraries to use at runtime, see below.

The PERL section

The [PERL] section is used to give the location of the perl executable (PERLPATH) and the location of the perl library (PERL5LIB). On a typical Linux system, these two locations can be easily found by looking into the file system:

$ which perl
/usr/bin/perl

$ ls /usr/lib/perl*
5.8.5  5.8.6  5.8.7  5.8.8 

Note that Linux systems sometimes include several versions of the perl library, the highest number of the perl 5 library is appropriate. Therefore, on this particular system, the [PERL] section would be:

[PERL]
PERLPATH=/usr/bin
PERL5LIB=/usr/lib/perl5/5.8.8

The hosttype configurations

The final section of the systel.ini file is a list of configuration options for a given HOSTTYPE. There can be several lists, they are identified by an entry inside square brackets. One of these entries must match the HOSTTYPE variable defined in the [GENERAL] section of the file. This is a convenient way of changing configuration options by editing one single line in the systel.ini file.

A list of configuration options consists of series of a set of keywords related to the compiler, the linker, the archiver (and the MPI library if installed). For instance when using the Intel Fortran compiler of a 64-bit Linux machine, one could have:

[linux-x86_64-ifort]
DIRLIB=linux-x86_64-ifort
FC_NAM="ifort"
FC_OPT_OBJEXT= "o"
FC_OPT_COMPIL= " -O2 -c "
FC_OPT_DEBUG=  " -g -DD -debug extended -debug-parameters "
FC_OPT_PROFILE=" -O2 "
FC_OPT_INCLUDE=" -I "
FC_OPT_OTHERS= " -warn all -implicitnone -traceback "

LK_NAM="ifort"
LK_OPT_NORMAL=" -lm -lstdc++ "
LK_OPT_DEBUG=  " -g -DD -debug extended -debug-parameters "
LK_OPT_PROFILE=" -pg "
LK_OPT_OUTNAME=" -o "
LK_OPT_OTHERS=" -O2 "

LIB_NAM=ar
LIB_OPT_LIBEXT="a"
LIB_OPT_OUTNAME=" cru"
LIB_OPT_OTHERS=
LIB_RANLIB=
LIBS_MPI=" "

RUN_DEBUG=" idb -gui "
RUN_PROFILE=

FC_MPI="mpif90 -c "
LK_MPI="mpif90 -lm -lstdc++ -o <EXE>  <OBJS>  <LIBS> "
LIBS_MPI="-L/path/to/mpi/lib "
RUN_MPI="mpirun -machinefile mpirun.txt -np <N> <EXE>"

Refer to the documentation about the compiler to understand these options.

Give more detail!

cfgmak.mak

When the configuration of systel.ini is done, one must create a configuration file for the compilation. This is done automatically when issuing the command:

$ cfgmak

This will create a file called cfgmak.mak in the same directory as systel.ini. cfgmak.mak should not be edited manually, any configuration change should be done in systel.ini and the command cfgmak will update cfgmak.mak accordingly.


Compilation

Final TELEMAC tree

  • systel90
    • bief
      • bief_v5p7
        • sources
      • bief_v5p8
        • sources
    • bin
    • config-template
    • damocles
      • damo_v5p7
        • sources
      • damo_v5p8
        • sources
    • estel2d
      • estel2d_v5p7
        • lib
        • sources
        • test.gb
      • estel2d_v5p8
        • lib
        • sources
        • test.gb
    • estel3d
      • estel2d_v5p7
        • sources
        • test.gb
      • estel2d_v5p8
        • sources
        • test.gb
    • parallel
      • parallel_v5p7
        • metis_distrib
        • sources
      • parallel_v5p8
        • metis_distrib
        • sources
    • paravoid
      • paravoid_v5p7
        • sources
      • paravoid_v5p8
        • sources
    • special
      • special_v5p7
        • sources
      • special_v5p8
        • sources
    • sisyphe
      • sisyphe_v5p7
        • lib
        • sources
        • sources_util
      • sisyphe_v5p8
        • lib
        • sources
        • sources_util
    • telemac2d
      • tel2d_v5p7
        • lib
        • sources
      • tel2d_v5p8
        • lib
        • sources