Skip to content

Clean up compiler flag specification#1227

Merged
ytremolet merged 7 commits intodevelopfrom
feature/cleanup_compiler_flags_part1
Mar 30, 2026
Merged

Clean up compiler flag specification#1227
ytremolet merged 7 commits intodevelopfrom
feature/cleanup_compiler_flags_part1

Conversation

@fmahebert
Copy link
Copy Markdown
Contributor

Description

As a first step towards cleaning JEDI's specification of compilers flags, this PR reorganizes and changes flags as follows:

  • a new file cmake/build_type_compiler_flags.cmake provides default build-type compiler flags for compilers not in ecbuild; this could eventually be contributed upstream. This file should be identical in all JEDI repos.
  • a new file cmake/jedi_common_compiler_flags.cmake provides JEDI specific compiler flags; for example warning levels, floating-point behavior, etc. This file should be identical in all JEDI repos.
  • repo-specific compiler flags

This has been tested with gcc13, IntelLLVM 2025.3, Intel mixing icx with legacy ifort; and also with Cray by David Davies at UKMO. In general, for these compilers, the cleaned up flags have fewer runtime floating-point issues, and more compile-time warnings.

Issue(s) addressed

This is work towards https://github.com/JCSDA-internal/CI/issues/173

Dependencies

Part of a large family of PRs, see the CI issue for a complete list. These do not strictly depend on each other.

Impact

Impact on users:

  • expect change in warnings emitted
  • when using Intel LLVM, possible small changes to floating-point values as a result of changing floating-point handling
  • this has not been tested with all compilers, so users of less-common compilers may need to iterate on the flags

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have run the unit tests before creating the PR

Copy link
Copy Markdown
Collaborator

@shlyaeva shlyaeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing soca @fmahebert! I did not review CMakeLists changes (not an expert), but the code changes and reference changes look good to me.

@ytremolet
Copy link
Copy Markdown
Contributor

Thank you for fixing soca @fmahebert! I did not review CMakeLists changes (not an expert), but the code changes and reference changes look good to me.

@shlyaeva Can you approve the PR?

@ytremolet ytremolet merged commit 3bf226d into develop Mar 30, 2026
3 checks passed
@ytremolet ytremolet deleted the feature/cleanup_compiler_flags_part1 branch March 30, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants