Skip to content

Commit

Permalink
update mpas test run length; move conditional endrun
Browse files Browse the repository at this point in the history
  • Loading branch information
peverwhee committed Nov 22, 2024
1 parent da6a2ff commit 6001820
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</test>

<!-- Derecho dycore tests -->
<test compset="FKESSLER" grid="mpasa480_mpasa480" name="SMS_Ln2" testmods="cam/outfrq_kessler_mpas_derecho">
<test compset="FKESSLER" grid="mpasa480_mpasa480" name="SMS_Ln9" testmods="cam/outfrq_kessler_mpas_derecho">
<machines>
<machine name="derecho" compiler="intel" category="aux_sima"/>
<machine name="derecho" compiler="gnu" category="aux_sima"/>
Expand Down
12 changes: 6 additions & 6 deletions src/data/write_init_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,12 +1341,6 @@ def write_phys_check_subroutine(outfile, host_dict, host_vars, host_imports,
outfile.write("deallocate(file)", 2)
outfile.write("nullify(file)", 2)

# Endrun if differences were found on this timestep
outfile.comment("Endrun if differences were found on this timestep and err_on_fail=TRUE", 2)
outfile.write("if (overall_diff_found .and. err_on_fail .and. masterproc) then", 2)
outfile.write("call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)", 3)
outfile.write("end if", 2)

# Check if no differences were found
outfile.write("if (is_first) then", 2)
outfile.write("if (masterproc) then", 3)
Expand All @@ -1363,6 +1357,12 @@ def write_phys_check_subroutine(outfile, host_dict, host_vars, host_imports,
outfile.write("write(iulog,*) ''", 3)
outfile.write("end if", 2)

# Endrun if differences were found on this timestep
outfile.comment("Endrun if differences were found on this timestep and err_on_fail=TRUE", 2)
outfile.write("if (overall_diff_found .and. err_on_fail .and. masterproc) then", 2)
outfile.write("call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)", 3)
outfile.write("end if", 2)

# End subroutine:
outfile.write("end subroutine physics_check_data", 1)

Expand Down
8 changes: 4 additions & 4 deletions test/unit/sample_files/write_init_files/physics_inputs_4D.F90
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -376,6 +372,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_4D
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -376,6 +372,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_bvd
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -377,6 +373,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_cnst
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -377,6 +373,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_ddt
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -377,6 +373,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_ddt2
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -377,6 +373,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_ddt_array
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -370,6 +366,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_host_var
8 changes: 4 additions & 4 deletions test/unit/sample_files/write_init_files/physics_inputs_mf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -379,6 +375,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_mf
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -376,6 +372,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_no_horiz
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -361,6 +357,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_noreq
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -383,6 +379,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_param
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -377,6 +373,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_protect
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -376,6 +372,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_scalar
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
call cam_pio_closefile(file)
deallocate(file)
nullify(file)
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
if (is_first) then
if (masterproc) then
write(iulog,*) ''
Expand All @@ -377,6 +373,10 @@ subroutine physics_check_data(file_name, suite_names, timestep, min_difference,
write(iulog,*) '********** End Physics Check Data Results **********'
write(iulog,*) ''
end if
! Endrun if differences were found on this timestep and err_on_fail=TRUE
if (overall_diff_found .and. err_on_fail .and. masterproc) then
call endrun('ERROR: Difference(s) found during ncdata check', file=__FILE__, line=__LINE__)
end if
end subroutine physics_check_data

end module physics_inputs_simple

0 comments on commit 6001820

Please sign in to comment.