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

Add debug (#70) #22

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions compsets/all.input
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ run cpld_fv3_ccpp_384_mom6_cice_ww3_1d_bmark_rt @ fv3, coupledapp, warm384, phys
#run cpld_fv3_ccpp_mom6_cice_1d_gfdlmprad_gwd @ fv3, coupledapp, warm, physics
#run cpld_fv3_ccpp_mom6_cice_1d_gfdlmprad_noahmp @ fv3, coupledapp, warm, physics

########################################################################
# Two debug tests
run cpld_fv3_ccpp_mom6_cice_cold_debug @ fv3, coupledapp, cold, physics
run cpld_fv3_ccpp_mom6_cice_6h_debug @ fv3, coupledapp, warm, physics

########################################################################
#Run the Benchmark-like inputs for a single date
#These can be run separately from the baseline test cases
Expand Down
195 changes: 195 additions & 0 deletions compsets/fv3mom6cice5_ccpp.input
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ build fv3_ccpp_mom6_cice_ww3_repro.exe {
OPTS="app=coupledFV3_CCPP_MOM6_CICE_WW3_repro",md5sum="@[md5sum]")
}

build fv3_ccpp_mom6_cice_debug.exe {
# Use NEMSAppBuilder to build a coupled app.
use plat
# Note:
# plat%EXECrt = temporary directory for executables and md5 sums
# plat%INCrt = temporary directory for modulefiles
target="@[plat%EXECrt]/fv3_ccpp_mom6_cice_debug.exe"
modules.nems="@[plat%INCrt]/modules_fv3_ccpp_mom6_cice_debug"
md5sum="@[target].md5"

# The NEMSAppBuilder is another embedded bash script in nemscommon.input
build=NEMSAppBuilder_debug(NEMS.x="@[target]",modules.nems="@[modules.nems]",
OPTS="app=coupledFV3_CCPP_MOM6_CICE_debug",md5sum="@[md5sum]")
}
########################################################################
#NOTE: DO NOT UPDATE the fv3_default variables for coupled fiels,
#update them within the tests themselves. The fv3_default variables
Expand Down Expand Up @@ -387,6 +401,187 @@ test cpld_fv3_ccpp_mom6_cice_1d_satmedmf: fv3_ccpp_mom6_cice.exe {
}
}
########################################################################
# cold c96 debug

