Differences

This shows you the differences between two versions of the page.

Link to this comparison view

installation_on_linux [2019/01/23 07:10]
y.audouin [Dynamic compilation for TelApy (Python API)]
installation_on_linux [2022/12/08 10:53] (current)
b.basic
Line 1: Line 1:
-In the step below we will use "apt-get install" ​to install package.\\ +In the steps belowwe will use <color darkorange>​apt install</​color> ​to install ​package ​on distributions based on Debian ​Linux.\\ 
-This command is mainly for Debian ​distribution.\\ +The command might be different on your distribution, e.g.:\\ 
-The command might be different on your distribution ​for example.\\ +Fedora, CentOS, RHEL or openSUSE: <color darkorange>​dnf install</color>\\ 
-It is "​urpmi"​ for Mandriva/Mageia.\\ +Mageia: <color darkorange>​urpmi</​color>​.
-It is "yum install"​ for Fedora.+
  
 ====== Prerequisites ====== ====== Prerequisites ======
  
-Here is a list of the software ​you will need to compile ​and run the TELEMAC-MASCARET system.+Here is a list of tools and libraries that you will need to build and run the TELEMAC-MASCARET system.
  
 ===== Mandatory ===== ===== Mandatory =====
  
 To run TELEMAC-MASCARET the following software are mandatory: To run TELEMAC-MASCARET the following software are mandatory:
-  * Python ​2.7.0 ([[installation_linux_python]]) +  * [[installation_linux_python|Python ​3.7+]] 
-  * Numpy  1.8.3 ([[installation_linux_numpy]]) +  * [[installation_linux_numpy|Numpy 1.15+]] 
-  * A Fortran compiler (Gfortran ​4.6.3 is the minimum) ​[[installation_linux_gfortran]]+  * A [[installation_linux_gfortran|Fortran]] compiler (GFortran ​4.6.3 is the minimum) ​
  
 ===== Optional ===== ===== Optional =====
  
-Then there are a couple of others ​dependencies ​which necessary ​to activate certain functionalities:+Other dependencies ​are required ​to enable some features:
  
 ==== Parallelism ==== ==== Parallelism ====
-This allows the TELEMAC-MASCARET system to run in parallel which quite speeds up the execution of your case. +This allows the TELEMAC-MASCARET system to run in parallel which quite speeds up the execution of case. 
-  * MPI Distribution ([[installation_linux_mpi]]) +  * [[installation_linux_mpi|MPI Distribution]] 
-  * Metis 5.1.x ([[installation_linux_metis]])+  * [[installation_linux_metis|METIS library]]
  
