[cig-commits] r20050 - short/3D/PyLith/benchmarks/trunk/static/performance/solvertest
brad at geodynamics.org
brad at geodynamics.org
Mon May 7 13:53:58 PDT 2012
Author: brad
Date: 2012-05-07 13:53:58 -0700 (Mon, 07 May 2012)
New Revision: 20050
Modified:
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_add.cfg
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_gpu.cfg
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_mult.cfg
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/plot_scaling.py
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/pylithapp.cfg
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py
short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/table_pctests.py
Log:
Update fieldsplit settings (2 split fields). Updated parsing of logs to get niters (must parse .log file).
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_add.cfg
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_add.cfg 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_add.cfg 2012-05-07 20:53:58 UTC (rev 20050)
@@ -8,10 +8,6 @@
fs_pc_fieldsplit_real_diagonal =
fs_pc_fieldsplit_type = additive
fs_fieldsplit_0_pc_type = ml
-fs_fieldsplit_1_pc_type = ml
-fs_fieldsplit_2_pc_type = ml
-fs_fieldsplit_3_pc_type = jacobi
+fs_fieldsplit_1_pc_type = jacobi
fs_fieldsplit_0_ksp_type = preonly
fs_fieldsplit_1_ksp_type = preonly
-fs_fieldsplit_2_ksp_type = preonly
-fs_fieldsplit_3_ksp_type = preonly
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_gpu.cfg
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_gpu.cfg 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_gpu.cfg 2012-05-07 20:53:58 UTC (rev 20050)
@@ -11,10 +11,6 @@
fs_pc_fieldsplit_real_diagonal =
fs_pc_fieldsplit_type = multiplicative
fs_fieldsplit_0_pc_type = sacusp
-fs_fieldsplit_1_pc_type = sacusp
-fs_fieldsplit_2_pc_type = sacusp
fs_fieldsplit_3_pc_type = jacobi
fs_fieldsplit_0_ksp_type = preonly
fs_fieldsplit_1_ksp_type = preonly
-fs_fieldsplit_2_ksp_type = preonly
-fs_fieldsplit_3_ksp_type = preonly
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_mult.cfg
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_mult.cfg 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/fieldsplit_mult.cfg 2012-05-07 20:53:58 UTC (rev 20050)
@@ -8,10 +8,6 @@
fs_pc_fieldsplit_real_diagonal = True
fs_pc_fieldsplit_type = multiplicative
fs_fieldsplit_0_pc_type = ml
-fs_fieldsplit_1_pc_type = ml
-fs_fieldsplit_2_pc_type = ml
-fs_fieldsplit_3_pc_type = jacobi
+fs_fieldsplit_1_pc_type = jacobi
fs_fieldsplit_0_ksp_type = preonly
fs_fieldsplit_1_ksp_type = preonly
-fs_fieldsplit_2_ksp_type = preonly
-fs_fieldsplit_3_ksp_type = preonly
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/plot_scaling.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/plot_scaling.py 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/plot_scaling.py 2012-05-07 20:53:58 UTC (rev 20050)
@@ -54,6 +54,16 @@
for c in cells:
niters[c] = numpy.zeros(len(nprocs), dtype=numpy.float32)
for ip in xrange(len(nprocs)):
+ # Get number of iterations from ASCII log
+ logname = "logs/%s_np%03d.log" % (c.lower(), nprocs[ip])
+ with open(filename, "r") as fin:
+ for line in fin:
+ refields = re.search("Linear solve converged due to \w+ iterations ([0-9]+)", line)
+ if refields:
+ niters[c][ip] = refields.group(1)
+ break
+
+ # Get timing info from Python log
sys.path.append("logs")
modname = "%s_np%03d" % (c.lower(), nprocs[ip])
if not os.path.exists("logs/%s.py" % modname):
@@ -62,6 +72,7 @@
niters[c][ip] = None
data[c][s][ip] = None
continue
+
log = __import__(modname)
niters[c][ip] = log.Solve.event['VecMDot'].Count[0]
for s in stages:
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/pylithapp.cfg
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/pylithapp.cfg 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/pylithapp.cfg 2012-05-07 20:53:58 UTC (rev 20050)
@@ -201,7 +201,7 @@
ksp_rtol = 1.0e-8
ksp_atol = 1.0e-20
-ksp_max_it = 500
+ksp_max_it = 1000
ksp_monitor = true
ksp_view = true
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_pctests.py 2012-05-07 20:53:58 UTC (rev 20050)
@@ -49,20 +49,14 @@
if sim == "all" or sim == "fieldsplit":
# field split, additive
- #
- # STATUS: OK
print "field split, additive"
runPyLith("fieldsplit_add.cfg", "fieldsplit_add")
# field split, multiplicative
- #
- # STATUS: OK
print "field split, multiplicative"
runPyLith("fieldsplit_mult.cfg", "fieldsplit_mult")
# field split, multiplicative w/custom fault preconditioner
- #
- # STATUS: OK
print "field split, multiplicative w/custom pc"
runPyLith("fieldsplit_mult.cfg custompc.cfg", "fieldsplit_mult_custompc")
@@ -73,8 +67,8 @@
#
# STATUS: BUG, hangs at very beginning of solve for tet4
# true residual does not decrease for hex8
- print "schur, diag"
- runPyLith("schur_diag.cfg", "schur_diag")
+ #print "schur, diag"
+ #runPyLith("schur_diag.cfg", "schur_diag")
# Schur complement, lower
print "schur, lower"
Modified: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/table_pctests.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/table_pctests.py 2012-05-07 20:41:28 UTC (rev 20049)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/table_pctests.py 2012-05-07 20:53:58 UTC (rev 20050)
@@ -12,6 +12,7 @@
import os
import sys
import numpy
+import re
style = "latex"
@@ -27,6 +28,9 @@
preconditioners = [('asm', 'ASM'),
+ ('schur_full', 'Schur (full)'),
+ ('schur_lower', 'Schur (lower)'),
+ ('schur_upper', 'Schur (upper)'),
('fieldsplit_add', 'FieldSplit (add)'),
('fieldsplit_mult', 'FieldSplit (mult)'),
('fieldsplit_mult_custompc', 'FieldSplit (mult,custom)'),
@@ -51,12 +55,15 @@
for c in cells:
ip = 0
for p in problems:
- sys.path.append("logs")
- log = __import__("%s_%s_%s" % (c.lower(), pc[0], p[0]))
- niters[pc[0]][c][ip] = log.Solve.event['VecMDot'].Count[0]
+ filename = "logs/%s_%s_%s.log" % (c.lower(), pc[0], p[0])
+ with open(filename, "r") as fin:
+ for line in fin:
+ refields = re.search("Linear solve converged due to \w+ iterations ([0-9]+)", line)
+ if refields:
+ niters[pc[0]][c][ip] = refields.group(1)
+ break
ip += 1
-
if style == "text":
print "PC"+" "*24 + "Cell"+" "*2 + " "*6+"Iterates"
print " "+" "*24 + " "+" "*2 + " S1 S2 S4"
More information about the CIG-COMMITS
mailing list