[cig-commits] r6331 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d
willic3 at geodynamics.org
willic3 at geodynamics.org
Wed Mar 21 10:53:56 PDT 2007
Author: willic3
Date: 2007-03-21 10:53:55 -0700 (Wed, 21 Mar 2007)
New Revision: 6331
Modified:
short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Application.py
short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_scan.py
short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_setup.py
Log:
Made some changes to get things working in parallel again.
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Application.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Application.py 2007-03-21 17:42:27 UTC (rev 6330)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Application.py 2007-03-21 17:53:55 UTC (rev 6331)
@@ -55,12 +55,12 @@
scanner = self.inventory.scanner
- scanner.initialize()
-
mesh = pylith3d.processMesh(scanner.macroString(scanner.Inventory.outputFileRoot),
scanner.macroString(scanner.Inventory.inputFileRoot),
scanner.inventory.interpolateMesh,
scanner.inventory.partitioner)
+
+ scanner.initialize()
pl3dsetup.initialize(scanner)
pl3dsetup.read()
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_scan.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_scan.py 2007-03-21 17:42:27 UTC (rev 6330)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_scan.py 2007-03-21 17:53:55 UTC (rev 6331)
@@ -83,7 +83,7 @@
self._plotOutputFile = outputFile(Inventory.plotOutputFile, optional)
self._coordinateInputFile = inputFile(Inventory.coordinateInputFile, required)
self._bcInputFile = inputFile(Inventory.bcInputFile, required)
- self._winklerInputFile = inputFile(Inventory.winklerInputFile, optional)
+ self._winklerInputFile = inputFile(Inventory.winklerInputFile, unused)
self._rotationInputFile = inputFile(Inventory.rotationInputFile, optional)
self._timeStepInputFile = inputFile(Inventory.timeStepInputFile, required)
self._fullOutputInputFile = inputFile(Inventory.fullOutputInputFile, analysisType == "fullSolution" and required or unused)
@@ -184,18 +184,55 @@
self.rank = MPI_Comm_rank(MPI_COMM_WORLD)
outputFile = self.outputFile
+ inputFile = self.inputFile
+ macroString = self.macroString
Inventory = Pylith3d_scan.Inventory
optional = self.IOFileCategory(True, 0, "optional")
- # Re-initialize these with the newly acquired rank.
+ required = self.IOFileCategory(True, 1, None)
+
+ self.trace.log("Hello from pl3dscan.initialize (begin)!")
+
+ self.trace.log("Scanning ascii files to determine dimensions:")
+
+ # Get base file names
self._asciiOutputFile = outputFile(Inventory.asciiOutputFile, optional)
self._plotOutputFile = outputFile(Inventory.plotOutputFile, optional)
+ self._ucdOutputRoot = macroString(Inventory.ucdOutputRoot)
+ self._coordinateInputFile = inputFile(Inventory.coordinateInputFile, required)
+ self._connectivityInputFile = inputFile(Inventory.connectivityInputFile, required)
+ self._bcInputFile = inputFile(Inventory.bcInputFile, required)
+ self._splitNodeInputFile = inputFile(Inventory.splitNodeInputFile, required)
+ self._tractionInputFile = inputFile(Inventory.tractionInputFile, required)
+ # Create filenames for each process
+ self._asciiOutputFileSieve = \
+ self._asciiOutputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._asciiOutputFile.rpartition(".")[2]
+ self._plotOutputFileSieve = \
+ self._plotOutputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._plotOutputFile.rpartition(".")[2]
+ self._ucdOutputRootSieve = \
+ self._ucdOutputRoot.partition(".")[0]+ \
+ "."+str(self.rank)+self._ucdOutputRoot.partition(".")[2]
+ self._coordinateInputFileSieve = \
+ self._coordinateInputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._coordinateInputFile.rpartition(".")[2]
+ self._connectivityInputFileSieve = \
+ self._connectivityInputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._connectivityInputFile.rpartition(".")[2]
+ self._bcInputFileSieve = \
+ self._bcInputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._bcInputFile.rpartition(".")[2]
+ self._splitNodeInputFileSieve = \
+ self._splitNodeInputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._splitNodeInputFile.rpartition(".")[2]
+ self._tractionInputFileSieve = \
+ self._tractionInputFile.rpartition(".")[0]+ \
+ "."+str(self.rank)+"."+self._tractionInputFile.rpartition(".")[2]
+
uparser = pyre.units.parser()
matinfo = Materials()
- self.trace.log("Hello from pl3dscan.preinitialize (begin)!")
-
- self.trace.log("Scanning ascii files to determine dimensions:")
# Define information needed from other functions:
f77FileInput = self.f77FileInput
@@ -401,7 +438,7 @@
self._numberNodes = pylith3d.scan_coords(
f77FileInput,
self._coordinateUnits,
- self._coordinateInputFile)
+ self._coordinateInputFileSieve)
self._coordinateScaleString = \
uparser.parse(string.strip(self._coordinateUnits))
@@ -412,7 +449,7 @@
self._displacementUnits,
self._velocityUnits,
self._forceUnits,
- self._bcInputFile)
+ self._bcInputFileSieve)
if self._numberBcEntries > 0:
self._displacementScaleString = \
@@ -497,7 +534,7 @@
self._maxNumberVolumeElementFamilies,
self._numberMaterials,
f77FileInput,
- self._connectivityInputFile)
+ self._connectivityInputFileSieve)
self._numberVolumeElements = self._volumeElementDimens[0]
self._numberVolumeElementFamilies = self._volumeElementDimens[1]
@@ -519,7 +556,7 @@
self._maxElementNodes2d,
f77FileInput,
self._tractionBcUnits,
- self._tractionInputFile)
+ self._tractionInputFileSieve)
if self._numberTractionBc != 0:
self._tractionBcScaleString = \
@@ -529,7 +566,7 @@
self._numberSplitNodeEntries = pylith3d.scan_split(
f77FileInput,
- self._splitNodeInputFile)
+ self._splitNodeInputFileSieve)
self._numberSlipperyNodeEntries = pylith3d.scan_slip(
f77FileInput,
@@ -547,7 +584,7 @@
self._numberSlipperyWinklerEntries = self._slipperyWinklerInfo[0]
self._numberSlipperyWinklerForces = self._slipperyWinklerInfo[1]
- self.trace.log("Hello from pl3dscan.preinitialize (end)!")
+ self.trace.log("Hello from pl3dscan.initialize (end)!")
return
@@ -688,7 +725,7 @@
fileRoot.meta['tip'] = "Root pathname for simulation (all filenames derive from this)."
inputFileRoot = pyre.inventory.str("inputFileRoot", default="${fileRoot}")
inputFileRoot.meta['tip'] = "Root input pathname for simulation (all input filenames derive from this)."
- outputFileRoot = pyre.inventory.str("outputFileRoot", default="${fileRoot}.${rank}")
+ outputFileRoot = pyre.inventory.str("outputFileRoot", default="${fileRoot}")
outputFileRoot.meta['tip'] = "Root output pathname for simulation (all output filenames derive from this)."
# Output filenames (all are optional).
@@ -725,9 +762,6 @@
fullOutputInputFile.meta['tip'] = "Pathname for file defining when to provide output (overrides default from inputFileRoot)."
# Optional input files.
- winklerInputFile = InputFile("winklerInputFile",default="${inputFileRoot}.wink")
- winklerInputFile.meta['tip'] = "Pathname for Winkler force input file (overrides default from inputFileRoot)."
-
rotationInputFile = InputFile("rotationInputFile",default="${inputFileRoot}.skew")
rotationInputFile.meta['tip'] = "Pathname for skew rotations input file (overrides default from inputFileRoot)."
@@ -737,16 +771,19 @@
splitNodeInputFile = InputFile("splitNodeInputFile",default="${inputFileRoot}.split")
splitNodeInputFile.meta['tip'] = "Pathname for split node input file (overrides default from inputFileRoot)."
+ tractionInputFile = InputFile("tractionInputFile",default="${inputFileRoot}.traction")
+ tractionInputFile.meta['tip'] = "Pathname for traction BC input file (overrides default from inputFileRoot)."
+
# Unused input files.
+ winklerInputFile = InputFile("winklerInputFile",default="${inputFileRoot}.wink")
+ winklerInputFile.meta['tip'] = "Pathname for Winkler force input file (overrides default from inputFileRoot)."
+
materialHistoryInputFile = InputFile("materialHistoryInputFile",default="${inputFileRoot}.mhist")
materialHistoryInputFile.meta['tip'] = "Pathname for file defining material histories (overrides default from inputFileRoot -- presently unused)."
prestressInputFile = InputFile("prestressInputFile",default="${inputFileRoot}.prestr")
prestressInputFile.meta['tip'] = "Pathname for prestress input file (overrides default from inputFileRoot -- presently unused)."
- tractionInputFile = InputFile("tractionInputFile",default="${inputFileRoot}.traction")
- tractionInputFile.meta['tip'] = "Pathname for traction BC input file (overrides default from inputFileRoot)."
-
slipperyNodeInputFile = InputFile("slipperyNodeInputFile",default="${inputFileRoot}.slip")
slipperyNodeInputFile.meta['tip'] = "Pathname for slippery node input file (overrides default from inputFileRoot -- presently unused)."
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_setup.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_setup.py 2007-03-21 17:42:27 UTC (rev 6330)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/Pylith3d_setup.py 2007-03-21 17:53:55 UTC (rev 6331)
@@ -169,11 +169,11 @@
self.doubleSize = pl3dscan._doubleSize
# First get all filenames
- self.asciiOutputFile = pl3dscan._asciiOutputFile
- self.plotOutputFile = pl3dscan._plotOutputFile
- self.ucdOutputRoot = pl3dscan._ucdOutputRoot
- self.coordinateInputFile = pl3dscan._coordinateInputFile
- self.bcInputFile = pl3dscan._bcInputFile
+ self.asciiOutputFile = pl3dscan._asciiOutputFileSieve
+ self.plotOutputFile = pl3dscan._plotOutputFileSieve
+ self.ucdOutputRoot = pl3dscan._ucdOutputRootSieve
+ self.coordinateInputFile = pl3dscan._coordinateInputFileSieve
+ self.bcInputFile = pl3dscan._bcInputFileSieve
self.winklerInputFile = pl3dscan._winklerInputFile
self.rotationInputFile = pl3dscan._rotationInputFile
self.timeStepInputFile = pl3dscan._timeStepInputFile
@@ -182,10 +182,10 @@
self.loadHistoryInputFile = pl3dscan._loadHistoryInputFile
self.materialPropertiesInputFile = pl3dscan._materialPropertiesInputFile
self.materialHistoryInputFile = pl3dscan._materialHistoryInputFile
- self.connectivityInputFile = pl3dscan._connectivityInputFile
+ self.connectivityInputFile = pl3dscan._connectivityInputFileSieve
self.prestressInputFile = pl3dscan._prestressInputFile
- self.tractionInputFile = pl3dscan._tractionInputFile
- self.splitNodeInputFile = pl3dscan._splitNodeInputFile
+ self.tractionInputFile = pl3dscan._tractionInputFileSieve
+ self.splitNodeInputFile = pl3dscan._splitNodeInputFileSieve
self.slipperyNodeInputFile = pl3dscan._slipperyNodeInputFile
self.differentialForceInputFile = pl3dscan._differentialForceInputFile
self.slipperyWinklerInputFile = pl3dscan._slipperyWinklerInputFile
More information about the cig-commits
mailing list