Welcome, Guest
Username: Password: Remember me

TOPIC: Compilation scipts seems to have hardcoded directives for GFortran

Compilation scipts seems to have hardcoded directives for GFortran 1 year 9 months ago #42055

  • bzindovic
  • bzindovic's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 3
While trying to use Intel compilers for the recent version of TELEMAC v8p4r0, the build fails due to hard coded directives for library inclusions that seems to be geared toward GFortran.

For instance, during the linking of executables, every link fails with the following text inside the link command:
-lgaia4telemac2d -lkhione4telemac2d -lwaqtel4telemac2d -lstbtel4telemac2d -lsisyphe4telemac2d -ltomawac4telemac2d -lad4telemac2d -lnestor4telemac2d -lbief4telemac2d -lparallel4telemac2d -lhermes4telemac2d -ldamocles4telemac2d -lspecial4telemac2d

which seems not to be accepted by non-GFortran compilers under Windows,

My quick-and-dirty solution was to list real library names (e.g. instead of
-lgaia4telemac2d I've put
libgaia4telemac2d.lib) but this leads to the build of large executables containing code the do not require.

Did anyone had such issue? How did you resolve it?
The administrator has disabled public write access.

Compilation scipts seems to have hardcoded directives for GFortran 1 year 9 months ago #42058

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
Hello,

Thanks for reporting this problem. This may be related to a patch I pushed last year to remove hard-coded absolute paths in Telemac binaries generated on Linux. Actually, the linking command that you pointed out is correct on Linux for all compilers, including the Intel Fortran compiler. However, on Windows, Intel relies on MSVC which behaves in a completely different way. Unfortunately, I do not have any solution at the moment, but I'll try to fix this as soon as possible and I'll open a GitLab issue in the mean time to keep track of the problem.
The administrator has disabled public write access.
The following user(s) said Thank You: bzindovic

Compilation scipts seems to have hardcoded directives for GFortran 1 year 9 months ago #42065

  • bzindovic
  • bzindovic's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 3
Hello,

That might be the case, as Intel on Windows uses MSVC linker under the hood.

Maybe the solution would be to have something similar to the line in the cfg file:
mods_all:   /include:<config>

My suggestion would be to add something like this in the cfg file for Windows:
libs_linking_pattern:   lib<libs>.lib
and something like this for Linux:
libs_linking_pattern:   -l<libs>
The administrator has disabled public write access.

Compilation scipts seems to have hardcoded directives for GFortran 1 year 9 months ago #42073

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
Thanks for the help, I will have to update my local Intel configuration to test your change and update the build script accordingly. May I ask what version of oneAPI you are using?
The administrator has disabled public write access.
The following user(s) said Thank You: bzindovic

Compilation scipts seems to have hardcoded directives for GFortran 1 year 9 months ago #42077

  • bzindovic
  • bzindovic's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 3
My oneAPI version is 2023.0, I think it is the latest version available.
The administrator has disabled public write access.
Moderators: borisb

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