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 [2019/10/31 14:50] (current)
y.audouin [Prerequisites]
Line 8: Line 8:
  
 Here is a list of the software you will need to compile and run the TELEMAC-MASCARET system. Here is a list of the software you will need to compile and run the TELEMAC-MASCARET system.
 +
 +In the text below <​version>​ is to be replace by the version of telemac you are installing (v8p0r0, v8p1r0...)
  
 ===== Mandatory ===== ===== Mandatory =====
Line 28: Line 30:
   * scipy ([[installation_scipy]])   * scipy ([[installation_scipy]])
   * matplotlib ([[installation_matplotlib]])   * matplotlib ([[installation_matplotlib]])
-  * mayavi ([[installation_mayavi]]) 
  
 ==== MED Format ==== ==== MED Format ====
Line 53: Line 54:
  
 ==== AED Library ==== ==== AED Library ====
-This will actuavate ​more process in the waqtel module [[installation_linux_aed]]+This will activate ​more process in the waqtel module [[installation_linux_aed]]
  
  
Line 64: Line 65:
  
 ===== Download the zipped version ===== ===== Download the zipped version =====
-<color red> Link not available at the moment for v8p0r0</​color>​\\+<color red> Link not available at the moment for v8p0</​color>​\\
 You can download here the two zipped files of the latest stable release (v7p2r0 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 source code and the documentation [[http://​www.opentelemac.org/​index.php/​binaries/​viewdownload/​45-releases/​1413-telemac-mascaret-v7p2r0-src|here]]
Line 84: Line 85:
 Here are the information we will use to download the sources: 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)   * **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)+  * **Source code repository Path** <color darkorange>''/​tags/​<​version>​/''</​color>​ (for the latest stable version of the source code)
   * **Username** <color darkorange>''​ot-svn-public''</​color>​   * **Username** <color darkorange>''​ot-svn-public''</​color>​
   * **Password** <color darkorange>''​telemac1*''</​color>​   * **Password** <color darkorange>''​telemac1*''</​color>​
Line 92: Line 93:
 The commands are then: The commands are then:
 <box round> <box round>
-''​mkdir ~/​telemac-mascaret/​v8p0r0''​\\ +''​mkdir ~/​telemac-mascaret/​<​version>​''​\\ 
-''​svn co http://​svn.opentelemac.org/​svn/​opentelemac/​tags/​v8p0r0 ​~/​telemac-mascaret/​v8p0r0 ​--username=ot-svn-public --password=telemac1*''​+''​svn co http://​svn.opentelemac.org/​svn/​opentelemac/​tags/​<​version> ​~/​telemac-mascaret/​<​version> ​--username=ot-svn-public --password=telemac1*''​
 </​box>​ </​box>​
  
-To install it somewhere else replace ''​~/​telemac-mascare/​v8p0r0''​ by where you want to install it.\\ +To install it somewhere else replace ''​~/​telemac-mascare/​<​version>​''​ by where you want to install it.\\ 
-To install the trunk replace ''​tags/​v8p0r0''​ by ''​trunk''​.+To install the trunk replace ''​tags/​<​version>​''​ by ''​trunk''​.
  
 ==== (optional) Proxy ==== ==== (optional) Proxy ====
Line 127: Line 128:
   * **<​pysource>​** This is your environment file.   * **<​pysource>​** This is 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/​<​version>​''​ (**<​root>​**) with two configurations (**gfortran** and **gfortranHPC**). All the files for that examples can be found at the end of each section.
  
 ===== Setting your environment ===== ===== Setting your environment =====
Line 145: Line 146:
 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/​yugi/​telemac-mascaret/​<​version>​
 export SYSTELCFG=$HOMETEL/​configs/​systel.cfg export SYSTELCFG=$HOMETEL/​configs/​systel.cfg
 export USETELCFG=gfortranHPC export USETELCFG=gfortranHPC
Line 169: Line 170:
 ### ###
 # Path to telemac root dir # Path to telemac root dir
-export HOMETEL=/​home/​yugi/​telemac-mascaret/​v7p2r0+export HOMETEL=/​home/​yugi/​telemac-mascaret/​v8p0r0
 # 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 183:
 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/​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 269: Line 270:
 language: 2 language: 2
 modules: ​ system modules: ​ system
-version:  ​v7p2r0+version:  ​v8p1 
 +
 +options: static api 
 +
 +f2py_name: f2py3 
 +pyd_fcompiler:​ gnu95
 # #
 sfx_zip: ​   .zip sfx_zip: ​   .zip
Line 286: Line 292:
 incs_all: incs_all:
 # #
-cmd_obj_c: gcc -c <​srcName>​ -o <​objName>​+cmd_obj_c: gcc -fPIC -c <​srcName>​ -o <​objName>​
 </​code> ​ </​code> ​
  
Line 299: Line 305:
   * 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 in static 
 +  * f2py_name: Name of the f2py to use (here f2py3 is the python3 version) 
 +  * pyd_compiler:​ Name of the compiler in f2py (you can get that name by running ""​f2py -c --help-fcompiler)
  
 Now we add the informations for gfortran: Now we add the informations for gfortran:
Line 310: Line 318:
 brief: Gfortran compiler 4.9.2 brief: Gfortran compiler 4.9.2
 # #
-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 356: Line 364:
 language: 2 language: 2
 modules: ​ system modules: ​ system
-version:  ​v7p2r0+version:  ​v8p1 
 +
 +options: static api 
 +
 +f2py_name: f2py3 
 +pyd_fcompiler:​ gnu95
 # #
 sfx_zip: ​   .zip sfx_zip: ​   .zip
Line 373: Line 386:
 incs_all: incs_all:
 # #
-cmd_obj_c: gcc -c <​srcName>​ -o <​objName>​+cmd_obj_c: gcc -fPIC -c <​srcName>​ -o <​objName>​
 # #
 # _____          __________________________________ # _____          __________________________________
Line 383: Line 396:
 brief: Gfortran compiler 4.9.2 brief: Gfortran compiler 4.9.2
 # #
-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
Line 601: Line 614:
 ===== Dynamic compilation for TelApy (Python API) ===== ===== Dynamic compilation for TelApy (Python API) =====
  
-To use the APIthe TELEMAC-MASCARET system and all its external libraries must be compiled in dynamic form.+ 
 +With the compilation before 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 form.
  
 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.
Line 612: Line 627:
   - Add the option -fPIC (or equivalent for your compiler).   - Add the option -fPIC (or equivalent for your compiler).
   - Change the command ''​cmd_lib''​ to generate a dynamic library.   - Change the command ''​cmd_lib''​ to generate a dynamic library.
 +  - replace the options argument by "​options:​ api" (remove the static keyword)
  
 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.
Line 638: Line 654:
 </​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