-
Notifications
You must be signed in to change notification settings - Fork 250
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
Add new cmake variable UFS_COMPILER_SUITE to support mixed Intel compilers (icx, icpx, ifort) #2504
Open
climbfuji
wants to merge
4
commits into
ufs-community:develop
Choose a base branch
from
climbfuji:feature/ufs_compiler_suite
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0ca9712
Add new cmake variable UFS_COMPILER_SUITE to support mixed Intel comp…
climbfuji 19d333f
Merge branch 'develop' into feature/ufs_compiler_suite
climbfuji 2298df4
Merge remote-tracking branch 'upstream/develop' into feature/ufs_comp…
jkbk2004 c8a7c02
Merge branch 'develop' into feature/ufs_compiler_suite
climbfuji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -sox -align array64byte -qno-opt-dynamic-align") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -fp-model precise") | ||
|
||
# warning #5462: Global name too long. | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 5462") | ||
|
||
# remark #7712: This variable has not been used. | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 7712") | ||
|
||
# remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'. | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 8291") | ||
|
||
#DH MAKE THIS THE DEPRECATION WARNING SUPPRESSOR # warning #5194: Source line truncated. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to self - todo |
||
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 5194") | ||
|
||
if(CMAKE_Platform STREQUAL "derecho.intel") | ||
set(CMAKE_Fortran_LINK_FLAGS "-Wl,--copy-dt-needed-entries") | ||
endif() | ||
|
||
if(NOT 32BIT) | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64") | ||
endif() | ||
|
||
if(DEBUG) | ||
add_definitions(-DDEBUG) | ||
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check -check noarg_temp_created -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays") | ||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv") | ||
else() | ||
if(FASTER) | ||
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise -assume buffered_stdout -fno-alias -align all -debug minimal -qoverride-limits -ftz -no-ip") | ||
set(CMAKE_C_FLAGS_RELEASE "-O3 -fp-model precise -debug minimal -qoverride-limits -ftz") | ||
else() | ||
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal -qoverride-limits") | ||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fp-model consistent") | ||
set(CMAKE_C_FLAGS_RELEASE "-O2 -debug minimal") | ||
set(FAST "-fast-transcendentals") | ||
endif() | ||
if(AVX2) | ||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -march=core-avx2") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=core-avx2") | ||
elseif(SIMDMULTIARCH) | ||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -axSSE4.2,CORE-AVX2") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -axSSE4.2,CORE-AVX2") | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mcmodel=medium") | ||
elseif(AVX) | ||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -march=core-avx-i") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=core-avx-i") | ||
endif() | ||
endif() | ||
|
||
if(APPLE) | ||
# The linker on macOS does not include `common symbols` by default | ||
# Passing the -c flag includes them and fixes an error with undefined symbols | ||
set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>") | ||
endif() | ||
|
||
# This must be last, to override all other optimization settings. | ||
if(DISABLE_FMA) | ||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma") | ||
endif() |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is a combination of
CMAKE_C_FLAGS
fromIntelLLVM.cmake
andCMAKE_Fortran_FLAGS
fromIntel.cmake