Skip to content
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

Use OPENMP instead of OpenMP_Fortran_FOUND, cleanup compiler flags #531

Merged
merged 26 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
487e38f
Clean up compile flags
DusanJovic-NOAA Apr 15, 2021
7ab4ad2
Use OPENMP instead of OpenMP_Fortran_FOUND
DusanJovic-NOAA Apr 16, 2021
afe39b5
Update Intel.cmake (add -g -traceback)
DusanJovic-NOAA Apr 16, 2021
f091fe4
Merge remote-tracking branch 'origin/develop' into comp_flags
DusanJovic-NOAA Apr 16, 2021
cf3aa81
Update GNU.cmake
DusanJovic-NOAA Apr 16, 2021
c0f0d29
Use CMAKE_Fortran_FLAGS_DEBUG
DusanJovic-NOAA Apr 17, 2021
e02835f
Typo in Intel.cmake
DusanJovic-NOAA Apr 17, 2021
d1f8c71
Use ESMFConvenienceMacros.h instead of ESMFVersionDefine.h in NEMS
DusanJovic-NOAA Apr 17, 2021
d413d35
update FV3
DusanJovic-NOAA Apr 19, 2021
6c8bc03
Merge remote-tracking branch 'origin/develop' into comp_flags
DusanJovic-NOAA Apr 19, 2021
55bee54
Update stochastic_physics to fix 'make install'
DusanJovic-NOAA Apr 19, 2021
efa9c59
update FV3 (merge with develop)
DusanJovic-NOAA Apr 20, 2021
f25da92
Merge remote-tracking branch 'origin/develop' into comp_flags
DusanJovic-NOAA Apr 20, 2021
96b2fa4
Update CDEPS
DusanJovic-NOAA Apr 21, 2021
bfc7474
Update FV3
DusanJovic-NOAA Apr 21, 2021
1063b2c
Merge remote-tracking branch 'origin/develop' into comp_flags
DusanJovic-NOAA Apr 21, 2021
95130fe
Update baseline date tag to 20210421. run-ci
DusanJovic-NOAA Apr 21, 2021
46cdd9f
wcoss_cray log
DusanJovic-NOAA Apr 21, 2021
feb075e
wcoss_dell_p3 log
DusanJovic-NOAA Apr 21, 2021
024f43f
RT JOBS PASSED: gaea.intel. Log file uploaded.
BrianCurtis-NOAA Apr 21, 2021
0b0f345
RT JOBS PASSED: cheyenne.gnu. Log file uploaded.
BrianCurtis-NOAA Apr 21, 2021
d4ffcc5
RT JOBS PASSED: cheyenne.intel. Log file uploaded.
BrianCurtis-NOAA Apr 21, 2021
d26d487
RT JOBS PASSED: orion.intel. Log file uploaded.
BrianCurtis-NOAA Apr 21, 2021
66f2607
RT JOBS PASSED: hera.gnu. Log file uploaded.
BrianCurtis-NOAA Apr 22, 2021
ebcbc56
RT JOBS PASSED: hera.intel. Log file uploaded.
BrianCurtis-NOAA Apr 22, 2021
c52e15f
Revert .gitmodules and update FV3, NEMS and stochastic_physics submod…
DusanJovic-NOAA Apr 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[submodule "FV3"]
path = FV3
url = https://github.com/NOAA-EMC/fv3atm
branch = develop
#url = https://github.com/NOAA-EMC/fv3atm
#branch = develop
url = https://github.com/DusanJovic-NOAA/fv3atm
branch = comp_flags
[submodule "NEMS"]
path = NEMS
url = https://github.com/NOAA-EMC/NEMS
Expand All @@ -16,8 +18,10 @@
branch = develop
[submodule "stochastic_physics"]
path = stochastic_physics
url = https://github.com/noaa-psd/stochastic_physics
branch = master
#url = https://github.com/noaa-psd/stochastic_physics
#branch = master
url = https://github.com/DusanJovic-NOAA/stochastic_physics
branch = comp_flags
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/NOAA-EMC/CMakeModules
Expand Down
2 changes: 1 addition & 1 deletion FV3
19 changes: 9 additions & 10 deletions cmake/GNU.cmake
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@

set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcray-pointer -ffree-line-length-none -fno-range-check -fbacktrace")
DusanJovic-NOAA marked this conversation as resolved.
Show resolved Hide resolved

if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fdefault-double-8")
endif()

if(DEBUG)
add_definitions(-DDEBUG)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -ggdb -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb")
add_definitions(-DDEBUG)
elseif(REPRO)
add_definitions(-DREPRO)
if (APPLE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -ggdb -fno-range-check")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -ggdb")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -ggdb -fno-range-check")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -ggdb")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -ggdb")
endif()
add_definitions(-DREPRO)
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -fno-range-check")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
endif()

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fdefault-double-8")
endif()
58 changes: 18 additions & 40 deletions cmake/Intel.cmake
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte -qno-opt-dynamic-align")
DusanJovic-NOAA marked this conversation as resolved.
Show resolved Hide resolved
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source")

set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align")

if(32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -i4 -real-size 32")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -i4 -real-size 64")
if(NOT REPRO)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -no-prec-div -no-prec-sqrt")
endif()
if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
endif()

if(REPRO)
add_definitions(-DREPRO)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align")
elseif(DEBUG)
if(DEBUG)
add_definitions(-DDEBUG)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align")
else()
if(AVX2)
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -xCORE-AVX2 -qno-opt-dynamic-align")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -xCORE-AVX2 -qno-opt-dynamic-align")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -march=core-avx2 -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-avx2 -qno-opt-dynamic-align")
elseif(SIMDMULTIARCH)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -axSSE4.2,CORE-AVX2 -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -axSSE4.2,CORE-AVX2 -qno-opt-dynamic-align")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align")
endif()
endif()

if(REPRO)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model consistent -qoverride-limits -g -traceback")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -debug minimal")
elseif(DEBUG)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -traceback -ftrapuv")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -traceback -ftrapuvi -no-prec-div -no-prec-sqrt")
if(DEBUG_LINKMPI)
if(OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -link_mpi=dbg_mt")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we also address linking with DEBUG_LINKMPI

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How?

Copy link
Contributor

Choose a reason for hiding this comment

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

Expand All @@ -47,10 +16,19 @@ elseif(DEBUG)
endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -ftrapuv -traceback")
elseif(REPRO)
add_definitions(-DREPRO)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model consistent -qoverride-limits -g -traceback")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -debug minimal")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3 -no-prec-div -no-prec-sqrt")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -debug minimal")
set(FAST "-fast-transcendentals")
if(AVX2)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -march=core-avx2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-avx2")
elseif(SIMDMULTIARCH)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -axSSE4.2,CORE-AVX2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -axSSE4.2,CORE-AVX2")
endif()
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__IFC -sox -fp-model source")
2 changes: 1 addition & 1 deletion stochastic_physics