Skip to content

Commit cbc3a80

Browse files
Merge branch 'ufs-community:develop' into feature/purgehycom
2 parents a15a34c + de0da94 commit cbc3a80

23 files changed

+2328
-2298
lines changed

.github/scripts/check_log_warnings_remarks.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ def call_API(self, endpoint):
3434

3535
api_call = APICall(endpoint)
3636
response = requests.get(api_call.url, headers=api_call.header)
37+
if response.status_code != 200:
38+
logging.warning(response)
39+
print(response)
40+
sys.exit(1)
3741
response = json.loads(response.text)
3842

3943
return response
@@ -96,15 +100,15 @@ def _get_pr_data(self, commit):
96100
def compare_results(self, pr_log, base_log):
97101
"""Compare warnings/remarks for PR head and base commits to determine whether warnings/remarks have increased."""
98102

99-
increases = {'warnings': [], 'remarks': []}
103+
increases = {'warnings': {}, 'remarks': {}}
100104

101105
for test in pr_log:
102106
# Check warnings
103107
if pr_log[test][0] > base_log[test][0]:
104-
increases['warnings'].append(test)
108+
increases['warnings'].update({test: pr_log[test][0] - base_log[test][0]})
105109
# Check remarks
106110
if pr_log[test][1] > base_log[test][1]:
107-
increases['remarks'].append(test)
111+
increases['remarks'].update({test: pr_log[test][1] - base_log[test][1]})
108112

109113
return increases
110114

@@ -118,7 +122,9 @@ def print_html_results(dict):
118122
for category in results.keys():
119123
if results[category]:
120124
mdFile.write(f"\n<h3>{machine.upper()}</h3>\n")
121-
unordered_list = [f"**{category.title()}:**", dict[machine][category]]
125+
unordered_list = [f"**{category.title()}:**", []]
126+
for test, value in dict[machine][category].items():
127+
unordered_list[1].append(f"{test}: {value}")
122128
mdFile.new_list(unordered_list, marked_with='*')
123129
return mdFile.get_md_text()
124130

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ set(CMEPS OFF CACHE BOOL "Enable CMEPS")
3939
set(CDEPS OFF CACHE BOOL "Enable CDEPS")
4040
set(NOAHMP OFF CACHE BOOL "Enable NOAHMP")
4141
set(FIRE_BEHAVIOR OFF CACHE BOOL "Enable Fire Behavior")
42+
set(WARN_AS_ERROR OFF CACHE BOOL "Enable compile option to treat warning as error")
4243

4344
# Configure selected application specific components
4445
message("")
@@ -59,6 +60,7 @@ message("CDEPS ............ ${CDEPS}")
5960
message("CMEPS ............ ${CMEPS}")
6061
message("NOAHMP ........... ${NOAHMP}")
6162
message("FIRE_BEHAVIOR .... ${FIRE_BEHAVIOR}")
63+
message("WARN_AS_ERROR .... ${WARN_AS_ERROR}")
6264

6365
###############################################################################
6466
### Build Options

MOM6-interface/MOM6

Submodule MOM6 updated 369 files

MOM6-interface/mom6_files.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ list(APPEND mom6_nuopc_src_files
336336
MOM6/config_src/drivers/nuopc_cap/mom_cap_time.F90
337337
MOM6/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90
338338
MOM6/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
339-
MOM6/config_src/drivers/nuopc_cap/mom_ufs_trace_wrapper.F90
339+
MOM6/config_src/drivers/nuopc_cap/mom_cap_profiling.F90
340340
MOM6/config_src/drivers/nuopc_cap/mom_inline_mod.F90
341341
MOM6/config_src/drivers/nuopc_cap/mom_cap_outputlog.F90
342342
MOM6/config_src/drivers/unit_tests/test_MOM_ANN.F90

cmake/GNU.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ else()
2323
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
2424
set(CMAKE_C_FLAGS_RELEASE "-O2")
2525
endif()
26+
27+
if(WARN_AS_ERROR)
28+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Werror")
29+
endif()

cmake/Intel.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ if(DISABLE_FMA)
5757
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
5858
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
5959
endif()
60+
61+
if(WARN_AS_ERROR)
62+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn errors")
63+
endif()

cmake/IntelLLVM.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@ if(DISABLE_FMA)
5858
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
5959
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
6060
endif()
61+
62+
if(WARN_AS_ERROR)
63+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn errors")
64+
endif()

cmake/IntelMixed.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ endif()
2020

2121
if(DEBUG)
2222
add_definitions(-DDEBUG)
23-
#set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays")
24-
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check all -check noarg_temp_created -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays")
23+
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check all -check noarg_temp_created -warn -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays")
2524
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv")
2625
else()
2726
if(FASTER)
@@ -57,3 +56,7 @@ if(DISABLE_FMA)
5756
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
5857
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
5958
endif()
59+
60+
if(WARN_AS_ERROR)
61+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn errors")
62+
endif()

tests/ci/Jenkinsfile.ort

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ stage('Run ORT on Ursa parallel'){
9494
'''
9595
} //steps
9696
} //stage
97-
stage('cpid_control_nowave_noaero_p8'){
97+
stage('cpld_control_nowave_noaero_p8'){
9898
agent{ label 'ursa'}
9999
options{
100100
timeout(time:6, unit:'HOURS')
@@ -304,7 +304,7 @@ stage('Run ORT on Ursa parallel'){
304304
} //steps
305305
} //stage
306306

307-
stage('cpid_control_nowave_noaero_p8'){
307+
stage('cpld_control_nowave_noaero_p8'){
308308
agent{ label 'hercules'}
309309
options{
310310
timeout(time:6, unit:'HOURS')
@@ -514,7 +514,7 @@ stage('Run ORT on Ursa parallel'){
514514
} //steps
515515
} //stage
516516

517-
stage('cpid_control_nowave_noaero_p8'){
517+
stage('cpld_control_nowave_noaero_p8'){
518518
agent{ label 'orion'}
519519
options{
520520
timeout(time:6, unit:'HOURS')

0 commit comments

Comments
 (0)