/telemac-install-windows

Installation guide

GNU General Public License v3.0GPL-3.0

Get open TELEMAC-MASCARET

Go to the developer's website (opentelemac.org), register with your e-mail address, and log in.

Download the latest version of open TELEMAC-MASCARET from the Download page.

Compile and install from scratch

Get pre-requisites

On Windows download and install the following programs:

  • TortoiseSVN (requires admin rights
  • Python 3
    • With numpy, scipy, and matplotlib libraries (installing numpy involves the installation of scipy and matplotlib, too).
    • Consider to install Anaconda as described on hydroinformatics.github.io.
    • When using Anaconda, python might be reserved to a local environment. Therefore, make sure to install numpy, scipy, and matplotlib in the conda base environment through Anaconda Prompt (read more).
    • Add the PATH of the conda base environment to the system PATH Variable in Windows (follow instructions provided for MinGW, but replace C:\MinGW\bin with C:\Users\YOUR-USER-NAME\Anaconda3).
    • Read more about the link between Python scripts and TELEMAC in the developer's Wiki.
  • TELEMAC developers describe the installation of mpich, which is cannot be installed anymore in Windows 10. Here is a work-around:
    • WARNING: THE MPICH INSTRUCTIONS ARE NOT VERIFIED!
    • Download (choose the msi file) and install Microsoft's latest MPI software development kit from Microsoft's Download Center
    • After the installation, the compiled MPI executables should be located in C:\Program Files\Microsoft MPI\Bin (verify that smpd.exe and mpiexec.exe are in the directory).
    • Alternatively download a pre-compiled version of TELEMAC from the [developer's Installation files] page (e.g., v6p3 64b) and copy the mpich2 and metis folders to a new folder called C:\opentelemac.
    • Add the MPI PATH to the system PATH Variable in Windows (follow instructions provided for MinGW, but replace C:\MinGW\bin with C:\Program Files\Microsoft MPI\Bin OR, for the alternative, C:\opentelemac\metis;C:\opentelemac\mpich2\include).
  • MinGW (includes Fortran compiler repositories)

After the installation of MinGW, open MinGW Installer (either from Start and look for MinGW Installation Manager or use the desktop icon), go to Basic Setup > right-click on mingw32-gcc-fortran-bin (latest version) and select Mark for Installation. Then go to the Installation menu (top-left of the MinGW Installation Manager window) and click on Apply Changes. A window pops up and informs about the installation status. Close the pop-up window after successful installation. The MinGW directory should now contain a gfortran.exe that is recognized by the system as environment variable. To test if your system recognizes the gfortran environment variable, open a command line (e.g., click on Start, type cmd and hit Enter), and type gfortran. If the system answers 'gfortran' is not regonized as an internal or external command, operable program or batch file., further action is required:

  • To tell Windows to look in C:\MinGW\bin for the compiler, open a Windows Explorer window (e.g., press the Windows and E keys on the keyboard).
  • Go to your MinGW installation directory and identify where gfortran.exe is located (e.g., use the search box on the top right of the Windows Explorer window). The following steps assume that the file is stored as C:\MinGW\bin\gfortran.exe.
  • Click on Start and type env. Select Edit the system environment variables (requires admin rights). A System Properties window pops up.
  • In the System Properties window go to the Advanced tab and click on Environment Variables ... button near the bottom of the window.
  • In the System variables box (important: User variables for [...] will not work if your admin account is not the same as your standard user account, which is good practice) check if there is a Variable called PATH.
    • If there already is a PATH Variable, click Edit... and add the following to the end of the line: ;C:\MinGW\bin
    • If there is no PATH Variable, click New... and enter:
Variable Name: PATH
Variable Value: C:\MinGW\bin
  • Click OK in the Environment Variables and System Properties windows.
  • Close all open command line windows (if any), and re-open a new command line window (must be successively done). Type gfortran. Now, the system's reponse should be gfortran: fatal error: no input files (which is OK here, because we only want to test if the system recognizes the gfortran command).

Further action is required to add the MinGW pthread library (read more on stackoverflow.com):

  • Download PThreads for Win32 (POSIX)](https://www.sourceware.org/pthreads-win32/). At the time of writing this workflow, the latest version is pthreads-w32-2-9-1, which is available as a zipped folder tree at the developer's ftp server.
  • Unpack all *.lib and *.a files ( from \pthreads-w32-2-9-1-release.zip\Pre-built.2\lib\x64) to C:\MinGW\lib
  • Unpack all header files (*.h from \pthreads-w32-2-9-1-release.zip\Pre-built.2\include) to C:\MinGW\include
  • Unpack dynamic library link files (*.dll from \pthreads-w32-2-9-1-release.zip\Pre-built.2\dll\x64) to C:\Windows
  • If you are using Komodo or any other IDE make sure that it recognizes pthreads:
    • Go to Project > Properties
    • Go to C/C++ build > GCC C Compiler > Miscellaneous
    • Add "-pthread" to the beginning of Other Flags
    • Repeat/verify the procedure in C/C++ build > Settings > GCC C Compiler > Libraries
    • Include the "pthread" to other libraries and click Apply to rebuild the project.
  • ALTERNATIVE: Install Cygwin and add the library to MinGW (see discussion on mingw.org). Then add C:/cygwin/lib to the settings of the Library search path (in any IDE such as PyCharm or Komodo): Properties > C/C++ build > Settings > MinGW C Linker > Libraries

Note: More information about Fortran compilers for Windows can be found in the GCC Wiki.

On Linux download and install the following programs:

Download files form TELEMAC SVN repository

Download the latest version of open TELEMAC from the SVN repository indicated on the developer's website.

Windows

At the time of writing this article, the address of the latest SVN repository is http://svn.opentelemac.org/svn/opentelemac/tags/v8p1r0/.

Linux

Open the Terminal in the target directory where you want to install TELEMAC and type:

svn co http://svn.opentelemac.org/svn/opentelemac/tags/v8p1r0

Install (compile)

http://www.opentelemac.org/index.php/documentation/installation13?lang=en

Windows

Follow the installation instructions on the developer's website. The following instructions are a slightly modified version of the installation website:

  1. Open command line
  2. Enter (replace v8p1r0 with the desired version and C:\opentelemac\v8p1 with the target installation directory) - may take a while:
svn co http://svn.opentelemac.org/svn/opentelemac/tags/v8p1r0 "C:\opentelemac\v8p1" --username ot-svn-public --password telemac1*
  1. Copy configuration file (see github file)
  2. Create a shortcut on your Desktop (right-click > New shortshut)
    • Define C:\Windows\System32\cmd.exe as location item
    • Enter "Telemac v8p1" as name
  3. Right-click on the new shortcut and edit properties:
    • Target box: C:\Windows\System32\cmd.exe E:ON /V:ON /K set SYSTELCFG=C:\opentelemac\v8p1\configs\systel.cis-windows.cfg && PATH=C:\opentelemac\v8p1\scripts\python3;!PATH!
    • Start in box: C:\telemac\v8p1\
  4. Verify and modify (if necessary) C:\opentelemac\v8p1\configs*systel.cis-windows.cfg*:
    • Go to the windows 7 gfortran scalar section (typically line 82 onward) and identify the call to gfortran
      - typically: gfortran -c -O3 -fopenmp -fconvert=big-endian [...].
    • If -cpp is not included in the call, add it, for example, like this:
      gfortran -c -cpp -O3 -fopenmp -fconvert=big-endian [...]
    • With MPI installed according to the above descriptions, find all strings containing C:\opentelemac\mpi\bin\mpiexec.exe and replace them with mpiexec (i.e., an environment variable).
  5. Doubleclick on the new shortcut and type:
    • python scripts/python3/compile_telemac.py
    • Hint: Grab a beverage now. Compiling may take up to 30 minutes.
    • If you encounter errors and need to recompile use
      python scripts/python3/compile_telemac.py --clean

To test if the installation was successful, go to the Run > Test on Windows section and try to start one of the provided TELEMAC test cases.

Linux

Follow the installation instructions on the developer's website:

Load the adapted environment file in Terminal with:

source pysource.gfortranHPC.sh

OpenTelemac Docker

Download and install Docker.

Go to Frédéric Deniger's GitLab pages.

Run

Test TELEMAC

To get familiar with the usage of TELEMAC, use one of the open TELEMAC test cases (e.g., as described on the developer's website), which are typically located in the installation directory (e.g., C:\opentelemac\v8p1\examples).

Test on Windows

The following workflow builds on the steps described on the developer's website and uses the bump example (typically located in C:\opentelemac\v8p1\examples\telemac2d\bump):

  1. Start the open TELEMAC command line environment created in the installation (compilation) by double clicking on the Telemac v8p1 symbol on the desktop.
  2. Go to the test case directory (e.g., cd examples\telemac2d\bump)
  3. Run the telemac2d Python script:
    python scripts/python3/telemac2d.py t2d_bump_FE.cas

Blue Kenue (graphical user interface for pre- and post-processing)

Download and install the program

Blue Kenue is a convenient graphical user interface (GUI) provided by the National Research Council (NRC) ot the Government of Canada, for pre- and post-processing data for use with TELEMAC. Blue Kenue is primarily designed for Windows platforms, but should also run with the Wine environment on Linux platform. To get Blue Kenue, go to the NRC's Blue Kenue landing page and download the program. Follow the normal installation routines.

Get the documentation and beta dvelopments

To get the documentation and/or newer beta-releases of Blue Kenue, go to chyms.nrc.gc.ca and log in with the following credentials (source: Telemac forum):

  • User: Public.User
  • Password: anonymous

Got to the Public Download Area section and enter the requested information (First and Last name, affiliation, Email, and Telephone). Then click on the button Agree and proceed to public download area. Now, the CHyMS should open.

Scroll down to the Blue Kenue section to download beta releases and/or documentation/support files. The list of provided files is long and here are some recommendations: