NOAA-GFDL / MOM6-examples

Example configurations for MOM6 and SIS2
Other
86 stars 148 forks source link

Remove FMS lib test; force LIBS in coupled builds #431

Closed marshallward closed 9 months ago

marshallward commented 10 months ago

We currently rely on an FMS library test to direct autoconf to prepend -lFMS to the LIBS flag. However, this conflicts with our explicit setting of LIBS, which contains multiple libraries which also rely on FMS, and must therefore precede -lFMS (in a POSIX-compliant linker, at least).

Unless we create new macros for every library - and find a way to do so for test functions with arguments - there is no way to control the ordering of these -l arguments. Therefore, we remove the FMS library test in the ice-ocean and AM2-coupled build for the time being, and explicitly set FMS in LIBS.

(We were already doing this in order to accommodate the other libraries, but this raised issues in Nvidia, which objected to the double-linking of FMS. We now only set FMS linking in LIBS.)

adcroft commented 9 months ago

Testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6-examples/-/pipelines/21654