<p><b>dwj07@fsu.edu</b> 2011-12-02 12:34:40 -0700 (Fri, 02 Dec 2011)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Fixing postprocess portion of the driver script.<br>
<br>
        Also, making test cases print stats.<br>
<br>
        Updating template submit scripts with output and error names.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/MPAS-namelist.input.template
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/MPAS-namelist.input.template        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/MPAS-namelist.input.template        2011-12-02 19:34:40 UTC (rev 1232)
@@ -5,7 +5,7 @@
config_dt = *TIME_STEP
config_start_time = '0000-01-01_00:00:00'
config_run_duration = '0200_00:00:00'
- config_stats_interval = 1920
+ config_stats_interval = *STATS
/
&io
config_input_name = 'grid.nc'
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh        2011-12-02 19:34:40 UTC (rev 1232)
@@ -15,6 +15,7 @@
REF_VISC_H="1.0"
REF_VISC_V="1.0"
REF_SPACING="10000.0"
+TOTAL_TIME="17280000" # in seconds
echo "Building baroclinic channel meshes"
@@ -122,6 +123,7 @@
                TIME_STEP=`echo "scale=4; $D_SPACING * $REF_TIME_STEP" | bc`
                VISC_H=`echo "scale=4; ($D_SPACING^4)*${REF_VISC_H}" | bc`
                VISC_V=`echo ${REF_VISC_V}`
+                STATS=`echo " $TOTAL_TIME / $TIME_STEP / 10 " | bc`
                echo " Converting ${NAME} mesh to have ${VERTLEV} levels"
                ln -s baroclinic_channel_${NAME}.grid.nc grid.nc
@@ -160,7 +162,9 @@
                mv baroclinic_channel_${NAME}_${VERTLEV}levs* ${NAME}_${VERTLEV}levs/.
                ## Generate new namelist.input file for test case
-                cat MPAS-namelist.input.template | sed "s/*VISC_H/${VISC_H}/g" | sed "s/*VISC_V/${VISC_V}/g" | sed "s/*TIME_STEP/${TIME_STEP}/g" > ${NAME}_${VERTLEV}levs/namelist.input
+                cat MPAS-namelist.input.template | sed "s/*VISC_H/${VISC_H}/g" \
+                        | sed "s/*VISC_V/${VISC_V}/g" | sed "s/*TIME_STEP/${TIME_STEP}/g" \
+                        | sed "s/*STATS/${STATS}/g" > ${NAME}_${VERTLEV}levs/namelist.input
        done
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh        2011-12-02 19:34:40 UTC (rev 1232)
@@ -3,6 +3,8 @@
#PBS -q regular
#PBS -l walltime=20:00
#PBS -l mppwidth=num_procs
+#PBD -o run_name.num_procs.out
+#PBD -e run_name.num_procs.err
cd working_dir
aprun -n num_procs ocean_model_executable
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/lobo_submit_template.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/lobo_submit_template.sh        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lobo_submit_template.sh        2011-12-02 19:34:40 UTC (rev 1232)
@@ -1,7 +1,9 @@
-#! /bin/bassh
+#! /bin/bash
#MSUB -N run_name
#MSUB -l walltime=20:00
#MSUB -l nodes=num_nodes:ppn=procs_per_node
#MSUB -d working_dir
+#MSUB -o run_name.num_procs.out
+#MSUB -e run_name.num_procs.err
mpirun -np num_procs ./ocean_model.exe
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/MPAS-namelist.input.template
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/MPAS-namelist.input.template        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/MPAS-namelist.input.template        2011-12-02 19:34:40 UTC (rev 1232)
@@ -5,7 +5,7 @@
config_dt = *TIME_STEP
config_start_time = '0000-01-01_00:00:00'
config_run_duration = '0000_17:00:00'
- config_stats_interval = 1920
+ config_stats_interval = 1
/
&io
config_input_name = 'grid.nc'
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh        2011-12-02 19:34:40 UTC (rev 1232)
@@ -16,6 +16,7 @@
REF_VISC_H="10.0"
REF_VISC_V="0.1"
REF_SPACING="500.0"
+TOTAL_TIME="1468800" # in seconds
echo "Building lock exchange meshes"
@@ -120,6 +121,7 @@
                TIME_STEP=`echo "scale=4; $D_SPACING * $REF_TIME_STEP" | bc`
                VISC_H=`echo "scale=4; ($D_SPACING^4)*${REF_VISC_H}" | bc`
                VISC_V=`echo ${REF_VISC_V}`
