<p><b>dwj07@fsu.edu</b> 2011-12-02 09:55:54 -0700 (Fri, 02 Dec 2011)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Editing the postprocess portion of the oceanTestCases.sh script.<br>
</p><hr noshade><pre><font color="gray">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-01 23:08:48 UTC (rev 1229)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh        2011-12-02 16:55:54 UTC (rev 1230)
@@ -19,8 +19,13 @@
echo "Building baroclinic channel meshes"
CUR_DIR=`pwd`
-PROCS="2 4 8 16 32 64 128 256 512 1024 2048 4096"
+if [ -z "$3" ]; then
+        PROCS="2 4 8 16 32 64 128 256 512 1024 2048 4096"
+else
+        PROCS="$3"
+fi
+
X_EXTENT="160000"
Y_EXTENT="500000"
Added: branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh         (rev 0)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh        2011-12-02 16:55:54 UTC (rev 1230)
@@ -0,0 +1,8 @@
+#!/bin/bash
+#PBS -N run_name
+#PBS -q regular
+#PBS -l walltime=20:00
+#PBS -l mppwidth=num_procs
+cd working_dir
+
+aprun -n num_procs ocean_model_executable
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-01 23:08:48 UTC (rev 1229)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh        2011-12-02 16:55:54 UTC (rev 1230)
@@ -20,8 +20,13 @@
echo "Building lock exchange meshes"
CUR_DIR=`pwd`
-PROCS="2 4 8 16 32 64 128 256 512 1024 2048 4096"
+if [ -z "$3" ]; then
+        PROCS="2 4 8 16 32 64 128 256 512 1024 2048 4096"
+else
+        PROCS="$3"
+fi
+
Y_EXTENT="64000"
#################################################
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2011-12-01 23:08:48 UTC (rev 1229)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2011-12-02 16:55:54 UTC (rev 1230)
@@ -1,12 +1,17 @@
#!/bin/bash
+#################################################
+## Change these variables to customize the run ##
+#################################################
+
REPOSITORY_ADDRESS="https://svn-mpas-model.cgd.ucar.edu/trunk/mpas"
COMPILE_SET="ifort-serial"
MACHINE_NAME="lobo"
MACHINE_PPN="16"
SUBMISSION_CMD=msub
+PROC_LIST="2 4 8 16 32 64 128 256 512 1024 2048 4096"
+PROC_LIST="2 4"
-
########################
## Script starts here ##
########################
@@ -88,7 +93,7 @@
                cp Makefile.front lock_exchange/basin_src/.
                cp Makefile.front lock_exchange/periodic_hex/.
                cd lock_exchange
-                ./makeMeshes.sh ${CUR_DIR}/mpas/src/ocean_model.exe ${CUR_DIR}/run_info
+                ./makeMeshes.sh ${CUR_DIR}/mpas/src/ocean_model.exe ${CUR_DIR}/run_info "$PROC_LIST"
                cd ${CUR_DIR}
                cat lock_exchange/run_paths >> run_paths
@@ -97,7 +102,7 @@
                cp Makefile.front baroclinic_channel/basin_src/.
                cp Makefile.front baroclinic_channel/periodic_hex/.
                cd baroclinic_channel
-                ./makeMeshes.sh ${CUR_DIR}/mpas/src/ocean_model.exe ${CUR_DIR}/run_info
+                ./makeMeshes.sh ${CUR_DIR}/mpas/src/ocean_model.exe ${CUR_DIR}/run_info "$PROC_LIST"
                cd ${CUR_DIR}
                cat baroclinic_channel/run_paths >> run_paths
@@ -186,8 +191,113 @@
        fi
