From fc94f000eb255c13aa21716fbf87b81187ab7c4d Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 11 Jan 2016 12:06:18 -0800 Subject: [PATCH 1/2] Porting of master (120) to lawrencium LR2 partition. Minor bug fix in EDInitMod.F90. Configuration and machine files were added to lawrencium-lr2. Some extra changes were required beyond what had been established with ACME, as cime-gptl build were having trouble identifying if the sys/time.h library was available to provide machine time. It was also having trouble printing errors correctly, this was enabled by passing c-compiler directives in config_compilers.xml. The bug fix in EDInitMod.F90 placed a filter on the initd values read in from the pft parameter file, thus preventing the model from trying to initialize cohorts from pfts with zero initial density (this prevents div0's). Test suite: aux_clm45 Test baseline: none Test namelist changes: none Test status: [bit for bit, roundoff, climate changing] DONE SMS_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 46 seconds --- DONE ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality ---: /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest : test functionality summary (ERS_test) PASS ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 59 seconds --- DONE SMS_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 34 seconds --- RUN ERS_D_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest.160110-203643 DONE SMS_D_Mmpi-serial_Ld5.5x5_amazon.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_D_Mmpi-serial_Ld5.5x5_amazon.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_D_Mmpi-serial_Ld5.5x5_amazon.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 47 seconds --- Fixes: Addresses teamwork task: "Develop consolidated codebase from which to start": https://ngeetropics.teamwork.com/tasks/5048570 User interface changes?: machine files are intended to be buffered from the user. Code review: self --- cime/machines/config_batch.xml | 9 +++ cime/machines/config_compilers.xml | 6 ++ cime/machines/config_machines.xml | 66 +++++++++++++++++++ .../machines/env_mach_specific.lawrencium-lr2 | 37 +++++++++++ components/clm/cimetest/testlist_clm.xml | 5 ++ .../ED/biogeochem/EDGrowthFunctionsMod.F90 | 2 +- components/clm/src/ED/main/EDInitMod.F90 | 4 ++ components/clm/src/ED/main/EDTypesMod.F90 | 2 +- 8 files changed, 129 insertions(+), 2 deletions(-) create mode 100755 cime/machines/env_mach_specific.lawrencium-lr2 diff --git a/cime/machines/config_batch.xml b/cime/machines/config_batch.xml index c4dd376141..c55601b711 100644 --- a/cime/machines/config_batch.xml +++ b/cime/machines/config_batch.xml @@ -94,6 +94,15 @@ + + + --partition=lr2 + --account={{ project }} + --exclusive + + + + diff --git a/cime/machines/config_compilers.xml b/cime/machines/config_compilers.xml index 95d6f4b1f8..5b1c02377f 100644 --- a/cime/machines/config_compilers.xml +++ b/cime/machines/config_compilers.xml @@ -475,6 +475,12 @@ for mct, etc. -DHAVE_PAPI + + -lnetcdff -lnetcdf -mkl + -DHAVE_VPRINTF -DHAVE_GETTIMEOFDAY + + + /glade/apps/opt/lib netcdf diff --git a/cime/machines/config_machines.xml b/cime/machines/config_machines.xml index f204333824..8e8796325b 100644 --- a/cime/machines/config_machines.xml +++ b/cime/machines/config_machines.xml @@ -305,6 +305,72 @@ + + Lawrencium LR2 cluster at LBL, OS is Linux (intel), batch system is SLURM + LINUX + intel + openmpi,mpi-serial + /global/scratch/$ENV{USER} + $CESMSCRATCHROOT/$CASE/run + $CESMSCRATCHROOT/$CASE/bld + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CESMSCRATCHROOT/archive/$CASE + csm/$CASE + $CESMSCRATCHROOT/cesm_baselines + /$CESMSCRATCHROOT/tools/cprnc/cprnc + squeue + + sbatch + jnjohnson at lbl dot gov and rgknox at same + 12 + 12 + TRUE + + + lr_normal + + + 00:59:00 + + + + mpirun + + -np {{ num_tasks }} + -npernode {{ tasks_per_node }} + + + + mpirun + + -np {{ num_tasks }} + -npernode {{ tasks_per_node }} + + + + + + + NERSC XC30, os is CNL, 24 pes/node, batch system is PBS intel,gnu,cray diff --git a/cime/machines/env_mach_specific.lawrencium-lr2 b/cime/machines/env_mach_specific.lawrencium-lr2 new file mode 100755 index 0000000000..3de47efa2d --- /dev/null +++ b/cime/machines/env_mach_specific.lawrencium-lr2 @@ -0,0 +1,37 @@ +#! /bin/csh -f + +set CESM_REPO = `./xmlquery CCSM_REPOTAG -value` +if($status == 0) then + set COMPILER = `./xmlquery COMPILER -value` + set MPILIB = `./xmlquery MPILIB -value` + set DEBUG = `./xmlquery DEBUG -value` + set OS = `./xmlquery OS -value` + set PROFILE_PAPI_ENABLE = `./xmlquery PROFILE_PAPI_ENABLE -value` + set PROJECT = `./xmlquery PROJECT -value` +else + echo $0 using settings from environment: +endif +echo "COMPILER=$COMPILER" +echo "MPILIB=$MPILIB" +echo "DEBUG=$DEBUG" +echo "OS=$OS" +echo "PROJECT=$PROJECT" + +source /etc/profile.d/modules.csh +module purge +module load cmake +module load perl xml-libxml switch + +if ( $COMPILER == "intel" ) then + module load intel/2015.0.090 + module load openmpi + module load netcdf/4.3.2-intel-p + module load mkl +endif + +setenv NETCDF_PATH $NETCDF_DIR +#------------------------------------------------------------------------------- + +limit coredumpsize 1000000 +limit stacksize unlimited + diff --git a/components/clm/cimetest/testlist_clm.xml b/components/clm/cimetest/testlist_clm.xml index 2b753cea9d..3c32988d00 100644 --- a/components/clm/cimetest/testlist_clm.xml +++ b/components/clm/cimetest/testlist_clm.xml @@ -705,6 +705,7 @@ ed yellowstone yellowstone + lawrencium-lr2 @@ -715,6 +716,7 @@ ed hobart yellowstone + lawrencium-lr2 @@ -733,16 +735,19 @@ ed yellowstone yellowstone + lawrencium-lr2 ed + lawrencium-lr2 ed yellowstone yellowstone + lawrencium-lr2 diff --git a/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 b/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 index a497df202a..27ed64cdd0 100755 --- a/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 +++ b/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 @@ -140,7 +140,7 @@ real(r8) function tree_lai( cohort_in ) if( cohort_in%status_coh == 2 ) then ! are the leaves on? slat = 1000.0_r8 * pftcon%slatop(cohort_in%pft) ! m2/g to m2/kg - cohort_in%c_area = c_area(cohort_in) ! call the tree area + cohort_in%c_area = c_area(cohort_in) ! call the tree area leafc_per_unitarea = cohort_in%bl/(cohort_in%c_area/cohort_in%n) !KgC/m2 if(leafc_per_unitarea > 0.0_r8)then tree_lai = leafc_per_unitarea * slat !kg/m2 * m2/kg = unitless LAI diff --git a/components/clm/src/ED/main/EDInitMod.F90 b/components/clm/src/ED/main/EDInitMod.F90 index 3390053c3f..8e6201ba38 100755 --- a/components/clm/src/ED/main/EDInitMod.F90 +++ b/components/clm/src/ED/main/EDInitMod.F90 @@ -335,6 +335,8 @@ subroutine init_cohorts( patch_in ) do pft = 1,numpft_ed !FIX(RF,032414) - turning off veg dynamics + if(EDecophyscon%initd(pft)>1.0E-7) then + allocate(temp_cohort) ! temporary cohort temp_cohort%pft = pft @@ -378,6 +380,8 @@ subroutine init_cohorts( patch_in ) deallocate(temp_cohort) ! get rid of temporary cohort + endif + enddo !numpft call fuse_cohorts(patch_in) diff --git a/components/clm/src/ED/main/EDTypesMod.F90 b/components/clm/src/ED/main/EDTypesMod.F90 index 1362b0480a..c609a763da 100755 --- a/components/clm/src/ED/main/EDTypesMod.F90 +++ b/components/clm/src/ED/main/EDTypesMod.F90 @@ -34,7 +34,7 @@ module EDTypesMod integer , parameter :: SENES = 10 ! Window of time over which we track temp for cold sensecence (days) real(r8), parameter :: DINC_ED = 1.0_r8 ! size of LAI bins. integer , parameter :: N_DIST_TYPES = 2 ! number of disturbance types (mortality, fire) - integer , parameter :: numpft_ed = 2 ! number of PFTs used in ED. + integer , parameter :: numpft_ed = 10 ! number of PFTs used in ED. ! SPITFIRE integer , parameter :: NLSC = 5 ! number carbon compartments in above ground litter array From 4116012a71229bf7a51c6a90c82ef06dd4576008 Mon Sep 17 00:00:00 2001 From: rgknox Date: Tue, 12 Jan 2016 15:37:12 -0800 Subject: [PATCH 2/2] Updates and fixes, porting to Lawrencium LR2 This commit addresses pull request comments by bandre. lawrencium-lr2 references were removed from the testlist, and a cleanxml call was executed to ensure whitespaces were removed. Test suite: ed Test baseline: none Test namelist changes: none Test status: smoke tests appear to be successfull across the board ERS and ERI's are not expected to pass until S Muszala's fixes are applied in later subbmissions. Fixes: See teamwork issue: https://ngeetropics.teamwork.com/tasks/5048570 User interface changes?: changes were applied to the lawrencium relevant machine files Code review: rgknox (self), bandre-ucar Test Generation (non-baseline test): ./create_test \ -xml_category ed \ -xml_compiler ed \ -xml_mach ed \ -mach lawrencium-lr2 \ -compiler intel \ -testroot ${TESTROOT} \ -nobuild off \ -autosubmit on Test Results: DONE ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality ---: /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest : test functionality summary (ERS_test) PASS ERS_D_Mmpi-serial_Ld5.1x1_brazil.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 56 seconds --- DONE SMS_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_Ld5.f19_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 47 seconds --- RUN ERS_D_Ld5.f45_g37.ICLM45ED.lawrencium-lr2_intel.clm-edTest.160112-135757 DONE SMS_D_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_D_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_D_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 75 seconds --- DONE SMS_D_Mmpi-serial_Ld5.5x5_amazon.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_D_Mmpi-serial_Ld5.5x5_amazon.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_D_Mmpi-serial_Ld5.5x5_amazon.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 46 seconds --- DONE SMS_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest : (test finished, successful coupler log) --- Test Functionality: --- PASS SMS_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest : successful coupler log PASS SMS_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest.memleak --- Test time is 44 seconds --- RUN ERS_D_Ld5.f09_g16.ICLM45ED.lawrencium-lr2_intel.clm-edTest.160112-135757 RUN ERS_D_Ld5.f10_f10.ICLM45ED.lawrencium-lr2_intel.clm-edTest.160112-135757 DONE ERI_D_Ld9.f09_g16.ICLM45BGC.lawrencium-lr2_intel.clm-default : (test finished, successful coupler log) --- Test Functionality ---: /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERI_D_Ld9.f09_g16.ICLM45BGC.lawrencium-lr2_intel.clm-default.clm2.h0.nc : test compare clm2.h0 (.base and .hybrid files) /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERI_D_Ld9.f09_g16.ICLM45BGC.lawrencium-lr2_intel.clm-default.clm2.h1.nc : test compare clm2.h1 (.base and .hybrid files) /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERI_D_Ld9.f09_g16.ICLM45BGC.lawrencium-lr2_intel.clm-default.cpl.hi.nc : test compare cpl.hi (.base and .hybrid files) FAIL ERI_D_Ld9.f09_g16.ICLM45BGC.lawrencium-lr2_intel.clm-default : test functionality summary (hybrid test .base and .hybrid files) /global/home/users/rgknox/Models/ed-clm-lcport2/cime/scripts/Tools/component_compare.sh: line 318: //global/scratch/rgknox/tools/cprnc/cprnc: No such file or directory FAIL ERI_D_Ld9.f09_g16.ICLM45BGC.lawre --- cime/machines/config_machines.xml | 4 ++-- components/clm/cimetest/testlist_clm.xml | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cime/machines/config_machines.xml b/cime/machines/config_machines.xml index 8e8796325b..c0549b4808 100644 --- a/cime/machines/config_machines.xml +++ b/cime/machines/config_machines.xml @@ -315,10 +315,10 @@ $CESMSCRATCHROOT/$CASE/bld /global/scratch/$ENV{USER}/cesm_input_datasets/ /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 - $CESMSCRATCHROOT/archive/$CASE + $CESMSCRATCHROOT/cesm_archive/$CASE csm/$CASE $CESMSCRATCHROOT/cesm_baselines - /$CESMSCRATCHROOT/tools/cprnc/cprnc + /$CESMSCRATCHROOT/cesm_tools/cprnc/cprnc squeue sbatch diff --git a/components/clm/cimetest/testlist_clm.xml b/components/clm/cimetest/testlist_clm.xml index 3c32988d00..2b753cea9d 100644 --- a/components/clm/cimetest/testlist_clm.xml +++ b/components/clm/cimetest/testlist_clm.xml @@ -705,7 +705,6 @@ ed yellowstone yellowstone - lawrencium-lr2 @@ -716,7 +715,6 @@ ed hobart yellowstone - lawrencium-lr2 @@ -735,19 +733,16 @@ ed yellowstone yellowstone - lawrencium-lr2 ed - lawrencium-lr2 ed yellowstone yellowstone - lawrencium-lr2