[CIG-SHORT] template install
Brad Aagaard
baagaard at usgs.gov
Tue May 29 08:55:05 PDT 2012
Huihui,
The error you are getting is related to a mismatch in the signature of a
C++ pointer for the spatialdata::spatialdb::SpatialDB object generated
by SWIG. In order to extend PyLith via the templates, you need to make
sure you are using compilers that are compatible with those used to
build the main PyLith source as well as the same version of SWIG used to
build the main PyLith source. For the PyLith v1.6.3 binary, we used SWIG
2.0.2 and (in most cases) gcc 4.5.2 (run nemesis to verify the gcc
version). For PyLith 1.7 (to be released in the next week), we are using
SWIG 2.0.6 and gcc-4.6.3.
Regards,
Brad
On 05/24/2012 08:06 PM, 翁辉辉 wrote:
>
>
> dear developers:
>
> I try to install the template module PlaneStrainState. I install it as the README file describes,
> I test it using testcontrib.py script ,the result as follow:
> testHasStateVars (TestPlaneStrainState.TestPlaneStrainState) ... ok
> testNeedNewJacobian (TestPlaneStrainState.TestPlaneStrainState) ... ok
> testTensorSize (TestPlaneStrainState.TestPlaneStrainState) ... ok
> test_constructor (TestPlaneStrainState.TestPlaneStrainState) ... ok
> test_factory (TestPlaneStrainState.TestPlaneStrainState) ... ok
> test_useElasticBehavior (TestPlaneStrainState.TestPlaneStrainState) ... ok
>
> In the examples/twocells/twoquad4,I replace the line
> material = pylith.materials.ElasticPlaneStrain
> with
> material = pylith.materials.contrib.PlaneStrainState
> and run one of the examples.but It has errors :
> Traceback (most recent call last):
> File "/Data/DATA_wenghh/Pylith/pylith/bin/pylith", line 39, in<module>
> start(applicationClass=PyLithApp)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/applications/__init__.py", line 41, in start
> shell.run(**kwds)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/applications/Shell.py", line 125, in run
> app.applyConfiguration(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 76, in applyConfiguration
> context.configureComponent(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/ConfigContext.py", line 68, in configureComponent
> component.configureComponents(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 129, in configureComponents
> self.inventory.configureComponents(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Inventory.py", line 99, in configureComponents
> component.applyConfiguration(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 76, in applyConfiguration
> context.configureComponent(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/ConfigContext.py", line 68, in configureComponent
> component.configureComponents(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 129, in configureComponents
> self.inventory.configureComponents(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Inventory.py", line 99, in configureComponents
> component.applyConfiguration(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 76, in applyConfiguration
> context.configureComponent(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/ConfigContext.py", line 68, in configureComponent
> component.configureComponents(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 129, in configureComponents
> self.inventory.configureComponents(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Inventory.py", line 99, in configureComponents
> component.applyConfiguration(context)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pythia-0.8.1.14-py2.6.egg/pyre/inventory/Configurable.py", line 79, in applyConfiguration
> self._configure()
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pylith/materials/ElasticMaterial.py", line 90, in _configure
> Material._configure(self)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pylith/materials/Material.py", line 187, in _configure
> self.dbProperties(self.inventory.dbProperties)
> File "/Data/DATA_wenghh/Pylith/pylith/lib/python2.6/site-packages/pylith/materials/contrib/materialscontrib.py", line 65, in dbProperties
> def dbProperties(*args): return _materialscontrib.Material_dbProperties(*args)
> TypeError: in method 'Material_dbProperties', argument 2 of type 'spatialdata::spatialdb::SpatialDB *'
>
> Is it an issue about SWIG? How can I debug it? And I find it is difficult to debug C++ using pdb.It seem that pdb can't print those variables that is not declared in SWIG Interface File.Any suggestion shall be appreciated.
>
> thanks
> huihui
>
>
>
> _______________________________________________
> 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