You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is essentially benign, because everyone knows not to use NAG when performance matters. People only use NAG because it is very strict wrt Fortran standard checking.
More important interesting are the 4 ESMX failures. The NUOPC apps proto report card looks like this:
Several ESMX app protos pass, indicating that this is NOT a general ESMX/CMake build issue with NAG. The 4 failing tests fail during the final link stage with duplicate symbol errors. The common theme in those 4 tests is the specification of an OpenMP dependency in esmxBuild.yaml via
application:
link_packages: OpenMP
Which leads to errors like the following during linking:
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /discover/nobackup/projects/gmao/SIteam/comp/SLES-15/nag/7.2.15/lib/NAG_Fortran/safefit.o: in function `__NAGf90_pAlloc':
newfit.c:(.text+0x17b30): multiple definition of `__NAGf90_pAlloc'; /discover/nobackup/projects/gmao/SIteam/comp/SLES-15/nag/7.2.15/lib/NAG_Fortran/safefit.o:newfit.c:(.text+0x17b30): first defined here
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /discover/nobackup/projects/gmao/SIteam/comp/SLES-15/nag/7.2.15/lib/NAG_Fortran/safefit.o: in function `__NAGf90_lpAlloc':
newfit.c:(.text+0x17b70): multiple definition of `__NAGf90_lpAlloc'; /discover/nobackup/projects/gmao/SIteam/comp/SLES-15/nag/7.2.15/lib/NAG_Fortran/safefit.o:newfit.c:(.text+0x17b70): first defined here
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /discover/nobackup/projects/gmao/SIteam/comp/SLES-15/nag/7.2.15/lib/NAG_Fortran/safefit.o: in function `__NAGf90_oAlloc':
newfit.c:(.text+0x17bb0): multiple definition of `__NAGf90_oAlloc'; /discover/nobackup/projects/gmao/SIteam/comp/SLES-15/nag/7.2.15/lib/NAG_Fortran/safefit.o:newfit.c:(.text+0x17bb0): first defined here
...
Ahhh. Yes, it is indeed an issue and I'm not sure if newer CMake fixes it yet (cc @bradking).
Currently in GEOS, I essentially hacked around it at some point as at least the latest CMake at that time didn't yet fix it. Perhaps you can implement it as well?
My workaround is:
# CMake has a bug with NAG and OpenMP:# https://gitlab.kitware.com/cmake/cmake/-/issues/21280# so we work around itif (OpenMP_Fortran_FOUND AND CMAKE_Fortran_COMPILER_ID STREQUAL"NAG")
message(STATUS "NAG Fortran detected, resetting OpenMP flags to avoid CMake bug")
set_property(TARGET OpenMP::OpenMP_Fortran PROPERTY INTERFACE_LINK_LIBRARIES "")
set_property(TARGET OpenMP::OpenMP_Fortran PROPERTY INTERFACE_LINK_OPTIONS "-openmp")
endif()
where I just sort of..."shove" the -openmp flag into the OpenMP::OpenMP_Fortran target. Is this "good" CMake, no, but it's working CMake it seems!
Our current Discover/NAG report summary looks like this:
The one unit test that is failing is
ESMF_ArrayRedistPerfUTest.F90
from not meeting our performance threshold:This is essentially benign, because everyone knows not to use NAG when performance matters. People only use NAG because it is very strict wrt Fortran standard checking.
More important interesting are the 4 ESMX failures. The NUOPC apps proto report card looks like this:
Several ESMX app protos pass, indicating that this is NOT a general ESMX/CMake build issue with NAG. The 4 failing tests fail during the final link stage with duplicate symbol errors. The common theme in those 4 tests is the specification of an OpenMP dependency in
esmxBuild.yaml
viaWhich leads to errors like the following during linking:
After some searching I found that this seems to be a known issue in CMake. See: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
Seems that @mathomp4 is aware of this CMake issue since he left a comment under the mentioned ticket.
I wonder if later CMake versions might handles this case better. We should see if there are later CMake versions on Discover we could test.
The text was updated successfully, but these errors were encountered: