[cig-commits] r5932 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/tractest
willic3 at geodynamics.org
willic3 at geodynamics.org
Tue Jan 30 12:50:36 PST 2007
Author: willic3
Date: 2007-01-30 12:50:35 -0800 (Tue, 30 Jan 2007)
New Revision: 5932
Removed:
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/tractest/runbm.py
Log:
Removed python run script, which isn't really necessary with the new
*.cfg files.
Deleted: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/tractest/runbm.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/tractest/runbm.py 2007-01-30 20:45:39 UTC (rev 5931)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/tractest/runbm.py 2007-01-30 20:50:35 UTC (rev 5932)
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-root="tractest"
-
-# ----------------------------------------------------------------------
-def setupInput(nprocs):
- dupext = [".fuldat", ".prop", ".statevar", ".time"]
- sinext = [".coord", ".connect", ".bc", ".split"]
-
- print "Setting up symbolic links with prefix '%s_%d':" % (root, nprocs)
- import os
-
- dirFiles = os.listdir(os.getcwd())
- for ext in sinext:
- src = "%s%s" % (root, ext)
- dest = "%s_%s%s" % (root, nprocs, ext)
- if not dest in dirFiles:
- print " %s -> %s... created" % (dest, src)
- os.symlink(src, dest)
- else:
- print " %s -> %s... already exists" % (dest, src)
-
- for ext in dupext:
- src = "%s%s" % (root, ext)
- for iproc in range(nprocs):
- dest = "%s_%s.%d%s" % (root, nprocs, iproc, ext)
- if not dest in dirFiles:
- print " %s -> %s... created" % (dest, src)
- os.symlink(src, dest)
- else:
- print " %s -> %s... already exists" % (dest, src)
- return
-
-
-# ----------------------------------------------------------------------
-def run(nprocs):
- print "Running PyLith..."
-
- # TODO: Replace the use of launching via 'system' with use
- # of Leif's architecture independent utility.
-
- cmd = "mpirun -np %d `which pylith3dapp.py` " \
- "--typos=relaxed " \
- "--scanner.fileRoot=%s_%d " \
- "--scanner.asciiOutput=full " \
- "--scanner.ucdOutput=ascii " \
- "-log_summary -pc_type bjacobi -sub_pc_type ilu " \
- "-ksp_monitor -ksp_view -ksp_rtol 1e-09" % (nprocs, root, nprocs)
- import os
- print cmd
- os.system(cmd)
- return
-
-
-# ----------------------------------------------------------------------
-if __name__ == "__main__":
- from optparse import OptionParser
-
- parser = OptionParser()
- parser.add_option("-n", "--numprocs", dest="nprocs",
- type="int", metavar="NPROCS",
- help="Set number of processors.")
- (options, args) = parser.parse_args()
- if len(args) != 0:
- parser.error("Incorrent number of arguments.")
-
- nprocs = 1
- if not options.nprocs is None:
- nprocs = options.nprocs
-
- setupInput(nprocs)
- run(nprocs)
-
-
-# End of file
More information about the cig-commits
mailing list