Skip to content

Fix TurbSim compile with OpenMP and IFX compiler#3224

Merged
deslaughter merged 1 commit intoOpenFAST:rc-4.2.1from
deslaughter:turbsim_omp_threadprivate_fix
Feb 27, 2026
Merged

Fix TurbSim compile with OpenMP and IFX compiler#3224
deslaughter merged 1 commit intoOpenFAST:rc-4.2.1from
deslaughter:turbsim_omp_threadprivate_fix

Conversation

@deslaughter
Copy link
Collaborator

This PR is ready to merge.

Feature or improvement description

This PR corrects a compile error that occurs in TurbSim when using the IFX compiler with OpenMP enabled due to the incorrect placement of the !$OMP directive before the variable declaration instead of after it.

Impacted areas of the software

TSsubs.f90 in TurbSim

Additional supporting information

The OpenMP features that were added to TurbSim just before 4.2.0 was released were not tested with the IFX compiler, TurbSim was compiled without OpenMP enabled. It was later found that the OpenMP directive for the TRH variable, making it thread private, needed to be placed after the declaration for the IFX compiler. Gfortran did not give a warning or error.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a compilation error in TurbSim when using the Intel IFX compiler with OpenMP enabled. The issue was that the !$OMP THREADPRIVATE(TRH) directive was incorrectly placed before the variable declaration instead of after it, which IFX requires but gfortran does not enforce.

Changes:

  • Moved the !$OMP THREADPRIVATE(TRH) directive to appear after the TRH variable declaration to comply with IFX compiler requirements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@deslaughter deslaughter merged commit 871ccb2 into OpenFAST:rc-4.2.1 Feb 27, 2026
16 checks passed
@deslaughter deslaughter deleted the turbsim_omp_threadprivate_fix branch February 27, 2026 18:18
@andrew-platt andrew-platt added this to the v4.2.1 milestone Mar 10, 2026
@andrew-platt andrew-platt mentioned this pull request Mar 10, 2026
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants