[CIG-SHORT] help-components for mac executable: Format and error question

Brad Aagaard baagaard at usgs.gov
Mon Jul 2 19:19:52 PDT 2012


Rowena,

There are a couple different stages where we do validation of input in 
PyLith. For some very basic parameters, such as specifying a filename 
for the mesh, this is done very early via Pyre. So early, in fact, that 
the validation occurs before --help-components is processed. Other 
validation occurs after we have read in the mesh. As we have added more 
checking of parameters to prevent clearly inadmissible values, PyLith 
requires more info to be able to run --help-components.

Our current expectation is that users specify a minimum number of valid 
parameters in order to do anything at all, including using the 
--help-components arguments and pylithinfo.

Brad


On 7/2/12 12:19 PM, Charles Williams wrote:
> Hi Rowena,
>
> I'm afraid this is default behavior now.  I'm not sure when this
> changed.  If you don't have any settings, one of the first things that
> happens is that PyLith discovers that you have no mesh file, which is
> what you've shown below.  By the way, you may find the pylithinfo
> command to be useful:
>
> pylithinfo [--verbose] [--fileout=pylith_parameters.txt] [PyLith args]
>
> The PyLith args would include any .cfg files you might be using, and you
> don't actually need to use the fileout parameter since it has a default
> value.  This will give you a complete list of all the PyLith parameters
> and (if you use --verbose) where they get the values from.
>
> Cheers,
> Charles
>
>
> On 3/07/2012, at 1:50 AM, Rowena Lohman wrote:
>
>> Hi folks,
>>
>> I'm still trying to adapt the greensfn problem to my own needs,
>> including having it output to a non-points format since that didn't
>> work for my 3D problem (discussed in last thread with Brad).  I'm
>> using the pre-built binary for OSX, on a macbook laptop running
>> OS10.7.4.
>>
>> I'm trying to build my .cfg file using the help-components command
>> line usage to see what the current values and possible values are, as
>> well as whether when I'm setting them they are actually getting used
>> or not.
>>
>> Question 1: Before I go too far with this, I'd like to know if some
>> odd behavior I'm seeing is normal for the current version or a problem
>> with the binary.  In previous incarnations (okay, 1.3!) I could type
>> pylith --help-components anywhere and get the help message.  If I was
>> in a directory with a pylithapp.cfg file that had a problem (i.e., I
>> set the material to "bogus"), it would still give me the tree of
>> values and possible settings.
>>
>> In my current version (10.7.1), if I type pylith --help-components in
>> a random directory (i.e., one with no .cfg files), I get the
>> following:
>> Traceback (most recent call last):
>>  File
>> "/Users/rowenalohman/work/programs/pylith/pylith-1.7.1-darwin-10.6.8/bin/pylith",
>> line 39, in <module>
>>    start(applicationClass=PyLithApp)
>>  File
>> "/Users/rowenalohman/work/programs/pylith/pylith-1.7.1-darwin-10.6.8/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/applications/__init__.py",
>> line 41, in start
>>    shell.run(**kwds)
>>  File
>> "/Users/rowenalohman/work/programs/pylith/pylith-1.7.1-darwin-10.6.8/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/applications/Shell.py",
>> line 125, in run
>>    app.applyConfiguration(context)
>>  File
>> "/Users/rowenalohman/work/programs/pylith/pylith-1.7.1-darwin-10.6.8/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/inventory/Configurable.py",
>> line 84, in applyConfiguration
>>    raise ValueError("%s\nBacktrace - Component %s" % (err.message,
>> aliases))
>> ValueError: Filename for ASCII input mesh not specified.
>> Backtrace - Component meshioascii, reader
>> Backtrace - Component meshimporter, mesh_generator
>> Backtrace - Component pylithapp
>>
>>
>> If I am in a directory with a "perfect" cfg file, it works as
>> expected.  Is this the new order of things, or is there some other
>> problem?
>>
>>
>>
>>
>> --
>> -----------------------------------
>> Rowena Lohman
>> Assistant Professor
>> Earth & Atmospheric Sciences
>> Snee Hall
>> Cornell University
>> Ithaca, NY 14853
>> ph: 607-255-6929
>> fax: 607-254-4780
>> -----------------------------------
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>
> Charles A. Williams
> Scientist
> GNS Science
> 1 Fairway Drive, Avalon
> PO Box 30368
> Lower Hutt  5040
> New Zealand
> ph (office): 0064-4570-4566
> fax (office): 0064-4570-4600
> C.Williams at gns.cri.nz <mailto:C.Williams at gns.cri.nz>
>
>
>
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>




More information about the CIG-SHORT mailing list