Fix TurbSim compile with OpenMP and IFX compiler#3224
Merged
deslaughter merged 1 commit intoOpenFAST:rc-4.2.1from Feb 27, 2026
Merged
Fix TurbSim compile with OpenMP and IFX compiler#3224deslaughter merged 1 commit intoOpenFAST:rc-4.2.1from
deslaughter merged 1 commit intoOpenFAST:rc-4.2.1from
Conversation
…laration for IFX compiler
Contributor
There was a problem hiding this comment.
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 theTRHvariable declaration to comply with IFX compiler requirements
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
!$OMPdirective before the variable declaration instead of after it.Impacted areas of the software
TSsubs.f90in TurbSimAdditional 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
TRHvariable, making it thread private, needed to be placed after the declaration for the IFX compiler. Gfortran did not give a warning or error.