elif [ $ACTION == "postprocess" ]; then
-        echo "POSTPROCESS"
+        if [ $CASE == "lock_exchange" ]; then
+                rm -f timing_results_lock_exchange.txt timing_results2_lock_exchange.txt
+                rm -f timing_results3_lock_exchange.txt
+                echo "procs = [ " > timing_results3_front
+                echo "WCtime = [ ..." > timing_results3_back
+
+                RUNS=`cat lock_exchange/run_paths`
+
+                for RUN in $RUNS
+                do
+                        NAME=`echo ${RUN%/*procs}`
+                        NAME=`echo ${NAME##*/}`
+                        SPACING=`echo ${NAME%m*}`
+                        PROCS=`echo ${RUN##*/}`
+                        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}'`
+                        DURATION=`grep "config_run_duration" ${RUN}/namelist.input`
+
+                        KM=`expr match "$SPACING" 'k'`
+                        echo "SPACING = $SPACING"
+                        echo "KM = $KM"
+
+                        if [ $KM == 0 ]; then
+                                KM=`echo "scale=4; ${SPACING} / 1000" | bc`
+                        else
+                                KM=`echo ${SPACING%k}`
+                        fi
+                        echo "KM = $KM"
+
+                        echo "${NAME}_${PROCS}procs" >> first
+                        echo "${DURATION}" >> second
+                        echo "Final KE: ${KE}" >> third
+                        echo "Total time: ${TIME}" >> fourth
+
+                        echo "${KM}" ${PROCS} ${TIME} >> timing_results2_lock_exchange.txt
+                        echo `cat time_tmp` " ${TIME}" > time_tmp
+
+                        echo "${PROC} " >> timing_results3_front
+                        echo " ${TIME} ; ... % ${NAME}" >> timing_results3_back
+                done
+
+                echo " ]'/86400.;" >> timing_results3_back
+
+                paste first second third fourth > timing_results_lock_exchange.txt
+
+                cat timing_results3_front > timing_results3_lock_exchange.txt
+                cat timing_results3_back >> timing_results3_lock_exchange.txt
+
+                rm first second third fourth timing_results3_front timing_results3_back
+                rm time_tmp
+        elif [ $CASE == "baroclinic_channel" ]; then
+                rm -f timing_results_baroclinic_channel.txt timing_results2_baroclinic_channel.txt
+                rm -f timing_results3_baroclinic_channel.txt
+
+                echo "procs = [ " > timing_results3_front
+                echo "WCtime = [ ..." > timing_results3_back
+
+                RUNS=`cat baroclinic_channel/run_paths`
+
+                for RUN in $RUNS
+                do
+                        NAME=`echo ${RUN%/*procs}`
+                        NAME=`echo ${NAME##*/}`
+                        SPACING=`echo ${NAME%m*}`
+                        PROCS=`echo ${RUN##*/}`
+                        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}'`
+                        DURATION=`grep "config_run_duration" ${RUN}/namelist.input`
+
+                        KM=`expr match "$SPACING" 'k'`
+                        echo "SPACING = $SPACING"
+                        echo "KM = $KM"
+
+                        if [ $KM == 0 ]; then
+                                KM=`echo "scale=4; ${SPACING} / 1000" | bc`
+                        else
+                                KM=`echo ${SPACING%k}`
+                        fi
+                        echo "KM = $KM"
+
+                        echo "${NAME}_${PROCS}procs" >> first
+                        echo "${DURATION}" >> second
+                        echo "Final KE: ${KE}" >> third
+                        echo "Total time: ${TIME}" >> fourth
+
+                        echo "${KM}" ${PROCS} ${TIME} >> timing_results2_baroclinic_channel.txt
+                        echo `cat time_tmp` " ${TIME}" > time_tmp
+
+                        echo "${PROC} " >> timing_results3_front
+                        echo " ${TIME} ; ... % ${NAME}" >> timing_results3_back
+                done
+
+                echo " ]'/86400.;" >> timing_results3_back
+
+                paste first second third fourth > timing_results_baroclinic_channel.txt
+
+                cat timing_results3_front > timing_results3_baroclinic_channel.txt
+                cat timing_results3_back >> timing_results3_baroclinic_channel.txt
+
+                rm first second third fourth timing_results3_front timing_results3_back
+                rm time_tmp
+        fi
elif [ $ACTION == "clean" ]; then
        rm -f run_paths job_ids
@@ -201,10 +311,15 @@
                cd ${CUR_DIR}
                rm -f *lock_exchange.sh
+                rm -f timing_results*_lock_exchange.txt
        elif [ $CASE == "baroclinic_channel" ]; then
                cd baroclinic_channel
                rm -rf *m_*levs submits
                rm -f run_paths
                cd ${CUR_DIR}
+
+                rm -f *baroclinic_channel.sh
+                rm -f timing_results*_baroclinic_channel.txt
        fi
fi
+
</font>
</pre>