[cig-commits] r6658 -
short/3D/PyLith/branches/pylith-0.8/doc/userguide/tutorials/reversenog
willic3 at geodynamics.org
willic3 at geodynamics.org
Tue Apr 24 13:17:55 PDT 2007
Author: willic3
Date: 2007-04-24 13:17:55 -0700 (Tue, 24 Apr 2007)
New Revision: 6658
Modified:
short/3D/PyLith/branches/pylith-0.8/doc/userguide/tutorials/reversenog/reversenog.lyx
Log:
Updated reversenog tutorial for new utilities, new usage of .cfg files,
etc.
Modified: short/3D/PyLith/branches/pylith-0.8/doc/userguide/tutorials/reversenog/reversenog.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/doc/userguide/tutorials/reversenog/reversenog.lyx 2007-04-24 20:16:06 UTC (rev 6657)
+++ short/3D/PyLith/branches/pylith-0.8/doc/userguide/tutorials/reversenog/reversenog.lyx 2007-04-24 20:17:55 UTC (rev 6658)
@@ -1,4 +1,4 @@
-#LyX 1.4.3 created this file. For more info see http://www.lyx.org/
+#LyX 1.4.4 created this file. For more info see http://www.lyx.org/
\lyxformat 245
\begin_document
\begin_header
@@ -261,7 +261,7 @@
\begin_deeper
\begin_layout LyX-Code
-$ tar -zxvf pylith-0.8.1_tutorials.tgz
+$ tar -zxvf pylith-0.8.2_tutorials.tgz
\end_layout
\end_deeper
@@ -733,15 +733,60 @@
bmrsnog.time
\family default
, the simulation will have 100 time steps of 0.1 year each.
-
+ In addition to the
+\family typewriter
+splitcube.*
+\family default
+ files, the step above will also download
+\family typewriter
+pylith3d.cfg
+\family default
+, a configuration file that sets the parameters necessary to run PyLith
+ on a single processor.
+ You may wish to examine this file to see how various parameters are set.
+ Another file,
+\family typewriter
+mklinks.py
+\family default
+, is also downloaded.
+ This is explained in step 3 below.
\end_layout
\begin_layout Enumerate
+Since we want to run the same simulation using either one or two processors,
+ we need unique filenames for each case so that files do not get overwritten
+ or mixed up with each other.
+ This is accomplished with the
+\family typewriter
+mklinks.py
+\family default
+ utility code, which creates the necessary symbolic links:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+$ ./mklinks.py
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
Run the simulation by executing
\family typewriter
-runbm.py -n 1
+pylith3dapp.py
\family default
-, where the 1 refers to the number of processors.
+.
+ The
+\family typewriter
+pylith3dapp.py
+\family default
+ code is the main script for running the code, and it automatically picks
+ up the parameter settings defined in
+\family typewriter
+pylith3d.cfg
+\family default
+.
+ Since the number of processors is not defined in this file, it automatically
+ uses the default value of one.
\end_layout
\begin_deeper
@@ -758,23 +803,26 @@
You can check to make sure your input is digested correctly by examining
this file.
For large problems, this file can be quite large.
- You can suppress creation of this file using the command line argument
-
+ You can suppress creation of this file by setting
\family typewriter
---scanner.asciiOutput=none
+asciioutput=none
\family default
- flag.
+ in
+\family typewriter
+pylith3d.cfg
+\family default
+.
On the other hand, for debugging purposes in small problems, you may wish
to output everything, including the computed results, in this file using
\family typewriter
---scanner.asciiOutput=full
+asciiOutput=full
\family default
.
\end_layout
\begin_layout LyX-Code
-$ ./runbm.py -n 1
+$ pylith3dapp.py
\end_layout
\end_deeper
@@ -827,38 +875,46 @@
\end_deeper
\begin_layout Enumerate
PyLith does not write complete UCD files.
- So the first step is to combine the mesh topology information with the
- output at a given time step into a complete UCD file.
- For example, use
+ So the first step is to combine the mesh topology information (contained
+ in
\family typewriter
-cat
-\family default
- to merge the nodal coordinates file (
-\family typewriter
bmrsnog_1.0.mesh.inp
\family default
-) and the nodal displacements at time step 10 file (
+) with the output at a given time step (contained in
\family typewriter
bmrsnog_1.0.mesh.time.00010.inp
\family default
-) into
+ and
\family typewriter
-bmrsnog_1.0.mesh.t00010.inp
+bmrsnog_1.0.gmesh.time.00010.inp
\family default
-.
+ for time step 10) into a complete UCD file.
+ This is accomplished using the
+\family typewriter
+makeucd
+\family default
+ utility code (included in the PyLith package).
+ In addition to combining the topology information with time step output,
+ this utility also allows the option of outputting Gauss point values (stress,
+ strain, etc.) at nodes or at Gauss points.
+ A summary of usage may be obtained by typing
+\family typewriter
+makeucd
+\family default
+ with no arguments.
\end_layout
\begin_deeper
\begin_layout LyX-Code
-$ cat bmrsnog_1.0.mesh.inp bmrsnog_1.0.mesh.time.00010.inp
-\begin_inset Formula $\backslash$
-\end_inset
+$ makeucd m=bmrsnog_1.0.mesh.inp o=bmrsnog_1.0.mesh.t10.inp
+\backslash
+ p=bmrsnog_1.0.mesh.time.00010.inp
+\backslash
-
\end_layout
\begin_layout LyX-Code
-> bmrsnog_1.0.mesh.t00010.inp
+g=bmrsnog_1.0.gmesh.time.00010.inp
\end_layout
\end_deeper
@@ -881,7 +937,11 @@
\end_deeper
\begin_layout Enumerate
-Load the UCD file that you just created by selecting
+Load the UCD file that you just created (
+\family typewriter
+bmrsnog_1.0.mesh.t10.inp
+\family default
+) by selecting
\family sans
File
\begin_inset Formula $\triangleright$
@@ -939,7 +999,7 @@
\end_inset
-ParaView rendering of displacement in x-direction at time step 10 (10 yrs
+ParaView rendering of displacement in x-direction at time step 10 (1 year
after imposed dislocation) for the reverse slip without gravity benchmark.
\end_layout
@@ -1045,7 +1105,7 @@
\end_inset
ParaView rendering of displacement in x-direction and displacement vectors
- at time step 10 (10 yrs after imposed dislocation) for the reverse slip
+ at time step 10 (1 year after imposed dislocation) for the reverse slip
without gravity benchmark.
\end_layout
@@ -1084,27 +1144,73 @@
\end_deeper
\begin_layout Enumerate
-The parameter files are the same as those in the single processor run.
- The
+The parameter files are the same as those in the single processor run and
+ the
\family typewriter
-runbm
+mklinks.py
\family default
- script will automatically take care of duplicating these files so that
- there is one for each processor.
-
+ utility has already created the necessary symbolic links.
+ The only change is the addition of the file
+\family typewriter
+pylith3d-np2.cfg
+\family default
+.
+ If you compare this to the original
+\family typewriter
+pylith3d.cfg
+\family default
+, you will see that the main differences are changing
+\family typewriter
+fileRoot
+\family default
+ from
+\family typewriter
+bmrsnog_1
+\family default
+ to
+\family typewriter
+bmrsnog_2
+\family default
+, and a section that specifies what launcher to use (
+\family typewriter
+mpiexec -np 2
+\family default
+ in this case).
\end_layout
+\begin_deeper
+\begin_layout LyX-Code
+[pylith3d.launcher]
+\end_layout
+
+\begin_layout LyX-Code
+# Specify multi-processor run
+\end_layout
+
+\begin_layout LyX-Code
+command = mpiexec -np 2
+\end_layout
+
+\end_deeper
\begin_layout Enumerate
Run the simulation by executing
\family typewriter
-runbm.py -n 2
+pylith3dapp.py pylith3d-np2.cfg
\family default
-, where the 2 refers to the number of processors.
+, where the variables set in
+\family typewriter
+pylith3d.cfg
+\family default
+ are now superseded by those specified in the command-line
+\family typewriter
+.cfg
+\family default
+ file.
\end_layout
\begin_deeper
\begin_layout LyX-Code
-$ ./runbm.py -n 2
+$ pylith3dapp.py pylith3d-np2.cfg
\end_layout
\end_deeper
@@ -1140,39 +1246,39 @@
\end_deeper
\begin_layout Enumerate
As in the case of the single processor run, the first step is to combine
- the mesh topology information with the output at a given time step into
- a complete UCD file.
+ the mesh topology information with the output at a given time step (step
+ 10 in this case) into a complete UCD file.
Because PyLith writes the output from each processor into a different file,
we must run
\family typewriter
-cat
+makeucd
\family default
twice to create UCD files for each processor.
\end_layout
\begin_deeper
\begin_layout LyX-Code
-$ cat bmrsnog_2.0.mesh.inp bmrsnog_2.0.mesh.time.00010.inp
-\begin_inset Formula $\backslash$
-\end_inset
+$ makeucd m=bmrsnog_2.0.mesh.inp o=bmrsnog_2.0.mesh.t10.inp
+\backslash
+ p=bmrsnog_2.0.mesh.time.00010.inp
+\backslash
-
\end_layout
\begin_layout LyX-Code
-> bmrsnog_2.0.mesh.t00010.inp
+g=bmrsnog_2.0.gmesh.time.00010.inp
\end_layout
\begin_layout LyX-Code
-$ cat bmrsnog_2.1.mesh.inp bmrsnog_2.1.mesh.time.00010.inp
-\begin_inset Formula $\backslash$
-\end_inset
+$ makeucd m=bmrsnog_2.1.mesh.inp o=bmrsnog_2.1.mesh.t10.inp
+\backslash
+ p=bmrsnog_2.1.mesh.time.00010.inp
+\backslash
-
\end_layout
\begin_layout LyX-Code
-> bmrsnog_2.1.mesh.t00010.inp
+g=bmrsnog_2.1.gmesh.time.00010.inp
\end_layout
\end_deeper
More information about the cig-commits
mailing list