test cpld_fv3_ccpp_mom6_cice_cold_debug: fv3_ccpp_mom6_cice_debug.exe {
use cpld_fv3_ccpp_mom6_cice_cold_atm_flux
TEST_DESCR="Fully coupled FV3-CCPP-MOM6-CICE system - debug"
CNTL_NAME="RT-Baselines_cold_debug_ccpp"
CNTL="@[plat%BASELINE]/@[CNTL_NAME]"
CNTLMED="@[plat%BASELINE]/MEDIATOR_debug_ccpp"

build=fv3_ccpp_mom6_cice_debug.exe

prep=fv3cpld_prep(
RUNDIR="@[RUNDIR]",modules="@[fv3_ccpp_mom6_cice_debug.exe%modules.nems]",
CNTL="@[CNTL]")

# Specify output files:
criteria output {
# WORKFILE .comparison. TARGET
'phyf001.tile1.nc' .bitcmp. "@[CNTL]"
'phyf001.tile2.nc' .bitcmp. "@[CNTL]"
'phyf001.tile3.nc' .bitcmp. "@[CNTL]"
'phyf001.tile4.nc' .bitcmp. "@[CNTL]"
'phyf001.tile5.nc' .bitcmp. "@[CNTL]"
'phyf001.tile6.nc' .bitcmp. "@[CNTL]"
'dynf001.tile1.nc' .bitcmp. "@[CNTL]"
'dynf001.tile2.nc' .bitcmp. "@[CNTL]"
'dynf001.tile3.nc' .bitcmp. "@[CNTL]"
'dynf001.tile4.nc' .bitcmp. "@[CNTL]"
'dynf001.tile5.nc' .bitcmp. "@[CNTL]"
'dynf001.tile6.nc' .bitcmp. "@[CNTL]"
'RESTART/coupler.res' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.tile1.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.tile2.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.tile3.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.tile4.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.tile5.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_core.res.tile6.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_srf_wnd.res.tile1.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_srf_wnd.res.tile2.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_srf_wnd.res.tile3.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_srf_wnd.res.tile4.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_srf_wnd.res.tile5.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_srf_wnd.res.tile6.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_tracer.res.tile1.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_tracer.res.tile2.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_tracer.res.tile3.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_tracer.res.tile4.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_tracer.res.tile5.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/fv_tracer.res.tile6.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/phy_data.tile1.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/phy_data.tile2.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/phy_data.tile3.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/phy_data.tile4.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/phy_data.tile5.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/phy_data.tile6.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/sfc_data.tile1.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/sfc_data.tile2.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/sfc_data.tile3.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/sfc_data.tile4.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/sfc_data.tile5.nc' .bitcmp. "@[CNTL]/RESTART/"
'RESTART/sfc_data.tile6.nc' .bitcmp. "@[CNTL]/RESTART/"
'mediator_FBAtm_a_restart.tile1.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBAtm_a_restart.tile2.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBAtm_a_restart.tile3.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBAtm_a_restart.tile4.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBAtm_a_restart.tile5.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBAtm_a_restart.tile6.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBAtmOcn_o_restart.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBIce_i_restart.nc' .bitcmp. "@[CNTLMED]/"
'mediator_FBOcn_o_restart.nc' .bitcmp. "@[CNTLMED]/"
'mediator_scalars_restart.txt' .bitcmp. "@[CNTLMED]/"
# Executable validation. This makes an MD5 sum of the fv3.exe
# for comparison against the MD5 sum made in the build job.
# This is to ensure the executable did not change during the
# test suite.
"@[build%target]" .md5cmp. "@[fv3_ccpp_mom6_cice_debug.exe%md5sum]"
}
}
########################################################################
# warm 6h c96 debug

test cpld_fv3_ccpp_mom6_cice_6h_debug: fv3_ccpp_mom6_cice_debug.exe {
use cpld_fv3_ccpp_mom6_cice_2d_atm_flux
DAYS='0.25' # run for 0.25 day
FHMAX='6'
NFHOUT_HF='1'
walltime=2400 # seconds
TEST_DESCR="Fully coupled FV3-CCPP-MOM6-CICE system - debug"
CNTL_NAME="RT-Baselines_6h_warm_debug_ccpp"
CNTL="@[plat%BASELINE]/@[CNTL_NAME]"

MED_restart_data="@[plat%BASELINE]/MEDIATOR_debug_ccpp"

build=fv3_ccpp_mom6_cice_debug.exe

prep=fv3cpld_prep(
RUNDIR="@[RUNDIR]",modules="@[fv3_ccpp_mom6_cice_debug.exe%modules.nems]",
CNTL="@[CNTL]")

# Specify output files:
criteria output {
# WORKFILE .comparison. TARGET
'phyf006.tile1.nc' .bitcmp. "@[CNTL]"
'phyf006.tile2.nc' .bitcmp. "@[CNTL]"
'phyf006.tile3.nc' .bitcmp. "@[CNTL]"
'phyf006.tile4.nc' .bitcmp. "@[CNTL]"
'phyf006.tile5.nc' .bitcmp. "@[CNTL]"
'phyf006.tile6.nc' .bitcmp. "@[CNTL]"
'dynf006.tile1.nc' .bitcmp. "@[CNTL]"
'dynf006.tile2.nc' .bitcmp. "@[CNTL]"
'dynf006.tile3.nc' .bitcmp. "@[CNTL]"
'dynf006.tile4.nc' .bitcmp. "@[CNTL]"
'dynf006.tile5.nc' .bitcmp. "@[CNTL]"
'dynf006.tile6.nc' .bitcmp. "@[CNTL]"
'RESTART/coupler.res' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_core.res.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_srf_wnd.res.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_srf_wnd.res.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_srf_wnd.res.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_srf_wnd.res.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_srf_wnd.res.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_srf_wnd.res.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_tracer.res.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_tracer.res.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_tracer.res.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_tracer.res.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_tracer.res.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/fv_tracer.res.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/phy_data.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/phy_data.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/phy_data.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/phy_data.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/phy_data.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/phy_data.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/sfc_data.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/sfc_data.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/sfc_data.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/sfc_data.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/sfc_data.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'RESTART/sfc_data.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'MOM6_RESTART/MOM.res.nc' .bitcmp. "@[CNTL]/RESTART"
'MOM6_RESTART/MOM.res_1.nc' .bitcmp. "@[CNTL]/RESTART"
'MOM6_RESTART/MOM.res_2.nc' .bitcmp. "@[CNTL]/RESTART"
'MOM6_RESTART/MOM.res_3.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtm_restart.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtm_restart.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtm_restart.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtm_restart.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtm_restart.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtm_restart.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumOcn_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumIce_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumLnd_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumHyd_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBaccumAtmOcn_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtm_a_restart.tile1.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtm_a_restart.tile2.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtm_a_restart.tile3.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtm_a_restart.tile4.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtm_a_restart.tile5.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtm_a_restart.tile6.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBIce_i_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBOcn_o_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBLnd_l_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBHyd_h_restart.nc' .bitcmp. "@[CNTL]/RESTART"
'mediator_FBAtmOcn_o_restart.nc' .bitcmp. "@[CNTL]/RESTART"
# Executable validation. This makes an MD5 sum of the fv3.exe
# for comparison against the MD5 sum made in the build job.
# This is to ensure the executable did not change during the
# test suite.
"@[build%target]" .md5cmp. "@[fv3_ccpp_mom6_cice_debug.exe%md5sum]"
}
}
########################################################################
# cold c384

