<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 &quot;Building baroclinic channel meshes&quot;
 
 CUR_DIR=`pwd`
-PROCS=&quot;2 4 8 16 32 64 128 256 512 1024 2048 4096&quot;
 
+if [ -z &quot;$3&quot; ]; then
+        PROCS=&quot;2 4 8 16 32 64 128 256 512 1024 2048 4096&quot;
+else
+        PROCS=&quot;$3&quot;
+fi
+
 X_EXTENT=&quot;160000&quot;
 Y_EXTENT=&quot;500000&quot;
 

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 &quot;Building lock exchange meshes&quot;
 
 CUR_DIR=`pwd`
-PROCS=&quot;2 4 8 16 32 64 128 256 512 1024 2048 4096&quot;
 
+if [ -z &quot;$3&quot; ]; then
+        PROCS=&quot;2 4 8 16 32 64 128 256 512 1024 2048 4096&quot;
+else
+        PROCS=&quot;$3&quot;
+fi
+
 Y_EXTENT=&quot;64000&quot;
 
 #################################################

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=&quot;https://svn-mpas-model.cgd.ucar.edu/trunk/mpas&quot;
 COMPILE_SET=&quot;ifort-serial&quot;
 MACHINE_NAME=&quot;lobo&quot;
 MACHINE_PPN=&quot;16&quot;
 SUBMISSION_CMD=msub
+PROC_LIST=&quot;2 4 8 16 32 64 128 256 512 1024 2048 4096&quot;
+PROC_LIST=&quot;2 4&quot;
 
-
 ########################
 ## 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 &quot;$PROC_LIST&quot;
                 cd ${CUR_DIR}
 
                 cat lock_exchange/run_paths &gt;&gt; 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 &quot;$PROC_LIST&quot;
                 cd ${CUR_DIR}
 
                 cat baroclinic_channel/run_paths &gt;&gt; run_paths
@@ -186,8 +191,113 @@
         fi
 
 elif [ $ACTION == &quot;postprocess&quot; ]; then
-        echo &quot;POSTPROCESS&quot;
+        if [ $CASE == &quot;lock_exchange&quot; ]; then
+                rm -f timing_results_lock_exchange.txt timing_results2_lock_exchange.txt 
+                rm -f timing_results3_lock_exchange.txt
 
+                echo &quot;procs = [ &quot; &gt; timing_results3_front
+                echo &quot;WCtime = [ ...&quot; &gt; 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 &quot;total time&quot; ${RUN}/log.0000.out | awk '{print $4}'`
+                        DURATION=`grep &quot;config_run_duration&quot; ${RUN}/namelist.input`
+
+                        KM=`expr match &quot;$SPACING&quot; 'k'`
+                        echo &quot;SPACING = $SPACING&quot;
+                        echo &quot;KM = $KM&quot;
+
+                        if [ $KM == 0 ]; then
+                                KM=`echo &quot;scale=4; ${SPACING} / 1000&quot; | bc`
+                        else
+                                KM=`echo ${SPACING%k}`
+                        fi
+                        echo &quot;KM = $KM&quot;
+
+                        echo &quot;${NAME}_${PROCS}procs&quot; &gt;&gt; first
+                        echo &quot;${DURATION}&quot; &gt;&gt; second
+                        echo &quot;Final KE: ${KE}&quot; &gt;&gt; third
+                        echo &quot;Total time: ${TIME}&quot; &gt;&gt; fourth
+
+                        echo &quot;${KM}&quot; ${PROCS} ${TIME} &gt;&gt; timing_results2_lock_exchange.txt
+                        echo `cat time_tmp` &quot;  ${TIME}&quot; &gt; time_tmp
+
+                        echo &quot;${PROC}  &quot; &gt;&gt; timing_results3_front
+                        echo &quot; ${TIME} ; ... % ${NAME}&quot; &gt;&gt; timing_results3_back
+                done
+
+                echo &quot;     ]'/86400.;&quot; &gt;&gt; timing_results3_back
+
+                paste first second third fourth &gt; timing_results_lock_exchange.txt
+
+                cat timing_results3_front &gt; timing_results3_lock_exchange.txt
+                cat timing_results3_back &gt;&gt; timing_results3_lock_exchange.txt
+
+                rm first second third fourth timing_results3_front timing_results3_back
+                rm time_tmp
+        elif [ $CASE == &quot;baroclinic_channel&quot; ]; then
+                rm -f timing_results_baroclinic_channel.txt timing_results2_baroclinic_channel.txt 
+                rm -f timing_results3_baroclinic_channel.txt
+
+                echo &quot;procs = [ &quot; &gt; timing_results3_front
+                echo &quot;WCtime = [ ...&quot; &gt; 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 &quot;total time&quot; ${RUN}/log.0000.out | awk '{print $4}'`
+                        DURATION=`grep &quot;config_run_duration&quot; ${RUN}/namelist.input`
+
+                        KM=`expr match &quot;$SPACING&quot; 'k'`
+                        echo &quot;SPACING = $SPACING&quot;
+                        echo &quot;KM = $KM&quot;
+
+                        if [ $KM == 0 ]; then
+                                KM=`echo &quot;scale=4; ${SPACING} / 1000&quot; | bc`
+                        else
+                                KM=`echo ${SPACING%k}`
+                        fi
+                        echo &quot;KM = $KM&quot;
+
+                        echo &quot;${NAME}_${PROCS}procs&quot; &gt;&gt; first
+                        echo &quot;${DURATION}&quot; &gt;&gt; second
+                        echo &quot;Final KE: ${KE}&quot; &gt;&gt; third
+                        echo &quot;Total time: ${TIME}&quot; &gt;&gt; fourth
+
+                        echo &quot;${KM}&quot; ${PROCS} ${TIME} &gt;&gt; timing_results2_baroclinic_channel.txt
+                        echo `cat time_tmp` &quot;  ${TIME}&quot; &gt; time_tmp
+
+                        echo &quot;${PROC}  &quot; &gt;&gt; timing_results3_front
+                        echo &quot; ${TIME} ; ... % ${NAME}&quot; &gt;&gt; timing_results3_back
+                done
+
+                echo &quot;     ]'/86400.;&quot; &gt;&gt; timing_results3_back
+
+                paste first second third fourth &gt; timing_results_baroclinic_channel.txt
+
+                cat timing_results3_front &gt; timing_results3_baroclinic_channel.txt
+                cat timing_results3_back &gt;&gt; timing_results3_baroclinic_channel.txt
+
+                rm first second third fourth timing_results3_front timing_results3_back
+                rm time_tmp
+        fi
 elif [ $ACTION == &quot;clean&quot; ]; 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 == &quot;baroclinic_channel&quot; ]; 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>