Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Telemac (v8p3) installation with cygwin

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39883

  • thomas.le
  • thomas.le's Avatar
Hi dear Telemac users,

I've been trying to install Telemac latest version on Windows with cygwin (wiki.opentelemac.org/doku.php?id=install..._windows_with_cygwin). I've been through many errors and I believe I'm not far from succeeding but I'm a bit stuck now.

I really hope this issue has not already been solved on this forum.

So my error comes when I compile telemac:
cygwin:


+> Windows static build using Cygwin and MS-MPI

+> root: /cygdrive/c/my_opentelemac
+> module: ad / api / artemis / bief
damocles / gaia / gretel / hermes
identify_liq_bnd / khione / mascaret / nestor
parallel / partel / postel3d / sisyphe
special / stbtel / telemac2d / telemac3d
tomawac / waqtel


Compiling from the tree top api plus dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> There is no need to compile any object
+> There is no need to package any library
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lhwloc
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot find -levent_core
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot find -levent_pthreads
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/cygdrive/c/my_opentelemac/scripts/python3/compile_telemac.py", line 143, in <module>
main()
File "/cygdrive/c/my_opentelemac/scripts/python3/compile_telemac.py", line 129, in main
compile_cmdf(options.ncsize, modules, options.verbose)
File "/cygdrive/c/my_opentelemac/scripts/python3/compilation/compil_tools.py", line 1333, in compile_cmdf
found_exe = create_exe_files(item, mod,
File "/cygdrive/c/my_opentelemac/scripts/python3/compilation/compil_tools.py", line 510, in create_exe_files
raise TelemacException(\
utils.exceptions.TelemacException: Could not link your executable. Please verify your external library installation or the python script itself.

It seems that I need to install some external libraries but I don't know how to do that correctly. Can someone guide me through this process?

You will find my systel and pysource files attached.

Thanks for your help.

Have a nice day,

Thomas
Attachments:
The administrator has disabled public write access.

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39884

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hi Thomas,
I strongly recommend switching to MSYS2, a cygwin fork that is maintained and I have used with success. Anyway, I believe that only a distribution of GCC for windows like TDM or MINGW64 would do just fine. I only needed MSYS2 to compile METIS and MUMPS libraries.
Costas
The administrator has disabled public write access.
The following user(s) said Thank You: thomas.le

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39886

  • thomas.le
  • thomas.le's Avatar
Hi Costas,

Thank you very much for your guidance.
I downloaded msys2 and compiled again, I had the folowwing error:
+> There is no need to compile any object
+> There is no need to package any library
'mpif90' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

So I changed my systel file and replace mpif90 by gcc and gfortran. I then had an error very similar to my first one...
Compiling from the tree top api plus dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> There is no need to compile any object
+> There is no need to package any library
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmed: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmedfwrap: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lhdf5: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ldl: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmetis: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ldmumps: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmumps_common: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpord: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lscalapack: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llapack: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lblas: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsmpi: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -laed2: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lturbulence: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lutil: No such file or directory
collect2.exe: error: ld returned 1 exit status
Traceback (most recent call last):
File "c:\my_opentelemac\scripts\python3\compile_telemac.py", line 143, in <module>
main()
File "c:\my_opentelemac\scripts\python3\compile_telemac.py", line 129, in main
compile_cmdf(options.ncsize, modules, options.verbose)
File "c:/my_opentelemac\scripts\python3/compilation/compil_tools.py", line 1333, in compile_cmdf
found_exe = create_exe_files(item, mod,
File "c:/my_opentelemac\scripts\python3/compilation/compil_tools.py", line 510, in create_exe_files
raise TelemacException(\
utils.exceptions.TelemacException: Could not link your executable. Please verify your external library installation or the python script itself.

In the guide to install Telemac using cygwin, during the cygwin installation a number of prerequisites are also installed. I installed MSYS2 following MSYS2 website instructions. Do you think the error comes from the fact that I'm missing the prerequisites? If it's the case how should I install MSYS2 with the right prerequisites?

Thanks for your time!

Thomas
The administrator has disabled public write access.

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39887

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
For MSYS2 to compile Telemac, according to my notes, you need to run the following in the MSYS2 console:
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
Costas
The administrator has disabled public write access.
The following user(s) said Thank You: thomas.le

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39888

  • thomas.le
  • thomas.le's Avatar
I did this step, it was specified in the msys2 website...
Then to compile Telemac I opened a msys2 mingw x64 console from which I source my pysource then launch Telemac compilation.
I don't undestand what's wrong with my libraries :/

Thomas
The administrator has disabled public write access.

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39890

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
The compilation step is normally executed from CMD or Powershell, NOT the MSYS console. Of course PATHS need be set accordingly (python etc.)
For example, in my case:
compile_telemac.py --clean -j24 -f O:\trunk\configs\systel_gfmsmpi.cfg -c gfmsmpi

Edit:
I attach my configuration file to draw inspiration from. You will need to remove links to extra libraries (MUMPS, MSMPI etc) to begin with.

File Attachment:

File Name: systel_gfmsmpi_2022-02-24.cfg
File Size: 7 KB
The administrator has disabled public write access.
The following user(s) said Thank You: thomas.le

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39896

  • thomas.le
  • thomas.le's Avatar
Hi!

Unfortunately I didn't managed yet to compile telemac. I've tried many version of systel files inspired from yours but I wasn't able to find one that worked for me.

Here is my latest error message while running compile_telemac.py :
win:


+> This will create standard executable.
| Using MINGW-W64 compiler.

+> root: C:\my_opentelemac
+> module: ad / api / artemis / bief
damocles / gaia / gretel / hermes
identify_liq_bnd / khione / mascaret / nestor
parallel / partel / postel3d / sisyphe
special / stbtel / telemac2d / telemac3d
tomawac / waqtel


Compiling from the tree top api plus dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> There is no need to compile any object
+> There is no need to package any library
example_cpl_t2d_sis.o:example_cpl_t2d_sis.f:(.text+0x1083): undefined reference to `mpi_init_'
example_cpl_t2d_sis.o:example_cpl_t2d_sis.f:(.text+0x10a1): undefined reference to `mpi_comm_rank_'
example_cpl_t2d_sis.o:example_cpl_t2d_sis.f:(.text+0x10bf): undefined reference to `mpi_comm_size_'
example_cpl_t2d_sis.o:example_cpl_t2d_sis.f:(.text+0x11d5): undefined reference to `mpi_finalize_'
c:/opentelemac-mascaret/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: example_cpl_t2d_sis.o: bad reloc address 0x0 in section `.pdata'
c:/opentelemac-mascaret/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Traceback (most recent call last):
File "C:\my_opentelemac\scripts\python3\compile_telemac.py", line 143, in <module>
main()
File "C:\my_opentelemac\scripts\python3\compile_telemac.py", line 129, in main
compile_cmdf(options.ncsize, modules, options.verbose)
File "C:\my_opentelemac\scripts\python3\compilation\compil_tools.py", line 1333, in compile_cmdf
found_exe = create_exe_files(item, mod,
File "C:\my_opentelemac\scripts\python3\compilation\compil_tools.py", line 510, in create_exe_files
raise TelemacException(\
utils.exceptions.TelemacException: Could not link your executable. Please verify your external library installation or the python script itself.

I alson ran compile_telemac from cmd as you suggested. The errors I get are the same. If you have some other ideas on how to solve my issue I would be glad.

You will find attached my latest systel file.

Have a great day and thanks again for your time.

Thomas
Attachments:
The administrator has disabled public write access.

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39897

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Try compiling my 'gfsdbg' configuration that does not include parallel libraries (MSMPI) which apparently are not configured properly for your system. So taking one step at a time, try to compile a scalar version and then add the libraries needed for parallel.
Costas
The administrator has disabled public write access.

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39899

  • thomas.le
  • thomas.le's Avatar
Thanks again for your answer!

After removing all the links of parallel libraries from my systel I recompiled with your gfsdbg and got the following error:
gfsdbg:


+> This will create debug executable, for scalar mode.
| Using MINGW-W64 compiler.
| REMARKS:
| -'options' field must be present even if blank.

+> root: C:\my_opentelemac
+> module: ad / api / artemis / bief
damocles / gaia / gretel / hermes
identify_liq_bnd / khione / mascaret / nestor
parallel / partel / postel3d / sisyphe
special / stbtel / telemac2d / telemac3d
tomawac / waqtel


Compiling from the tree top api plus dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> There is no need to compile any object
sorry - this program has been built without plugin support
Traceback (most recent call last):
File "C:\my_opentelemac\scripts\python3\compile_telemac.py", line 143, in <module>
main()
File "C:\my_opentelemac\scripts\python3\compile_telemac.py", line 129, in main
compile_cmdf(options.ncsize, modules, options.verbose)
File "C:\my_opentelemac\scripts\python3\compilation\compil_tools.py", line 1318, in compile_cmdf
raise TelemacException(\
utils.exceptions.TelemacException:
+> failed: ...my_opentelemac\builds\gfsdbg\lib\libspecial4api.a

Any ideas?
Attachments:
The administrator has disabled public write access.

Telemac (v8p3) installation with cygwin 2 years 8 months ago #39900

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Try adding --clean option to your compilation command.
Also check that mingw64 is added to PATH environmental variables.
I have both "C:\msys64\mingw64\bin" and "C:\msys64" in my PATH.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.