test cpld_fv3_ccpp_384_mom6_cice_cold_atm_flux: fv3_ccpp_mom6_cice.exe {
Expand Down
19 changes: 19 additions & 0 deletions compsets/nemscommon.input
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,22 @@ embed bash NEMSAppBuilder(NEMS.x,modules.nems,OPTS,md5sum)
cp -fp conf/modules.nems "@[modules.nems]"
md5sum "@[NEMS.x]" > "@[md5sum]"
]]]
embed bash NEMSAppBuilder_debug(NEMS.x,modules.nems,OPTS,md5sum)
[[[
mkdir -p "@[plat%EXECrt]" "@[plat%INCrt]"
rm -f "@[NEMS.x]" "@[modules.nems]"
cd @[plat%HOMEnems]
export S2S_DEBUG_MODULE=true

# NOTE: Replace "rebuild" with "norebuild" to disable "gmake clean"
@[plat%execution_time_modules]
if ( which aprun ) && [[ @[plat%PLATFORM_NAME] == wcoss.cray ]] ; then
aprun -n 1 -j 1 -N 1 -d 24 bash -c "./NEMS/NEMSAppBuilder rebuild $OPTS"
else
./NEMS/NEMSAppBuilder rebuild $OPTS
fi
cd @[plat%SRCnems]
cp -fp ../exe/NEMS.x "@[NEMS.x]"
cp -fp conf/modules.nems "@[modules.nems]"
md5sum "@[NEMS.x]" > "@[md5sum]"
]]]
9 changes: 7 additions & 2 deletions conf/before_components.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@

# ----------------------------------------------------------------------
# Decide the conf and modulefile names.

CHOSEN_MODULE=$(BUILD_TARGET)/fv3_coupled
# S2S_DEBUG_MODULE is defined in GNUmakefile
ifeq ($(S2S_DEBUG_MODULE),false)
CHOSEN_MODULE=$(BUILD_TARGET)/fv3_coupled
else
CHOSEN_MODULE=$(BUILD_TARGET)/fv3_coupled_debug
endif
$(info CHOSEN_MODULE is $(CHOSEN_MODULE))

CONFIGURE_NEMS_FILE=configure.fv3_coupled.$(BUILD_TARGET)

Expand Down
Loading