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

Combine PROD and REPRO build options into 'Release' build type #1171

Merged
merged 23 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
631f54c
Combine PROD and REPRO build mode into 'Release' build type
DusanJovic-NOAA Apr 12, 2022
0c5685b
Merge remote-tracking branch 'origin/develop' into release_flags
DusanJovic-NOAA Apr 13, 2022
d0031c0
Merge branch 'ufs-community:develop' into release_flags
DusanJovic-NOAA Apr 18, 2022
44ef119
Use CMAKE_*_FLAGS_RELEASE for 'Release' build type
DusanJovic-NOAA Apr 18, 2022
0d51e3f
Update FV3
DusanJovic-NOAA Apr 18, 2022
3ab2732
Remove -fPIC
DusanJovic-NOAA Apr 18, 2022
f65e5fa
Update FV3
DusanJovic-NOAA Apr 25, 2022
2cb474d
Merge remote-tracking branch 'origin/develop' into release_flags
DusanJovic-NOAA Apr 25, 2022
94d6af5
Update FV3
DusanJovic-NOAA Apr 27, 2022
d0a0c99
Use DT_INNER_c192 in cpld_control_c192_p8 and cpld_restart_c192_p8
DusanJovic-NOAA Apr 27, 2022
1e2f547
Merge remote-tracking branch 'origin/develop' into release_flags
DusanJovic-NOAA May 2, 2022
9937c9d
Update BL_DATE
DusanJovic-NOAA May 2, 2022
68731d4
[AutoRT] hera.gnu Job Completed.
BrianCurtis-NOAA May 2, 2022
39d1ff2
[AutoRT] hera.intel Job Completed.
BrianCurtis-NOAA May 2, 2022
85fa595
[AutoRT] cheyenne.gnu Job Completed.
BrianCurtis-NOAA May 2, 2022
8a50054
Add RegressionTests_wcoss_cray.log
DusanJovic-NOAA May 2, 2022
ec5e580
[AutoRT] orion.intel Job Completed.
BrianCurtis-NOAA May 2, 2022
04579c8
[AutoRT] gaea.intel Job Completed.
BrianCurtis-NOAA May 2, 2022
9a04ab5
[AutoRT] cheyenne.intel Job Completed.
BrianCurtis-NOAA May 2, 2022
0639903
Add RegressionTests_wcoss_dell_p3.log
DusanJovic-NOAA May 2, 2022
f7c75e4
[AutoRT] jet.intel Job Completed.
BrianCurtis-NOAA May 2, 2022
b077a0d
Remove exectable flag for 3 log files
DusanJovic-NOAA May 2, 2022
3f11f38
Revert .gitmodules and update FV3
DusanJovic-NOAA May 3, 2022
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
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ set(MULTI_GASES OFF CACHE BOOL "Enable MULTI_GASES")
set(MOVING_NEST OFF CACHE BOOL "Enable moving nest code")
set(OPENMP ON CACHE BOOL "Enable OpenMP threading")
set(PARALLEL_NETCDF OFF CACHE BOOL "Enable parallel NetCDF")
set(REPRO OFF CACHE BOOL "Enable REPRO mode")
set(JEDI_DRIVER OFF CACHE BOOL "Enable JEDI as top level driver")

set(CMAKE_Platform $ENV{CMAKE_Platform})
Expand All @@ -90,7 +89,6 @@ message("MULTI_GASES ...... ${MULTI_GASES}")
message("MOVING_NEST ...... ${MOVING_NEST}")
message("OPENMP ........... ${OPENMP}")
message("PARALLEL_NETCDF .. ${PARALLEL_NETCDF}")
message("REPRO ............ ${REPRO}")
message("JEDI_DRIVER ...... ${JEDI_DRIVER}")
message("")

Expand Down
2 changes: 1 addition & 1 deletion FV3
21 changes: 2 additions & 19 deletions cmake/GNU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,7 @@ if(DEBUG)
add_definitions(-DDEBUG)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
elseif(REPRO)
add_definitions(-DREPRO)
if (APPLE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
endif()
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_RELEASE "-O2")
endif()

# For ccpp
set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE)
35 changes: 10 additions & 25 deletions cmake/Intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,23 @@ if(DEBUG)
endif()
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv")
elseif(REPRO)
add_definitions(-DREPRO)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model consistent -qoverride-limits")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -debug minimal")
else()
if(32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3 -no-prec-div -no-prec-sqrt")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -debug minimal")
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")
if(AVX2)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -march=core-avx2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-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 "${CMAKE_Fortran_FLAGS} -axSSE4.2,CORE-AVX2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -axSSE4.2,CORE-AVX2")
elseif(AVX)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -march=core-avx-i")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-avx-i")
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")
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()

# For ccpp
set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Note to self. The if (APPLE) logic needs to be fixed, because it doesn't work with (LLVM) clang. We already fixed this in UPP.

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
Expand Down
Loading