[cig-commits] r19909 - short/3D/PyLith/benchmarks/trunk/static/performance/solvertest

brad at geodynamics.org brad at geodynamics.org
Fri Mar 30 08:40:23 PDT 2012


Author: brad
Date: 2012-03-30 08:40:23 -0700 (Fri, 30 Mar 2012)
New Revision: 19909

Added:
   short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.py
Removed:
   short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh
Modified:
   short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py
Log:
Converted shell script run_convtest.sh to Python script run_convtest.py.

Added: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.py	                        (rev 0)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.py	2012-03-30 15:40:23 UTC (rev 19909)
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# Python script to facilitate running fieldsplit convergence
+# benchmarks. All runs are done on a single processor.
+
+import os
+import sys
+import subprocess
+
+if len(sys.argv) != 1:
+    raise ValueError("usage: run_convtest.py")
+
+for d in ["output", "logs"]:
+  if not os.path.isdir(d):
+      os.mkdir(d)
+
+# ----------------------------------------------------------------------
+def runPyLith(args, logFilename):
+    log = open("logs/logFilename", "w")
+    subprocess.call("pylith " + args, stdout=log, stderr=log, shell=True)
+    log.close()
+    return
+
+
+# ----------------------------------------------------------------------
+for cell in ["hex8","tet4"]:
+
+  print "ASM w/small tolerance"
+  args = "%s.cfg asm.cfg" % cell
+  runPyLith(args + " --petsc.ksp_rtol=1.0e-18", "%s_asm_tol18.log" % cell)
+
+  print "Field split w/custom PC, rtol=1.0e-6"
+  args = "%s.cfg fieldsplit_mult.cfg custompc.cfg" % cell
+  runPyLith(args + " --petsc.ksp_rtol=1.0e-6", "%s_fs_tol06.log" % cell)
+
+  print "Field split w/custom PC, rtol=1.0e-7"
+  args = "%s.cfg fieldsplit_mult.cfg custompc.cfg" % cell
+  runPyLith(args + " --petsc.ksp_rtol=1.0e-7", "%s_fs_tol07.log" % cell)
+
+  print "Field split w/custom PC, rtol=1.0e-8"
+  args = "%s.cfg fieldsplit_mult.cfg custompc.cfg" % cell
+  runPyLith(args + " --petsc.ksp_rtol=1.0e-8", "%s_fs_tol08.log" % cell)


Property changes on: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.py
___________________________________________________________________
Name: svn:executable
   + *

Deleted: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh	2012-03-30 15:05:53 UTC (rev 19908)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh	2012-03-30 15:40:23 UTC (rev 19909)
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-for ver in hex8 tet4; do
-
-  # Small tolerance w/ASM
-  sim=${ver}_smalltol
-  pylith hex8.cfg asm.cfg --petsc.ksp_rtol=1.0e-18 >& ${sim}.log
-  cd output; changeprefix hex8 ${sim}; cd ../
-
-  # Field split w/custom, PC rtol=1.0e-6
-  sim=${ver}_tol6
-  pylith hex8.cfg fieldsplit.cfg custompc.cfg --petsc.ksp_rtol=1.0e-6  >& ${sim}.log
-  cd output; changeprefix hex8 ${sim}; cd ../
-
-  # Field split w/custom, PC rtol=1.0e-7
-  sim=${ver}_tol7
-  pylith hex8.cfg fieldsplit.cfg custompc.cfg --petsc.ksp_rtol=1.0e-7  >& ${sim}.log
-  cd output; changeprefix hex8 ${sim}; cd ../
-
-  # Field split w/custom, PC rtol=1.0e-8
-  sim=${ver}_tol8
-  pylith hex8.cfg fieldsplit.cfg custompc.cfg --petsc.ksp_rtol=1.0e-8  >& ${sim}.log
-  cd output; changeprefix hex8 ${sim}; cd ../
-
-done
-

Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py	2012-03-30 15:05:53 UTC (rev 19908)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py	2012-03-30 15:40:23 UTC (rev 19909)
@@ -8,7 +8,7 @@
 import subprocess
 
 if len(sys.argv) != 2:
-    raise ValueError("usage: run_scaling.py SIM")
+    raise ValueError("usage: run_pctests.py PCTYPE")
 sim = sys.argv[1]
 
 if not sim in ["all", 



More information about the CIG-COMMITS mailing list