[cig-commits] r22381 - in short/3D/PyLith/branches/v1.7-trunk: doc/userguide/install doc/userguide/runpylith pylith/meshio
brad at geodynamics.org
brad at geodynamics.org
Wed Jun 19 15:31:23 PDT 2013
Author: brad
Date: 2013-06-19 15:31:23 -0700 (Wed, 19 Jun 2013)
New Revision: 22381
Modified:
short/3D/PyLith/branches/v1.7-trunk/doc/userguide/install/install.lyx
short/3D/PyLith/branches/v1.7-trunk/doc/userguide/runpylith/runpylith.lyx
short/3D/PyLith/branches/v1.7-trunk/pylith/meshio/MeshIOAscii.py
Log:
Improved error message when PyLith is run without any input. Added info on verifying PyLith installation to manual.
Modified: short/3D/PyLith/branches/v1.7-trunk/doc/userguide/install/install.lyx
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/doc/userguide/install/install.lyx 2013-06-19 22:20:45 UTC (rev 22380)
+++ short/3D/PyLith/branches/v1.7-trunk/doc/userguide/install/install.lyx 2013-06-19 22:31:23 UTC (rev 22381)
@@ -443,6 +443,107 @@
\end_layout
\begin_layout Section
+Verifying PyLith is Installed Correctly
+\end_layout
+
+\begin_layout Standard
+The easiest way to verify that PyLith has been installed correctly is to
+ run one or more of the examples supplied with the binary and source code.
+ In the binary distribution, the examples are located in
+\family typewriter
+src/pylith/examples
+\family default
+ while in the source distribution, they are located in
+\family typewriter
+pylith-1.9.0/examples
+\family default
+.
+ Chapter
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ discusses how to run and visualize the results for the examples.
+ To run the example discussed in Section
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-3d-hex8-static"
+
+\end_inset
+
+:
+\end_layout
+
+\begin_layout LyX-Code
+$ cd examples/3d/hex8
+\begin_inset Newline newline
+\end_inset
+
+$ pylith step01.cfg
+\end_layout
+
+\begin_layout Standard
+If you run PyLith if a directory without any input, you will get the error
+ message:
+\end_layout
+
+\begin_layout LyX-Code
+Traceback (most recent call last):
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout LyX-Code
+ValueError: Filename for ASCII input mesh not specified.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+PyLith runs some minimum validation on the input before even
+\end_layout
+
+\begin_layout LyX-Code
+displaying help information.
+ To test PyLith, run an example as
+\end_layout
+
+\begin_layout LyX-Code
+discussed in the manual.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Backtrace - Component meshioascii, reader
+\end_layout
+
+\begin_layout LyX-Code
+Backtrace - Component meshimporter, mesh_generator
+\end_layout
+
+\begin_layout LyX-Code
+Backtrace - Component pylithapp
+\end_layout
+
+\begin_layout Standard
+This indicates that
+\family typewriter
+pylithapp.mesh_generator.reader
+\family default
+ component, which is a MeshIOAscii object, is missing an the filename for
+ an ASCII input mesh.
+\end_layout
+
+\begin_layout Section
Configuration on a Cluster
\end_layout
@@ -621,7 +722,7 @@
\end_layout
\begin_layout LyX-Code
-pylith --scheduler.dry
+$ pylith --scheduler.dry
\end_layout
\begin_layout Standard
@@ -636,7 +737,7 @@
\end_layout
\begin_layout LyX-Code
-pylith --launcher.dry
+$ pylith --launcher.dry
\end_layout
\begin_layout Standard
Modified: short/3D/PyLith/branches/v1.7-trunk/doc/userguide/runpylith/runpylith.lyx
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/doc/userguide/runpylith/runpylith.lyx 2013-06-19 22:20:45 UTC (rev 22380)
+++ short/3D/PyLith/branches/v1.7-trunk/doc/userguide/runpylith/runpylith.lyx 2013-06-19 22:31:23 UTC (rev 22381)
@@ -456,6 +456,20 @@
$ pylith --help
\end_layout
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+
+\series default
+\color none
+This only works if the input passes the minimum validation tests.
+ Running PyLith in a directory without any input will fail the validation
+ step due to a missing mesh input file.
+\end_layout
+
\begin_layout Standard
All PyLith-related properties are associated with the
\family typewriter
Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/meshio/MeshIOAscii.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/meshio/MeshIOAscii.py 2013-06-19 22:20:45 UTC (rev 22380)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/meshio/MeshIOAscii.py 2013-06-19 22:31:23 UTC (rev 22381)
@@ -32,7 +32,11 @@
Validate filename.
"""
if 0 == len(value):
- raise ValueError("Filename for ASCII input mesh not specified.")
+ msg = "Filename for ASCII input mesh not specified.\n\n" + \
+ "PyLith runs some minimum validation on the input before even\n" + \
+ "displaying help information. To test PyLith, run an example as\n" +\
+ "discussed in the manual.\n"
+ raise ValueError(msg)
return value
More information about the CIG-COMMITS
mailing list