-==== Addtional python library for validation ==== +=== Other partitioners ​=== 
-  * scipy ([[installation_scipy]]) +A partitioner is necessary when building TELEMAC-MASCARET with parallelism. During a parallel run, the mesh is split in multiple parts using the PARTEL module, which relies on METIS as the default partitioner.\\ 
-  * matplotlib ([[installation_matplotlib]]) +However, another library can be used instead of METIS: 
-  * mayavi ​([[installation_mayavi]])+  * SCOTCH library ​(check their [[https://​www.labri.fr/​perso/​pelegrin/​scotch/​|website]] for information on how to compile)
  
-==== MED Format ==== +A parallel version of PARTEL has been developed but is still experimentalIt uses parallel partitioning instead of sequential and as such, requires a parallel implementation of METIS or SCOTCH: 
-This allows the TELEMAC-MACARET system to read and write into the MED format+  * ParMETIS library ​(check their [[http://​glaros.dtc.umn.edu/​gkhome/​metis/​parmetis/​download|website]] for information on how to build it
-  * Hdf5 ([[installation_linux_hdf5]]) +  * PT-SCOTCH library ​(check their [[https://​www.labri.fr/​perso/​pelegrin/​scotch/​|website]] for information on how to build it)
-  * MEDFichier ​([[installation_linux_med]])+
  
-==== Other partitioners ​==== +==== Additional Python libraries for validation ​==== 
-This is only available if you have the prerequisites for parallelism. +  * [[installation_scipy|SciPy]] 
-During a parallel run the mesh is split in multiple parts via the software partel. +  * [[installation_matplotlib|Matplotlib]]
-Partel is using by default metis for the partitioning step.\\ +
-Here is another software that can be used instead of metis: +
-  * Scotch (You can have information on how to compile on their [[https://​www.labri.fr/​perso/​pelegrin/​scotch/​|website]])+
  
-A parallel version of partel was developped but is not fully working. It is using a parallel partitioning instead of a sequential oneHere is a list of two partitioners that are compatible:​ +==== MED format support ==== 
-Parallel partitioner for parallel version of partel (Feature not available in v7p2r0) +This allows the TELEMAC-MACARET system to read and write files using the MED format
-  * ParMetis (You can have information on how to compile on their [[http://​glaros.dtc.umn.edu/​gkhome/​metis/​parmetis/​download|website]]) +  * [[installation_linux_hdf5|HDF5 library]] 
-  * PtScoctch (You can have information on how to compile on their [[https://​www.labri.fr/​perso/​pelegrin/​scotch/​|website]])+  * [[installation_linux_med|MED library]]
  
 ==== Parallel direct solver ==== ==== Parallel direct solver ====
  
-This adds a new parallel solver called MUMPS (option SOLVER = 9). +This adds a parallel solver called MUMPS which is only used by the ARTEMIS module at the moment ​(option SOLVER = 9). 
-  * MUMPS (You can have information on how to compile on their[[http://​mumps.enseeiht.fr/​|website]])+  * MUMPS (check their [[http://​mumps.enseeiht.fr/​|website]] ​for information on how to compile)
  
-==== AED Library ​==== +==== AED2 support ​==== 
-This will actuavate ​more process ​in the waqtel ​module [[installation_linux_aed]]+This activates ​more processes ​in the WAQTEL ​module
 +  * [[installation_linux_aed|AED2 library]]
  
 +==== GOTM support ====
 +This allows the use of the General Ocean Turbulence Model in the TELEMAC-3D module.
 +  * [[installation_linux_gotm|GOTM library]]
  
 ---- ----
Line 61: Line 60:
 ====== Get the source code ====== ====== Get the source code ======
  
-The TELEMAC-MASCARET system is distributed ​via two means that are described below:+The TELEMAC-MASCARET system is distributed ​in two ways that are described below.
  
-===== Download the zipped ​version ===== +===== Download the latest ​version ===== 
-<color red> Link not available at the moment for v8p0r0</​color>​\\ +You can download ​a compressed archive ​of the latest stable release (v8p4r0), including the source codedocumentation, and examples, from [[https://gitlab.pam-retd.fr/otm/​telemac-mascaret/-/archive/v8p4r0/​telemac-mascaret-v8p4r0.tar.gz|here]].
-You can download ​here the two zipped files of the latest stable release (v7p2r0 here)+
-  * The source code and the documentation [[http://www.opentelemac.org/index.php/binaries/​viewdownload/​45-releases/​1413-telemac-mascaret-v7p2r0-src|here]] +
-  * The examples [[http://www.opentelemac.org/index.php/​binaries/​viewdownload/​45-releases/​1412-telemac-mascaret-v7p2r0-examples|here]]+
  
-===== Upload ​from svn server =====+===== Clone from the GitLab ​server =====
  
-The TELEMAC-MASCARET ​system ​is stored ​on a subversion ​server (For more information ​see [[svn_source_code_repository_for_telemac|here]]).+The TELEMAC-MASCARET ​source code repository ​is hosted ​on a GitLab ​server (see [[telemac-mascaret_git_repository|this page]] to get more information).
  
-To check if you have subversion ​installed on your computer run: +To check if you have Git installed on your computer run:\\ 
-<box round> +<color darkorange>''​<​nowiki>​$ git --version</​nowiki>''</​color>
-''​svn --version''​ +
-</box> +
-If this command does not work, install subversion with the following command: +
-<box round> +
-''​sudo apt-get install subversion''​ +
-</box>+
  
-Here are the information we will use to download the sources: 
-  * **Address** <color darkorange>​http://​svn.opentelemac.org/​svn/​opentelemac/</​color>​ (default http protocole using port 80) 
-  * **Source code repository Path** <color darkorange>''/​tags/​v8p0r0/''</​color>​ (for the latest stable version of the source code) 
-  * **Username** <color darkorange>''​ot-svn-public''</​color>​ 
-  * **Password** <color darkorange>''​telemac1*''</​color>​ 
 \\ \\
-If your connection is using a proxy go [[installation_on_linux#​optional_proxy|here]] first+If this command does not work, follow the instructions on the link above to install Git.\\ 
 +If your connection is using a proxy, follow ​go [[installation_on_linux#​optional_proxy|these instructions]] first
 \\ \\
-The commands are then+To clone the repository, enter:\\ 
-<box round> +<color darkorange>''​<​nowiki>​$ git clone https://gitlab.pam-retd.fr/otm/​telemac-mascaret.git my_opentelemac<​/nowiki>''</​color>
-''​mkdir ~/​telemac-mascaret/​v8p0r0''​\\ +
-''​svn co http://svn.opentelemac.org/svn/​opentelemac/​tags/​v8p0r0 ~/​telemac-mascaret/​v8p0r0 --username=ot-svn-public --password=telemac1*''​ +
-</box>+
  
-To install it somewhere else replace ''​~/​telemac-mascare/​v8p0r0''​ by where you want to install it.\\ +\\ 
-To install the trunk replace ​''​tags/v8p0r0'' ​by ''​trunk''​.+To install it somewhere elsereplace ''​my_opentelemac''​ by the directory ​where you want to install it. 
 + 
 +\\ 
 +To install the latest version, enter the following commands after cloning:​\\ 
 +<color darkorange>​ 
 +''​<​nowiki>​$ cd my_opentelemac<​/nowiki>''​\\ 
 +''​<​nowiki>​$ git checkout tags/​v8p4r0</​nowiki>​''​ 
 +</​color>​
  
 ==== (optional) Proxy ==== ==== (optional) Proxy ====
  
-If your connection is using a proxy edit the file ~/​.subversion/​servers and under the line ''​[global]''​+If your connection is using a proxy, you can specify it using the following commands:\\ 
-<code+<color darkorange
-http-proxy-host = <​proxy_address>​ +''<​nowiki>​$ git config ​--global http.proxy https://<​username>:<​password>​@<​proxy_address>​:<​proxy_port>​</​nowiki>''​\\ 
-http-proxy-port = <​proxy_port>​ +''<​nowiki>​$ git config ​--global https.proxy https://<​username>​:<​password>​@<​proxy_address>:<​proxy_port></​nowiki>''​ 
-http-proxy-username = <​username>​ +</color>
-http-proxy-password = <​password>​ +
-</code>+
  
 +\\
 Replace: Replace:
-  * **<​proxy_address>​** ​By the adress ​to your proxy +  * **<​proxy_address>​** ​by the address ​to your proxy 
-  * **<​proxy_port>​** ​By the port of your proxy +  * **<​proxy_port>​** ​by the port of your proxy 
-  * **<​username>​** ​By the login to your proxy +  * **<​username>​** ​by the login to your proxy if any 
-  * **<proxy_adress>​** ​By the password for your proxy+  * **<password>​** ​by the password for your proxy if any
  
  
Line 120: Line 110:
 ====== Installation of TELEMAC-MASCARET ====== ====== Installation of TELEMAC-MASCARET ======
  
-In this part we will describe how install the TELEMAC-MASCARET ​software.\\+In this part we describe how to install the TELEMAC-MASCARET ​system.\\
 We will use the following terms (which will be explained in more details further on): We will use the following terms (which will be explained in more details further on):
-  * **<​root>​** ​will mean the path to your TELEMAC-MASCARET sources.  +  * **<​root>​** ​means the path to your TELEMAC-MASCARET sources.  
-  * **<​systel.cfg>​** ​This will mean you configuration file. +  * **<​systel.cfg>​** ​means your build configuration file. 
-  * **<​config>​** ​This will point to your configuration. +  * **<​config>​** ​points ​to the build configuration ​you are using
-  * **<​pysource>​** ​This is your environment file.+  * **<​pysource>​** ​refers to your environment file.
 \\ \\
-In the example below, we will install TELEMAC-MASCARET in ''​~/​telemac-mascaret/v7p2r0''​ (**<​root>​**) with two configurations (**gfortran** and **gfortranHPC**). All the files for that examples can be found at the end of each section.+In the example below, we will install TELEMAC-MASCARET in ''​~/​telemac-mascaret''​ (**<​root>​**) with two configurations (**gfortran** and **gfortranHPC**). All the files for these examples can be found at the end of each section.
  
-===== Setting your environment =====+===== Setting ​up your environment =====
  
-This part will describe ​how to create **<​pysource>​**.\\+This part explains ​how to create ​the **<​pysource>​** ​script.\\
 \\ \\
-To ease the loading of the TELEMAC-MASCARET environment we suggest using a file to set environment variables. +To ease the loading of the TELEMAC-MASCARET environmentwe suggest using a file to set environment variables. 
-You can find an example of such a file in ''<​root>/​configs/​pysource.template.sh''​.\\ +You can find an example of such a file in ''<​root>/​configs/​pysource.template.sh''​, that you can copy and edit.\\
-So copy this file.\\+
 It sets the following environment variables: It sets the following environment variables:
-  * HOMETEL: ​Path to your installation (<​root>​) +  * HOMETEL: ​path to your installation (<​root>​) 
-  * SYSTELCFG: ​Path to yout configuration file (<​systel.cfg>​) +  * SYSTELCFG: ​path to yout configuration file (<​systel.cfg>​) 
-  * USETELCFG: ​The name of your configuration (<​config>​) +  * USETELCFG: name of your configuration (<​config>​) 
-  * SOURCEFILE: ​Path to this file (<​pysource>​)+  * SOURCEFILE: ​path to this file (<​pysource>​)
  
 Set those four variables in your <​pysource>​ to comply with your installation. Set those four variables in your <​pysource>​ to comply with your installation.
 Here is an example of the modified lines values: Here is an example of the modified lines values:
 +
 <code bash> <code bash>
-export HOMETEL=/home/yugi/​telemac-mascaret/v7p2r0+export HOMETEL=$HOME/​telemac-mascaret
 export SYSTELCFG=$HOMETEL/​configs/​systel.cfg export SYSTELCFG=$HOMETEL/​configs/​systel.cfg
 export USETELCFG=gfortranHPC export USETELCFG=gfortranHPC
Line 155: Line 145:
 <code bash> <code bash>
 ### METIS ------------------------------------------------------------- ### METIS -------------------------------------------------------------
-export METISHOME=~/​opt/​metis-5.1.0/​build_debian+export METISHOME=~/​opt/​metis-5.1.0
 </​code>​ </​code>​
 \\ \\
Line 169: Line 159:
 ### ###
 # Path to telemac root dir # Path to telemac root dir
-export HOMETEL=/home/yugi/​telemac-mascaret/​v7p2r0+export HOMETEL=$HOME/​telemac-mascaret/​v8p4r0
 # Adding python scripts to PATH # Adding python scripts to PATH
-export PATH=$HOMETEL/​scripts/​python27:.:$PATH+export PATH=$HOMETEL/​scripts/​python3:.:$PATH
 # Configuration file # Configuration file
 export SYSTELCFG=$HOMETEL/​configs/​systel.edf.cfg export SYSTELCFG=$HOMETEL/​configs/​systel.edf.cfg
Line 182: Line 172:
 export PYTHONUNBUFFERED='​true'​ export PYTHONUNBUFFERED='​true'​
 ### API ### API
-export PYTHONPATH=$HOMETEL/​scripts/​python27:​$PYTHONPATH +export PYTHONPATH=$HOMETEL/​scripts/​python3:​$PYTHONPATH 
-export LD_LIBRARY_PATH=$HOMETEL/​builds/​$USETELCFG/​wrap_api/​lib:​$LD_LIBRARY_PATH+export LD_LIBRARY_PATH=$HOMETEL/​builds/​$USETELCFG/​lib:​$HOMETEL/​builds/​$USETELCFG/​wrap_api/​lib:​$LD_LIBRARY_PATH
 export PYTHONPATH=$HOMETEL/​builds/​$USETELCFG/​wrap_api/​lib:​$PYTHONPATH export PYTHONPATH=$HOMETEL/​builds/​$USETELCFG/​wrap_api/​lib:​$PYTHONPATH
 ### ###
Line 189: Line 179:
 ### ###
 ### METIS ------------------------------------------------------------- ### METIS -------------------------------------------------------------
-export METISHOME=/home/yugi/​opt/​metis-5.1.0/​arch/​debian+export METISHOME=~/​opt/​metis-5.1.0
 </​code>​ </​code>​
  
-If you will be using only one version ​of TELEMAC-MASCARET you can add the content of this file in your ''​~/​.bashrc''​.+If you intend to use only one configuration ​of the TELEMAC-MASCARET ​system, e.g. gfortranHPC, ​you can add this line to your ''​~/​.bashrc''​
 +<code bash> 
 +source $HOME/​telemac-mascaret/​configs/​pysource.gfortranHPC.sh 
 +</​code>​
  
-==== (optional) Adding MED ==== +==== (optional) Adding MED support ​==== 
-You need to add the following ​information ​for both MED and hdf5 if there are not installed ​in /usr.+You need to add the following ​lines for both MED and HDF5 if they were not installed ​using your distribution package manager:
 <code bash> <code bash>
 ### HDF5 ------------------------------------------------------------- ### HDF5 -------------------------------------------------------------
-export ​MEDHOME=~/​opt/​hdf5-1.8.14/​build_debian+export ​HDF5HOME=~/​opt/​hdf5-1.10.7
 export LD_LIBRARY_PATH=$HDF5HOME/​lib:​$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$HDF5HOME/​lib:​$LD_LIBRARY_PATH
 ### MED ------------------------------------------------------------- ### MED -------------------------------------------------------------
-export MEDHOME=~/​opt/​med-5.2.0/​build_debian+export MEDHOME=~/​opt/​med-4.1.0
 export LD_LIBRARY_PATH=$MEDHOME/​lib:​$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$MEDHOME/​lib:​$LD_LIBRARY_PATH
 export PATH=$MEDHOME/​bin:​$PATH export PATH=$MEDHOME/​bin:​$PATH
 </​code>​ </​code>​
  
-==== (optional) Adding SCOTCH ==== +==== (optional) Adding SCOTCH ​support ​==== 
-You need to add the following information for Scotch ​if it is not installed ​in /usr.+You need to add the following information for SCOTCH ​if it was not installed ​using your distribution package manager:
 <code bash> <code bash>
 ### SCOTCH ------------------------------------------------------------- ### SCOTCH -------------------------------------------------------------
-export SCOTCHHOME=~/​opt/​scotch-6.0.0/​build_debian+export SCOTCHHOME=~/​opt/​scotch-6.0.0/​build
 export LD_LIBRARY_PATH=$SCOTCHHOME/​lib:​$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$SCOTCHHOME/​lib:​$LD_LIBRARY_PATH
 </​code>​ </​code>​
  
-==== (optional) Adding ​AED ==== +==== (optional) Adding ​AED2 support ​==== 
-You need to add the following information for AED if it is not installed in /usr.+You need to add the following information for AED2:
 <code bash> <code bash>
-### AED --------------------------------------------------------------- +### AED2 -------------------------------------------------------------- 
-export ​AEDHOME=~/opt/aed-2.1.0/build_debian +export ​AED2HOME=~/opt/aed2-1.2.0/build 
-export LD_LIBRARY_PATH=$AEDHOME/​lib:​$LD_LIBRARY_PATH+export LD_LIBRARY_PATH=$AED2HOME/​lib:​$LD_LIBRARY_PATH
 </​code>​ </​code>​
  
 ==== Loading the environment ==== ==== Loading the environment ====
 \\ \\
-Once that is done, to load your environment ​type in a terminal+Once that is done, you can load your environment:​\\ 
-<box round> +<color darkorange>''​<​nowiki>​$ ​source pysource.gfortranHPC.sh</​nowiki>​''</​color> 
-''​source pysource.gfortranHPC.sh''​ +
-</box>+
  
 ===== Configuring TELEMAC-MASCARET ===== ===== Configuring TELEMAC-MASCARET =====
  
-This part will describe ​how to create **<​systel.cfg>​**.+This part explains ​how to create ​the **<​systel.cfg>​** ​file.
 \\ \\
 In the folder ''<​root>/​configs''​ you can find a few configuration files, some may fit your configuration. In the folder ''<​root>/​configs''​ you can find a few configuration files, some may fit your configuration.
 \\ \\
-Here is a quick description of what some of the existing configurations ​handles+Here is a quick description of what some of the existing configurations ​handle
-   * **systel.cis-debian.cfg** Configuration for sequential and parallel configuration on debian+   * **systel.cis-debian.cfg** Configuration for sequential and parallel configuration on Debian
-   * **systel.cis-fedora.cfg** Configuration for sequential and parallel configuration on fedora+   * **systel.cis-fedora.cfg** Configuration for sequential and parallel configuration on Fedora
-   * **systel.cis-opensuse.cfg** Configuration for sequential and parallel configuration on opensuse+   * **systel.cis-opensuse.cfg** Configuration for sequential and parallel configuration on openSUSE
-   * **systel.cis-ubuntu.cfg** Configuration for sequential and parallel configuration on ubuntu.+   * **systel.cis-ubuntu.cfg** Configuration for sequential and parallel configuration on Ubuntu.
    * **systel.cis-windows.cfg** Configuration for sequential and parallel configuration on Windows.    * **systel.cis-windows.cfg** Configuration for sequential and parallel configuration on Windows.
    * **systel.hrw.cfg** Configurations used by H.R.Wallingford.    * **systel.hrw.cfg** Configurations used by H.R.Wallingford.
-   * **systel.edf.cfg** Configurations used by EDF, contains parallel and debug configuration for nagintel, gfortran ​on Debian and a couple of configurations for clusters+   * **systel.edf.cfg** Configurations used by EDF, contains parallel and debug configuration for GNUIntel and NAG on Debian and a couple of configurations for clusters. 
-   * **systel.salome.cfg** Configurations for salome_hydro+   * **systel.cis-hydra.cfg** Configuration for a Hydra cluster.
-   * **systel.cis-hydra.cfg** Configuration for an hydra cluster.+
  
 Now we are going to describe how to create one from scratch that contains two configurations:​\\ Now we are going to describe how to create one from scratch that contains two configurations:​\\
Line 269: Line 260:
 language: 2 language: 2
 modules: ​ system modules: ​ system
-version:  ​v7p2r0+version:  ​v8p4 
 +
 +options: api 
 +
 +f2py_name: f2py3 
 +pyd_fcompiler:​ gnu95
 # #
 sfx_zip: ​   .zip sfx_zip: ​   .zip
Line 286: Line 282:
 incs_all: incs_all:
 # #
-cmd_obj_c: gcc -c <​srcName>​ -o <​objName>​+libs_all: 
 +
 +cmd_obj_c: gcc -fPIC -c <​srcName>​ -o <​objName>​
 </​code> ​ </​code> ​
  
 Here are a few explanations about what the parameters stand for: Here are a few explanations about what the parameters stand for:
-  * language: defines ​in which language the TELEMAC-MASCARET ​will be in (1: French, 2: English). ​+  * language: defines ​the language the TELEMAC-MASCARET ​system should use (1: French, 2: English). ​
   * modules: the list of modules to compile (system means all. You can remove some by adding ''​-modulename''​).   * modules: the list of modules to compile (system means all. You can remove some by adding ''​-modulename''​).
-  * version: ​Name of the version. +  * version: the version. 
-  * sfx_*: ​Extension ​of the different files (zipped files, libraries, compiled object files, modules, executables).+  * sfx_*: ​extension ​of the different files (zipped files, libraries, compiled object files, modules, executables).
   * val_root: path of examples for validation.   * val_root: path of examples for validation.
-  * val_rank: ​Defaut ​rank for validation.  +  * val_rank: ​defaut ​rank for validation.  
-  * mods_all: ​Include ​command for TELEMAC-MASCARET modules. +  * mods_all: ​include ​command for TELEMAC-MASCARET modules. 
-  * incs_all: ​Include ​command for compilation. +  * incs_all: ​include ​command for compilation. 
-  * cmd_obj_c: ​Command ​to compile C files (for Mascaret). +  * cmd_obj_c: ​command ​to compile C files (for MASCARET). 
 +  * options: compile additional things (here the TELEMAC-MASCARET API) 
 +  * f2py_name: name of the f2py command to use (here f2py3 is the Python 3 version) 
 +  * pyd_compiler:​ name of the compiler used by f2py (you can get that name by running <color darkorange>''​f2py -c --help-fcompiler''</​color>​)
  
-Now we add the informations for gfortran:+Now we add the informations for the gfortran ​configuration:
  
 <code python> <code python>
Line 308: Line 308:
 # #
 [gfortran] [gfortran]
-brief: Gfortran compiler ​4.9.2+brief: Gfortran compiler
 # #
-cmd_obj: ​   gfortran -c -cpp -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_VTK <​mods>​ <​incs>​ <​f95name>​+cmd_obj: ​   gfortran -c -cpp -fPIC -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_VTK <​mods>​ <​incs>​ <​f95name>​
 cmd_lib: ​   ar cru <​libname>​ <​objs>​ cmd_lib: ​   ar cru <​libname>​ <​objs>​
-cmd_exe: ​   gfortran -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <​exename>​ <​objs>​ <​libs>​+cmd_exe: ​   gfortran ​-fPIC -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <​exename>​ <​objs>​ <​libs>​
 </​code>​ </​code>​
  
Line 321: Line 321:
   * cmd_exe: is the command to generate an executable   * cmd_exe: is the command to generate an executable
  
-Here is the configuration for gfortranHPC+THen we add the gfortranHPC ​configuration:​
  
 <code python> <code python>
 [gfortranHPC] [gfortranHPC]
-brief: ​Gfortran ​compiler ​4.9.2 with open_mpi for a debian 8+brief: ​GFortran ​compiler ​using Open MPI
 # #
 mpi_cmdexec:​ mpirun -machinefile MPI_HOSTFILE -np <​ncsize>​ <​exename>​ mpi_cmdexec:​ mpirun -machinefile MPI_HOSTFILE -np <​ncsize>​ <​exename>​
Line 340: Line 340:
   * libs_all: options that will be added to the cmd_exe command mainly links to external libraries.   * libs_all: options that will be added to the cmd_exe command mainly links to external libraries.
  
-We can also see that we replace ​''​gfortran''​ by ''​mpif90''​ in the ''​cmd_exe''​ and ''​cmd_lib'' ​also we added -DHAVE_MPI in cmd_obj to active ​MPI in the sources.+We can also see that we hace replaced ​''​gfortran''​ by ''​mpif90''​ in the ''​cmd_exe''​ and ''​cmd_lib'' ​and that we have added -DHAVE_MPI in cmd_obj to enable ​MPI in the sources.
  
 You can find the full file below. You can find the full file below.
Line 356: Line 356:
 language: 2 language: 2
 modules: ​ system modules: ​ system
-version:  ​v7p2r0+version:  ​v8p4 
 +
 +options: static api 
 +
 +f2py_name: f2py3 
 +pyd_fcompiler:​ gnu95
 # #
 sfx_zip: ​   .zip sfx_zip: ​   .zip
Line 373: Line 378:
 incs_all: incs_all:
 # #
-cmd_obj_cgcc -c <​srcName>​ -o <​objName>​+libs_all:
 # #
-# _____          __________________________________ +cmd_obj_c: gcc -fPIC -c <​srcName>​ -o <​objName>​
-# ____/ Calibre9 _________________________________/​ +
-+
-# Gfortran+
 # #
 [gfortran] [gfortran]
-brief: ​Gfortran ​compiler ​4.9.2+brief: ​GFortran ​compiler
 # #
-cmd_obj: ​   gfortran -c -cpp -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_VTK <​mods>​ <​incs>​ <​f95name>​+cmd_obj: ​   gfortran -c -cpp -fPIC -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_VTK <​mods>​ <​incs>​ <​f95name>​
 cmd_lib: ​   ar cru <​libname>​ <​objs>​ cmd_lib: ​   ar cru <​libname>​ <​objs>​
-cmd_exe: ​   gfortran -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <​exename>​ <​objs>​ <​libs>​+cmd_exe: ​   gfortran ​-fPIC -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <​exename>​ <​objs>​ <​libs>​
 # #
 # Gfortran HPC # Gfortran HPC
 # #
 [gfortranHPC] [gfortranHPC]
-brief: ​Gfortran ​compiler ​4.9.2 with open_mpi for a debian 8+brief: ​GFortran ​compiler ​using Open MPI
 # #
 mpi_cmdexec:​ mpirun -machinefile MPI_HOSTFILE -np <​ncsize>​ <​exename>​ mpi_cmdexec:​ mpirun -machinefile MPI_HOSTFILE -np <​ncsize>​ <​exename>​
Line 401: Line 403:
 </​file>​ </​file>​
  
-==== (optinal) Adding MED ==== +==== (optional) Adding MED support ​==== 
-Here are the parameters ​that you have to edit to active the MED feature+Here are the parameters you have to edit to activate ​MED support ​
-  * ''​incs_all''​ add ''​-I$MEDHOME/​include''​ +  * ''​incs_all''​add ''​-I$MEDHOME/​include''​ 
-  * ''​cmd_obj''​ add ''​-DHAVE_MED''​ +  * ''​cmd_obj''​add ''​-DHAVE_MED''​ 
-  * ''​libs_all''​ add ''​-L$HDF5HOME/​lib -lhdf5 -L$MEDHOME/​lib -lmed -lstdc++ -lz''​+  * ''​libs_all''​add ''​-L$HDF5HOME/​lib -lhdf5 -L$MEDHOME/​lib -lmed -lstdc++ -lz''​
  
-==== (optional) Adding SCOTCH ====+==== (optional) Adding SCOTCH ​suport ​==== 
 +Here are the parameters you have to edit to activate SCOTCH support: 
 +  * ''​incs_all'':​ add ''​-I$SCOTCHHOME/​include''​ 
 +  * ''​cmd_obj'':​ add ''​-DHAVE_SCOTCH''​ 
 +  * ''​libs_all'':​ add ''​-L$SCOTCHHOME/​lib -lsctoch -lsctocherr''​
  
-Here are the parameters ​that you have to edit to active the SCOTCH ​feature: +Note that even if you use SCOTCH, you still need METIS.
-  * ''​incs_all''​ add ''​-I$SCOTCHHOME/​include''​ +
-  * ''​cmd_obj''​ add ''​-DHAVE_SCOTCH''​ +
-  * ''​libs_all''​ add ''​-L$SCOTCHHOME/​lib -lsctoch -lsctocherr''​+
  
-Note that if you use Scotch you still need metis. +==== (optional) Adding ​AED2 support ​==== 
- +Here are the parameters that you have to edit to active ​AED2 support
-==== (optional) Adding ​AED ==== +  * ''​incs_all''​ add ''​-I$AED2HOME/include -I$AED2HOME/​mod''​
-Here are the parameters that you have to edit to active ​the AED feature+
-  * ''​incs_all''​ add ''​-I$AEDHOME/include -I$AEDHOME/​mod''​+
   * ''​cmd_obj''​ add ''​-DHAVE_AED2''​   * ''​cmd_obj''​ add ''​-DHAVE_AED2''​
-  * ''​libs_all''​ add ''​-L$AEDHOME/lib -laed2''​+  * ''​libs_all''​ add ''​-L$AED2HOME/lib -laed2''​ 
 +  * 
 ===== Compiling TELEMAC-MASCARET ===== ===== Compiling TELEMAC-MASCARET =====
  
 First of all we need to check that the environment is set properly. First of all we need to check that the environment is set properly.
  
-So first source your environment, by typing ​the following command ​in a terminal+First, ​source your environment ​using the following command:\\ 
-<box round> +<color darkorange>''<​nowiki>​$ ​source pysource.gfortranHPC.sh</​nowiki>''</​color>
-source pysource.gfortranHPC.sh +
-</box>+
  
-Then type in a terminal+\\ 
-<box round> +Then, to display your configuration,​ enter:\\ 
-config.py +<color darkorange>''<​nowiki>​$ ​config.py</​nowiki>''</​color>
-</box 100%>+
  
-Which show what your configuration is. +\\ 
-It should something like that:+It should ​display ​something like that:
  
 <code bash> <code bash>
Line 443: Line 442:
  
  
-... parsing configuration file: /​home/​yugi/​telemac-mascaret/​v8p0r0/​configs/​systel.cfg+... parsing configuration file: /​home/​yugi/​telemac-mascaret/​v8p4r0/​configs/​systel.cfg
  
  
Line 450: Line 449:
 gfortranHPC:​ gfortranHPC:​
  
-    +> Gfortran ​compiler ​4.9.2 with open_mpi for a debian 8+    +> GFortran ​compiler ​using Open MPI
     +> root:     /​home/​yugi/​telemac-mascaret/​v8p0r0     +> root:     /​home/​yugi/​telemac-mascaret/​v8p0r0
     +> module: ​  ​splitsel / mascaret / ad / tomawac / damocles / partel / postel3d     +> module: ​  ​splitsel / mascaret / ad / tomawac / damocles / partel / postel3d
Line 463: Line 462:
 </​code>​ </​code>​
  
-If everything ​is alright just type in the terminal+\\ 
-<box round> +If everything ​went fine, you can now build the whole system:\\ 
-compileTELEMAC.py +<color darkorange>''<​nowiki>​$ compile_telemac.py</nowiki>''</​color>
-</box>+
  
-If at the end you have ''​My Work is done'' ​it worked properly.+\\ 
 +A successfull build will always ​end with the following message: <color darkorange>​''​My Work is done''​</​color>​.
  
  
Line 479: Line 478:
  
 Go into <​root>​examples/​telemac2d/​gouttedo Go into <​root>​examples/​telemac2d/​gouttedo
-And type in the terminal: +And type in the terminal:\\ 
-<box round> +<color darkorange>''<​nowiki>​$ ​telemac2d.py t2d_gouttedo.cas --ncsize=4</​nowiki>''</​color>
-telemac2d.py t2d_gouttedo.cas --ncsize=4 +
-</box>+
  
-If at the end you have ''​My Work is done'' ​it works properly.+\\ 
 +Again, a successfull run will display ​the message <color darkorange>​''​My Work is done''​</​color>​.
  
  
Line 492: Line 490:
 ====== Additional configurations ====== ====== Additional configurations ======
  
-Here we will give additional parameters ​to add to install TELEMAC-MASCARET on a cluster and how to compile the Telemac2d ​API.+Herewe give additional parameters to install ​the TELEMAC-MASCARET ​system ​on a cluster and how to compile the Python ​API.
  
 ===== Compile on a cluster ===== ===== Compile on a cluster =====
  
 You will need to follow the installation procedure for a parallel installation first. You will need to follow the installation procedure for a parallel installation first.
-Then there are two ways to run on a cluster: +Thenthere are two ways to run on a cluster: 
-  * When you run a job everything ​is run in the cluster ​queue system. +  * Running ​everything ​on the cluster ​queueing ​system. 
-  * When you run a job, only the execution of the TELEMAC-MASCARET executable ​is run through ​the cluster ​queue system. Partitioning is run on the frontal. The gathering will have to be done by hand+  * Running ​only the execution of the TELEMAC-MASCARET executable the cluster ​queueing ​system. Partitioning is run on frontal ​node. The gathering will have to be done by hand.
-\\ +
-To use ''​runcode.py''​ in a standard mode and not take into account your modification for the cluster just add ''​--mpi''​ to the command+
 \\ \\
 +To use ''​runcode.py''​ in a standard mode and not take into account your modification for the cluster, just add ''​--mpi''​ to the command. ​
 \\ \\
 \\ \\
-For the first one, add the following options: +For the first solution, add the following options: 
-  * ''​hpc_stdin'' ​it defines your batch file (i.e. the parameter file you use to run a job in queue). +  * ''​hpc_stdin''​defines your batch file (i.e. the parameter file you use to run a job in queue). 
-  * ''​hpc_runcode'' ​The command to run instead of the classic execution of TELEMAC-MASCARET. +  * ''​hpc_runcode''​: the command to run instead of the classic execution of TELEMAC-MASCARET. 
-  * ''​par_cmdexec'' ​Defines ​the command for partel, you might need to change it to comply with your cluster.+  * ''​par_cmdexec''​: defines ​the command for PARTEL, you might need to change it to comply with your cluster.
  
 Here is an example of a configuration of a cluster: Here is an example of a configuration of a cluster:
Line 601: Line 598:
 ===== Dynamic compilation for TelApy (Python API) ===== ===== Dynamic compilation for TelApy (Python API) =====
  
-To use the API, the TELEMAC-MASCARET system and all its external libraries must be compiled in dynamic ​form.+With the above compilation,​ you already have the API but you cannot have a User Fortran in your study. 
 +For that, the TELEMAC-MASCARET system and all its external libraries must be compiled in dynamic ​mode.
  
 For each prerequisite you can find a section **Dynamic installation** if there is a modification to do for the installation. For each prerequisite you can find a section **Dynamic installation** if there is a modification to do for the installation.
  
-For the rest follow the standard installation.+For the restfollow the standard installation.
  
 Then in <​systel.cfg>​ you need to adapt your configuration so that TELEMAC-MASCARET is compiled in dynamic. Then in <​systel.cfg>​ you need to adapt your configuration so that TELEMAC-MASCARET is compiled in dynamic.
Line 613: Line 611:
   - Change the command ''​cmd_lib''​ to generate a dynamic library.   - Change the command ''​cmd_lib''​ to generate a dynamic library.
  
-Here is an example of configuration adapted from ''​gfortranHPC''​. The ''​[general]''​ section is the same as above.+Here is an example of configuration adapted from ''​gfortranHPC''​. The ''​[general]''​ section is the same as above.
  
 <code python> <code python>
-[C9.gfortran.dyn] +[gfortran.dyn] 
-brief: ​Gfortran ​compiler ​4.9.2 with open_mpi for a debian 8 all libraries are compiled ​in dynamic+brief: ​GFortran ​compiler with Open MPI in dynamic ​mode
 # #
 options: api options: api
Line 638: Line 636:
 </​code>​ </​code>​
  
-Then you need to run ''​compileTELEMAC.py''​. +Then you need to run ''​compile_telemac.py''​. 
-You can find an example in python27/​TelApy_api/​gouttedo.py +You can find an example in python3/​TelApy_api/​gouttedo.py