+                STATS=`echo " $TOTAL_TIME / $TIME_STEP / 10 " | bc`
                echo " Converting ${NAME} mesh to have ${VERTLEV} levels"
@@ -159,7 +161,9 @@
                mv lock_exchange_${NAME}_${VERTLEV}levs* ${NAME}_${VERTLEV}levs/.
                ## Generate new namelist.input file for test case
-                cat MPAS-namelist.input.template | sed "s/*VISC_H/${VISC_H}/g" | sed "s/*VISC_V/${VISC_V}/g" | sed "s/*TIME_STEP/${TIME_STEP}/g" > ${NAME}_${VERTLEV}levs/namelist.input
+                cat MPAS-namelist.input.template | sed "s/*VISC_H/${VISC_H}/g" \
+                        | sed "s/*VISC_V/${VISC_V}/g" | sed "s/*TIME_STEP/${TIME_STEP}/g" \
+                        | sed "s/*STATS/${STATS}/g" > ${NAME}_${VERTLEV}levs/namelist.input
        done
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2011-12-02 18:47:02 UTC (rev 1231)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2011-12-02 19:34:40 UTC (rev 1232)
@@ -55,6 +55,7 @@
} #}}}
setup () { #{{{
+        echo "Setting up ${CASE} test case"
        if [ -e ${CASE}/basin_src ]; then
                cp .Makefile.front ${CASE}/basin_src/Makefile.front
        fi
@@ -72,6 +73,7 @@
} #}}}
submit () { #{{{
+        echo "Submitting ${CASE} test case runs"
        RUNS=`cat $CASE/run_paths`
        rm -f job_ids_$CASE cancel_jobs_$CASE.sh
        rm -f start_times_$CASE.sh
@@ -101,16 +103,18 @@
                echo $JOB_ID >> job_ids_${CASE}
                echo 'echo "' "$JOB_ID" '" `showstart ' "$JOB_ID | head -n 3 | tail -n 1 | awk '{print" '$6' " }'" '`' >> start_times_${CASE}.sh
-                echo "canceljob $JOB_ID > /dev/null" >> cancel_jobs_${CASE}.sh
+                echo "canceljob $JOB_ID > /dev/null &> /dev/null" >> cancel_jobs_${CASE}.sh
        done
        echo 'echo "All jobs canceled"' >> cancel_jobs_${CASE}.sh
+        echo "rm -f cancel_jobs_${CASE}.sh start_times_${CASE}.sh job_ids_${CASE}" >> cancel_jobs_${CASE}.sh
        chmod +x cancel_jobs_${CASE}.sh
        chmod +x start_times_${CASE}.sh
} #}}}
postprocess () { #{{{
+        echo "Processing ${CASE} test case data"
        rm -f timing_results_${CASE}.txt timing_results2_${CASE}.txt
        rm -f timing_results3_${CASE}.txt
@@ -128,7 +132,7 @@
                PROCS=`echo ${PROCS%%procs}`
                KE=`cat ${RUN}/stats_max.txt | tail -n 1 | awk '{print $7}'`
-                TIME=`grep "total time" ${RUN}/log.0000.out | awk '{print $4}'`
+                TIME=`grep "total time" ${RUN}/${CASE}_${NAME}.${PROCS}.out | awk '{print $4}' | head -n 1`
                DURATION=`grep "config_run_duration" ${RUN}/namelist.input`
                KM=`expr match "$SPACING" 'k'`
@@ -163,11 +167,13 @@
} #}}}
clean_mpas () { #{{{
+        echo "Cleaning MPAS"
        rm -rf mpas
        rm -f .run_info .Makefile.front
} #}}}
clean () { #{{{
+        echo "Cleaning ${CASE} test case"
        cd ${CASE}
        rm -rf *m_*levs submits
        rm -f run_paths
</font>
</pre>