Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are all these compiler flags needed for Debug build? #735

Closed
edwardhartnett opened this issue Dec 13, 2022 · 2 comments · Fixed by #800
Closed

Are all these compiler flags needed for Debug build? #735

edwardhartnett opened this issue Dec 13, 2022 · 2 comments · Fixed by #800
Assignees
Labels
question Further information is requested

Comments

@edwardhartnett
Copy link
Collaborator

In our CMakeFiles.txt we have this for GNU compilers:

set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
set(CMAKE_Fortran_FLAGS_DEBUG "-O1 -ggdb -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check -fno-omit-frame-pointer -fno-optimize-sibling-calls")

In other projects we have:

  set(CMAKE_Fortran_FLAGS "-g -fno-range-check -funroll-loops ${CMAKE_Fortran_FLAGS}")
  set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall")

So why all the extra settings in UFS_UTILS?

@GeorgeGayno-NOAA do you know?

@edwardhartnett edwardhartnett added the question Further information is requested label Dec 13, 2022
@edwardhartnett edwardhartnett self-assigned this Dec 13, 2022
@edwardhartnett
Copy link
Collaborator Author

Also we have these messages when CMake is run:

cc1: warning: command-line option ‘-fallow-invalid-boz’ is valid for Fortran but not for C
cc1: warning: command-line option ‘-fallow-argument-mismatch’ is valid for Fortran but not for C

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Mar 31, 2023
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Mar 31, 2023
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Mar 31, 2023
@GeorgeGayno-NOAA
Copy link
Collaborator

Branch at 85902c3 successfully compiled in Debug mode on Orion, Jet, WCOSS2 (Intel only) and Hera (Gnu and Intel).

@GeorgeGayno-NOAA GeorgeGayno-NOAA self-assigned this Mar 31, 2023
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Apr 3, 2023
GeorgeGayno-NOAA added a commit that referenced this issue Apr 4, 2023
Update (and simplify) the Intel "Debug" compile flags to match those required by NCO.

Minor updates to the regional_esg_grid code so it can be compiled in
"Debug" mode on WCOSS2.

Fixes #735.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants