Skip to content

build: update gt4py to get compiler support#399

Merged
FlorianDeconinck merged 2 commits into
NOAA-GFDL:developfrom
romanc:romanc/compiler-config
Mar 12, 2026
Merged

build: update gt4py to get compiler support#399
FlorianDeconinck merged 2 commits into
NOAA-GFDL:developfrom
romanc:romanc/compiler-config

Conversation

@romanc
Copy link
Copy Markdown
Collaborator

@romanc romanc commented Mar 12, 2026

Description

The PR adds extended compiler support by updating GT4Py, which now auto-detects compilers (gnu, intel, clang, and apple-clang) and sets defaults for the compiler flags accordingly. For example, not all compilers have the same OpenMP flags and apple-clang doesn't support it out of the box anyway. All of this is now captured at the GT4Py level.

In addiition, GT4Py now automatically disables FMA operations in case of -O0 (optimization level 0) to help with stability in porting when comparing to Fortran generated reference data.

How has this been tested?

GT4Py changes were tested manually (because resetting environment variables and reloading the configuration isn't possible from within the pytest framework).

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas: N/A
  • I have made corresponding changes to the documentation (e.g. add new modules to docs/docstrings/): N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included: N/A

The PR adds extended compiler support by updating GT4Py, which now
auto-detects compilers (gnu, intel, clang, and apple-clang) and sets
defaults for the compiler flags accordingly. For example, not all
compilers have the same OpenMP flags and `apple-clang` doesn't support
it out of the box anyway. All of this is now caputred at the GT4Py
level.

In additition, GT4Py now automatically disables FMA operations in case
of `-O0` (optimization level 0) to help with stability in porting when
comparing to Fortran generated reference data.
@romanc romanc requested a review from FlorianDeconinck March 12, 2026 11:06
…DaceConfig

Fix optimization level (potentially) ignored on GPU
Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

Looking good - I pushed changes to the dace_config to reflect the gt4py.cartesian defaults

Let's wait for the CI to bless us again

@FlorianDeconinck FlorianDeconinck added this pull request to the merge queue Mar 12, 2026
Merged via the queue into NOAA-GFDL:develop with commit b6a25a3 Mar 12, 2026
7 checks passed
@romanc romanc deleted the romanc/compiler-config branch March 12, 2026 15:46
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.

2 participants