I have correctly installed and tested SfePy on my desktop. I am having issues on my laptop. Both are running Ubuntu Gutsy. I think I followed the same procedure on both. make finishes on both machines without errors. Here is the output of trying to run "python simple.py input/poisson.py":
ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python simple.py input/poisson.py sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.03 s sfe: setting up domain edges... sfe: ...done in 0.02 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 Traceback (most recent call last): File "simple.py", line 106, in <module> main() File "simple.py", line 98, in main dpb, vecDP, data = solveDirect( conf, options ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 155, in solveDirect pb, state, data = solveStationary( conf, saveNames = saveNames ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 55, in solveStationary problem = ProblemDefinition.fromConf( conf ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 67, in fromConf obj.setEquations( conf.equations ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 133, in setEquations equations.parseTerms( self.domain.regions ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 147, in parseTerms eq.parseTerms( regions, self.caches ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 230, in parseTerms terms = parseTerms( regions, self.desc, self.itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 26, in parseTerms bnf = createBNF( termDescs, itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/parseEq.py", line 79, in createBNF default = [] )( "args" ) + ")" TypeError: 'Optional' object is not callable
So, it seems like something is missing, but I don't know what sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] means.
Here is the output of "python runTests.py": ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py --- test_input: failed! tests/test_input_octahedron.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 --- test_input: failed! tests/test_input_navier_stokes.py --- test_input: failed! tests/test_input_poisson.py --- test_input: failed! tests/test_elasticity_small_strain.py --- test_get_solution: failed! +++ test_linear_terms: ok tests/test_quadratures.py --- test_problemCreation: failed! tests/test_io.py +++ test_recursiveDictHDF5: ok --- test_sparseMatrixHDF5: failed! tests/test_parsing.py --- test_parseEquations: failed! +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py --- test_input: failed! tests/test_lcbc_2d.py --- test_linearRigidBodyBC: failed! tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py --- test_input: failed! tests/test_input_time_poisson.py --- test_input: failed! tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py --- test_linearRigidBodyBC: failed! tests/test_input_sinbc.py --- test_input: failed! tests/test_meshio.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 7.65 s, 14 failure(s) of 23 test(s)
What do I need to do to get this fixed?
Thanks,
Ryan
On Wed, May 14, 2008 at 7:46 PM, RyanGT <ryan...@gmail.com> wrote:
I have correctly installed and tested SfePy on my desktop. I am having issues on my laptop. Both are running Ubuntu Gutsy. I think I followed the same procedure on both. make finishes on both machines without errors. Here is the output of trying to run "python simple.py input/poisson.py":
ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python simple.py input/poisson.py sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.03 s sfe: setting up domain edges... sfe: ...done in 0.02 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 Traceback (most recent call last): File "simple.py", line 106, in <module> main() File "simple.py", line 98, in main dpb, vecDP, data = solveDirect( conf, options ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 155, in solveDirect pb, state, data = solveStationary( conf, saveNames = saveNames ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 55, in solveStationary problem = ProblemDefinition.fromConf( conf ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 67, in fromConf obj.setEquations( conf.equations ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 133, in setEquations equations.parseTerms( self.domain.regions ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 147, in parseTerms eq.parseTerms( regions, self.caches ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 230, in parseTerms terms = parseTerms( regions, self.desc, self.itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 26, in parseTerms bnf = createBNF( termDescs, itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/parseEq.py", line 79, in createBNF default = [] )( "args" ) + ")" TypeError: 'Optional' object is not callable
So, it seems like something is missing, but I don't know what sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] means.
Here is the output of "python runTests.py": ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py --- test_input: failed! tests/test_input_octahedron.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 --- test_input: failed! tests/test_input_navier_stokes.py --- test_input: failed! tests/test_input_poisson.py --- test_input: failed! tests/test_elasticity_small_strain.py --- test_get_solution: failed! +++ test_linear_terms: ok tests/test_quadratures.py --- test_problemCreation: failed! tests/test_io.py +++ test_recursiveDictHDF5: ok --- test_sparseMatrixHDF5: failed! tests/test_parsing.py --- test_parseEquations: failed! +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py --- test_input: failed! tests/test_lcbc_2d.py --- test_linearRigidBodyBC: failed! tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py --- test_input: failed! tests/test_input_time_poisson.py --- test_input: failed! tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py --- test_linearRigidBodyBC: failed! tests/test_input_sinbc.py --- test_input: failed! tests/test_meshio.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 7.65 s, 14 failure(s) of 23 test(s)
What do I need to do to get this fixed?
Thanks for your interest and for trying it out!
This seems to me like some internal problem in sfepy. Robert, do you have any ideas what's wrong?
I can just suggest you the usual -- use a debugger like winpdb and try to figure out where the problem is. I would have to do the same here. If you have more questions, ask, maybe I'll be able to answer some. :)
Ondrej
I have poked around using pdb and am generally confused:
calling this ipdb> Optional( delimitedList( variable ),default = [] ) Out[2]: [W:(abcd...,abcd...),...] just before the line that causes the problem is fine, but executing this line
/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/sfe/fem/parseEq.py(79)createBNF() 78 + Optional( delimitedList( variable ), ---> 79 default = [] )( "args" ) + ")" 80 term.setParseAction( collectTerm( termDescs, lc, itps ) )
ipdb> l
74 + ident( "region" ) + "." +
flag( "flag" ) |
75 ident( "integral" ) + "." +
ident( "region" ) |
76 ident( "region" )
77 )))( "termDesc" ) + "("
78 + Optional( delimitedList( variable ),
---> 79 default = [] )( "args" ) + ")"
80 term.setParseAction( collectTerm( termDescs, lc, itps ) )
81
82 rhs1 = equal + OneOrMore( term )
83 rhs2 = equal + zero
84 equation = StringStart() + OneOrMore( term )\
produces:
ipdb> n TypeError: "'Optional' object is not callable"
any ides?
Ryan
On Wed, May 14, 2008 at 1:14 PM, Ondrej Certik <ond...@certik.cz> wrote:
On Wed, May 14, 2008 at 7:46 PM, RyanGT <ryan...@gmail.com> wrote:
I have correctly installed and tested SfePy on my desktop. I am having issues on my laptop. Both are running Ubuntu Gutsy. I think I followed the same procedure on both. make finishes on both machines without errors. Here is the output of trying to run "python simple.py input/poisson.py":
ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python simple.py input/poisson.py sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.03 s sfe: setting up domain edges... sfe: ...done in 0.02 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 Traceback (most recent call last): File "simple.py", line 106, in <module> main() File "simple.py", line 98, in main dpb, vecDP, data = solveDirect( conf, options ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 155, in solveDirect pb, state, data = solveStationary( conf, saveNames = saveNames ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 55, in solveStationary problem = ProblemDefinition.fromConf( conf ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 67, in fromConf obj.setEquations( conf.equations ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 133, in setEquations equations.parseTerms( self.domain.regions ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 147, in parseTerms eq.parseTerms( regions, self.caches ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 230, in parseTerms terms = parseTerms( regions, self.desc, self.itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 26, in parseTerms bnf = createBNF( termDescs, itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/parseEq.py", line 79, in createBNF default = [] )( "args" ) + ")" TypeError: 'Optional' object is not callable
So, it seems like something is missing, but I don't know what sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] means.
Here is the output of "python runTests.py": ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py --- test_input: failed! tests/test_input_octahedron.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 --- test_input: failed! tests/test_input_navier_stokes.py --- test_input: failed! tests/test_input_poisson.py --- test_input: failed! tests/test_elasticity_small_strain.py --- test_get_solution: failed! +++ test_linear_terms: ok tests/test_quadratures.py --- test_problemCreation: failed! tests/test_io.py +++ test_recursiveDictHDF5: ok --- test_sparseMatrixHDF5: failed! tests/test_parsing.py --- test_parseEquations: failed! +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py --- test_input: failed! tests/test_lcbc_2d.py --- test_linearRigidBodyBC: failed! tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py --- test_input: failed! tests/test_input_time_poisson.py --- test_input: failed! tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py --- test_linearRigidBodyBC: failed! tests/test_input_sinbc.py --- test_input: failed! tests/test_meshio.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 7.65 s, 14 failure(s) of 23 test(s)
What do I need to do to get this fixed?
Thanks for your interest and for trying it out!
This seems to me like some internal problem in sfepy. Robert, do you have any ideas what's wrong?
I can just suggest you the usual -- use a debugger like winpdb and try to figure out where the problem is. I would have to do the same here. If you have more questions, ask, maybe I'll be able to answer some. :)
Ondrej
On Thu, May 15, 2008 at 12:30 AM, Ryan Krauss <ryan...@gmail.com> wrote:
I have poked around using pdb and am generally confused:
calling this ipdb> Optional( delimitedList( variable ),default = [] ) Out[2]: [W:(abcd...,abcd...),...] just before the line that causes the problem is fine, but executing this line
/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/sfe/fem/parseEq.py(79)createBNF() 78 + Optional( delimitedList( variable ), ---> 79 default = [] )( "args" ) + ")" 80 term.setParseAction( collectTerm( termDescs, lc, itps ) )
ipdb> l 74 + ident( "region" ) + "." + flag( "flag" ) | 75 ident( "integral" ) + "." + ident( "region" ) | 76 ident( "region" ) 77 )))( "termDesc" ) + "("
78 + Optional( delimitedList( variable ), ---> 79 default = [] )( "args" ) + ")" 80 term.setParseAction( collectTerm( termDescs, lc, itps ) ) 81 82 rhs1 = equal + OneOrMore( term ) 83 rhs2 = equal + zero 84 equation = StringStart() + OneOrMore( term )\produces:
ipdb> n TypeError: "'Optional' object is not callable"
any ides?
Yes. The problematic line is this one:
term = Optional( Literal( '+' ) | Literal( '-' ), default = '+' )( "sign" )\
+ Combine( ident( "name" )\
+ Optional( "." + (ident( "integral" ) + "."
+ ident( "region" ) + "." + flag( "flag" ) |
ident( "integral" ) + "." + ident(
"region" ) |
ident( "region" )
)))( "termDesc" ) + "("
+ Optional( delimitedList( variable ),
default = [] )( "args" ) + ")"
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Ondrej
Ondrej Certik wrote:
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Yes, pyparsing is the problem, but it is not a bug. Optional class was made callable very recently -> all that needs to be done is to install the latest version of pyparsing.
thanks for giving assistance when I was away :) r.
I must not have the same version installed on both computers. Weird. I will update and report back.
On Thu, May 15, 2008 at 10:54 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ondrej Certik wrote:
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Yes, pyparsing is the problem, but it is not a bug. Optional class was made callable very recently -> all that needs to be done is to install the latest version of pyparsing.
thanks for giving assistance when I was away :) r.
I have updated pyparsing on my laptop and am past that problem. I have a new one though:
<type 'exceptions.NameError'>: global name 'UMFPACK_CONTROL' is not defined WARNING: Failure executing file: <simple.py>
coming from
/usr/lib/python2.5/site-packages/scikits/umfpack/umfpack.py in __init__(self, family, **kwargs) 283 self.family = family 284 print('just before UMFPACK_CONTROL') --> 285 self.control = nm.zeros( (UMFPACK_CONTROL, ), dtype = nm.double ) 286 print('just after UMFPACK_CONTROL') 287 print('UMFPACK_CONTROL='+str(UMFPACK_CONTROL))
(the line numbers are probably a bit off since I added some print statements to help me debug).
It seems the problem stems from here:
umfDefines = updateDictWithVars( {}, _um, 'UMFPACK_.*' )
(around line 180 of umfpack.py)
because: _um = None
after this try/except clause at the beginning of umfpack.py: try: # Silence import error. import _umfpack as _um except: _um = None
both computers have umpack installed from scikits svn. And both have the same version of scipy from svn a month or so ago. But my desktop allows import _umfpack and my laptop doesn't.
Any help? Where does _umfpack come from?
Ryan
On Thu, May 15, 2008 at 11:50 AM, Ryan Krauss <ryan...@gmail.com> wrote:
I must not have the same version installed on both computers. Weird. I will update and report back.
On Thu, May 15, 2008 at 10:54 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ondrej Certik wrote:
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Yes, pyparsing is the problem, but it is not a bug. Optional class was made callable very recently -> all that needs to be done is to install the latest version of pyparsing.
thanks for giving assistance when I was away :) r.
I am continuing to plug along. I guess it is a good thing my desktop installation went smoothly or I might have bailed out. I went into my package manager and installed umfpack and then re-bulit and re-installed umpack.py. I got over my previous hurdle, but now came up with a new one:
/usr/lib/python2.5/site-packages/scipy/sparse/sparsetools.py in csr_matvec(*args) 590 npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx) 591 """ --> 592 return _sparsetools.csr_matvec(*args) 593 594 def csc_matvec(*args):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'csr_matvec' WARNING: Failure executing file: <simple.py>
On Thu, May 15, 2008 at 2:28 PM, Ryan Krauss <ryan...@gmail.com> wrote:
I have updated pyparsing on my laptop and am past that problem. I have a new one though:
<type 'exceptions.NameError'>: global name 'UMFPACK_CONTROL' is not defined WARNING: Failure executing file: <simple.py>
coming from
/usr/lib/python2.5/site-packages/scikits/umfpack/umfpack.py in __init__(self, family, **kwargs) 283 self.family = family 284 print('just before UMFPACK_CONTROL') --> 285 self.control = nm.zeros( (UMFPACK_CONTROL, ), dtype = nm.double ) 286 print('just after UMFPACK_CONTROL') 287 print('UMFPACK_CONTROL='+str(UMFPACK_CONTROL))
(the line numbers are probably a bit off since I added some print statements to help me debug).
It seems the problem stems from here:
umfDefines = updateDictWithVars( {}, _um, 'UMFPACK_.*' )
(around line 180 of umfpack.py)
because: _um = None
after this try/except clause at the beginning of umfpack.py: try: # Silence import error. import _umfpack as _um except: _um = None
both computers have umpack installed from scikits svn. And both have the same version of scipy from svn a month or so ago. But my desktop allows import _umfpack and my laptop doesn't.
Any help? Where does _umfpack come from?
Ryan
On Thu, May 15, 2008 at 11:50 AM, Ryan Krauss <ryan...@gmail.com> wrote:
I must not have the same version installed on both computers. Weird. I will update and report back.
On Thu, May 15, 2008 at 10:54 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ondrej Certik wrote:
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Yes, pyparsing is the problem, but it is not a bug. Optional class was made callable very recently -> all that needs to be done is to install the latest version of pyparsing.
thanks for giving assistance when I was away :) r.
I will now ask about scipy/sparse on the scipy mailing list. That seems to be the source of my current problem. I just tried rebuilding and re-installing from source, but _sparsetools.so didn't change.
Ryan
On Thu, May 15, 2008 at 2:42 PM, Ryan Krauss <ryan...@gmail.com> wrote:
I am continuing to plug along. I guess it is a good thing my desktop installation went smoothly or I might have bailed out. I went into my package manager and installed umfpack and then re-bulit and re-installed umpack.py. I got over my previous hurdle, but now came up with a new one:
/usr/lib/python2.5/site-packages/scipy/sparse/sparsetools.py in csr_matvec(*args) 590 npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx) 591 """ --> 592 return _sparsetools.csr_matvec(*args) 593 594 def csc_matvec(*args):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'csr_matvec' WARNING: Failure executing file: <simple.py>
On Thu, May 15, 2008 at 2:28 PM, Ryan Krauss <ryan...@gmail.com> wrote:
I have updated pyparsing on my laptop and am past that problem. I have a new one though:
<type 'exceptions.NameError'>: global name 'UMFPACK_CONTROL' is not defined WARNING: Failure executing file: <simple.py>
coming from
/usr/lib/python2.5/site-packages/scikits/umfpack/umfpack.py in __init__(self, family, **kwargs) 283 self.family = family 284 print('just before UMFPACK_CONTROL') --> 285 self.control = nm.zeros( (UMFPACK_CONTROL, ), dtype = nm.double ) 286 print('just after UMFPACK_CONTROL') 287 print('UMFPACK_CONTROL='+str(UMFPACK_CONTROL))
(the line numbers are probably a bit off since I added some print statements to help me debug).
It seems the problem stems from here:
umfDefines = updateDictWithVars( {}, _um, 'UMFPACK_.*' )
(around line 180 of umfpack.py)
because: _um = None
after this try/except clause at the beginning of umfpack.py: try: # Silence import error. import _umfpack as _um except: _um = None
both computers have umpack installed from scikits svn. And both have the same version of scipy from svn a month or so ago. But my desktop allows import _umfpack and my laptop doesn't.
Any help? Where does _umfpack come from?
Ryan
On Thu, May 15, 2008 at 11:50 AM, Ryan Krauss <ryan...@gmail.com> wrote:
I must not have the same version installed on both computers. Weird. I will update and report back.
On Thu, May 15, 2008 at 10:54 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ondrej Certik wrote:
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Yes, pyparsing is the problem, but it is not a bug. Optional class was made callable very recently -> all that needs to be done is to install the latest version of pyparsing.
thanks for giving assistance when I was away :) r.
>>
O.K. Sorry that I am mostly talking to myself now, but I think I have everything working. Removing and old _sparsetools.so and reinstalling scipy seems to have solved my problem.
Here is the result of simple.py input/poisson.py (from my laptop):
sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+|epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.01 s sfe: setting up domain edges... sfe: ...done in 0.01 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 sfe: describing geometries... sfe: ...done in 0.00 s sfe: setting up dof connectivities... sfe: ...done in 0.00 s sfe: using solvers: nls: newton ls: ls sfe: matrix shape: (300, 300) sfe: assembling matrix graph... sfe: ...done in 0.01 s sfe: updating materials... sfe: coef sfe: ...done in 0.00 s just before UMFPACK_CONTROL just after UMFPACK_CONTROL UMFPACK_CONTROL=20 nls: iter: 0, out-of-balance: 1.176265e-01 (rel: 1.000000e+00) rezidual: 0.00 [s] solve: 0.01 [s] matrix: 0.00 [s] nls: iter: 1, out-of-balance: 9.921083e-17 (rel: 8.434392e-16)
And here is the result of runTests.py: In [3]: run runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py +++ test_input: ok tests/test_input_octahedron.py nodes: 100% |###################################################| Time: 00:00:00 elements: 100% |################################################| Time: 00:00:01 +++ test_input: ok tests/test_input_navier_stokes.py +++ test_input: ok tests/test_input_poisson.py +++ test_input: ok tests/test_elasticity_small_strain.py +++ test_get_solution: ok +++ test_linear_terms: ok tests/test_quadratures.py +++ test_problemCreation: ok tests/test_io.py +++ test_recursiveDictHDF5: ok /usr/lib/python2.5/site-packages/scipy/sparse/compressed.py:28: DeprecationWarning: dims= is deprecated, use shape= instead warn("dims= is deprecated, use shape= instead", DeprecationWarning) +++ test_sparseMatrixHDF5: ok tests/test_parsing.py +++ test_parseEquations: ok +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py +++ test_input: ok tests/test_lcbc_2d.py +++ test_linearRigidBodyBC: ok tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py +++ test_input: ok tests/test_input_time_poisson.py +++ test_input: ok tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py +++ test_linearRigidBodyBC: ok tests/test_input_sinbc.py +++ test_input: ok tests/test_meshio.py nodes: 100% |###################################################| Time: 00:00:00 elements: 100% |################################################| Time: 00:00:00 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 35.84 s, 0 failure(s) of 23 test(s)
Thanks for your help,
Ryan On Thu, May 15, 2008 at 2:51 PM, Ryan Krauss <ryan...@gmail.com> wrote:
I will now ask about scipy/sparse on the scipy mailing list. That seems to be the source of my current problem. I just tried rebuilding and re-installing from source, but _sparsetools.so didn't change.
Ryan
On Thu, May 15, 2008 at 2:42 PM, Ryan Krauss <ryan...@gmail.com> wrote:
I am continuing to plug along. I guess it is a good thing my desktop installation went smoothly or I might have bailed out. I went into my package manager and installed umfpack and then re-bulit and re-installed umpack.py. I got over my previous hurdle, but now came up with a new one:
/usr/lib/python2.5/site-packages/scipy/sparse/sparsetools.py in csr_matvec(*args) 590 npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx) 591 """ --> 592 return _sparsetools.csr_matvec(*args) 593 594 def csc_matvec(*args):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'csr_matvec' WARNING: Failure executing file: <simple.py>
On Thu, May 15, 2008 at 2:28 PM, Ryan Krauss <ryan...@gmail.com> wrote:
I have updated pyparsing on my laptop and am past that problem. I have a new one though:
<type 'exceptions.NameError'>: global name 'UMFPACK_CONTROL' is not defined WARNING: Failure executing file: <simple.py>
coming from
/usr/lib/python2.5/site-packages/scikits/umfpack/umfpack.py in __init__(self, family, **kwargs) 283 self.family = family 284 print('just before UMFPACK_CONTROL') --> 285 self.control = nm.zeros( (UMFPACK_CONTROL, ), dtype = nm.double ) 286 print('just after UMFPACK_CONTROL') 287 print('UMFPACK_CONTROL='+str(UMFPACK_CONTROL))
(the line numbers are probably a bit off since I added some print statements to help me debug).
It seems the problem stems from here:
umfDefines = updateDictWithVars( {}, _um, 'UMFPACK_.*' )
(around line 180 of umfpack.py)
because: _um = None
after this try/except clause at the beginning of umfpack.py: try: # Silence import error. import _umfpack as _um except: _um = None
both computers have umpack installed from scikits svn. And both have the same version of scipy from svn a month or so ago. But my desktop allows import _umfpack and my laptop doesn't.
Any help? Where does _umfpack come from?
Ryan
On Thu, May 15, 2008 at 11:50 AM, Ryan Krauss <ryan...@gmail.com> wrote:
I must not have the same version installed on both computers. Weird. I will update and report back.
On Thu, May 15, 2008 at 10:54 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ondrej Certik wrote:
as you can see, there are 3 calls to Optional. Try to run each of them in pdb exactly as you did for the last one. I am sure some will blow up. If not, run the whole line in pdb. Post here the results, I'll help you further. It may well be a bug in pyparsing, but first we need to figure out how to reproduce it besides just your laptop.
Yes, pyparsing is the problem, but it is not a bug. Optional class was made callable very recently -> all that needs to be done is to install the latest version of pyparsing.
thanks for giving assistance when I was away :) r.
>>>>
On Thu, May 15, 2008 at 10:30 PM, Ryan Krauss <ryan...@gmail.com> wrote:
O.K. Sorry that I am mostly talking to myself now, but I think I have everything working. Removing and old _sparsetools.so and reinstalling scipy seems to have solved my problem.
Here is the result of simple.py input/poisson.py (from my laptop):
sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+|epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.01 s sfe: setting up domain edges... sfe: ...done in 0.01 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 sfe: describing geometries... sfe: ...done in 0.00 s sfe: setting up dof connectivities... sfe: ...done in 0.00 s sfe: using solvers: nls: newton ls: ls sfe: matrix shape: (300, 300) sfe: assembling matrix graph... sfe: ...done in 0.01 s sfe: updating materials... sfe: coef sfe: ...done in 0.00 s just before UMFPACK_CONTROL just after UMFPACK_CONTROL UMFPACK_CONTROL=20 nls: iter: 0, out-of-balance: 1.176265e-01 (rel: 1.000000e+00) rezidual: 0.00 [s] solve: 0.01 [s] matrix: 0.00 [s] nls: iter: 1, out-of-balance: 9.921083e-17 (rel: 8.434392e-16)
And here is the result of runTests.py: In [3]: run runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py +++ test_input: ok tests/test_input_octahedron.py nodes: 100% |###################################################| Time: 00:00:00 elements: 100% |################################################| Time: 00:00:01 +++ test_input: ok tests/test_input_navier_stokes.py +++ test_input: ok tests/test_input_poisson.py +++ test_input: ok tests/test_elasticity_small_strain.py +++ test_get_solution: ok +++ test_linear_terms: ok tests/test_quadratures.py +++ test_problemCreation: ok tests/test_io.py +++ test_recursiveDictHDF5: ok /usr/lib/python2.5/site-packages/scipy/sparse/compressed.py:28: DeprecationWarning: dims= is deprecated, use shape= instead warn("dims= is deprecated, use shape= instead", DeprecationWarning) +++ test_sparseMatrixHDF5: ok tests/test_parsing.py +++ test_parseEquations: ok +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py +++ test_input: ok tests/test_lcbc_2d.py +++ test_linearRigidBodyBC: ok tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py +++ test_input: ok tests/test_input_time_poisson.py +++ test_input: ok tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py +++ test_linearRigidBodyBC: ok tests/test_input_sinbc.py +++ test_input: ok tests/test_meshio.py nodes: 100% |###################################################| Time: 00:00:00 elements: 100% |################################################| Time: 00:00:00 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 35.84 s, 0 failure(s) of 23 test(s)
Thanks for your help,
Thanks for figuring everything out. Which system are you using? If you use Debian or Ubuntu, just install the regular python-scipy package and it should just work.
Ondrej
I am running Ubuntu, but have gotten in the habit of building scipy from source. I needed a few bleeding edge features back in the day.
On Thu, May 15, 2008 at 3:54 PM, Ondrej Certik <ond...@certik.cz> wrote:
On Thu, May 15, 2008 at 10:30 PM, Ryan Krauss <ryan...@gmail.com> wrote:
O.K. Sorry that I am mostly talking to myself now, but I think I have everything working. Removing and old _sparsetools.so and reinstalling scipy seems to have solved my problem.
Here is the result of simple.py input/poisson.py (from my laptop):
sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+|epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.01 s sfe: setting up domain edges... sfe: ...done in 0.01 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 sfe: describing geometries... sfe: ...done in 0.00 s sfe: setting up dof connectivities... sfe: ...done in 0.00 s sfe: using solvers: nls: newton ls: ls sfe: matrix shape: (300, 300) sfe: assembling matrix graph... sfe: ...done in 0.01 s sfe: updating materials... sfe: coef sfe: ...done in 0.00 s just before UMFPACK_CONTROL just after UMFPACK_CONTROL UMFPACK_CONTROL=20 nls: iter: 0, out-of-balance: 1.176265e-01 (rel: 1.000000e+00) rezidual: 0.00 [s] solve: 0.01 [s] matrix: 0.00 [s] nls: iter: 1, out-of-balance: 9.921083e-17 (rel: 8.434392e-16)
And here is the result of runTests.py: In [3]: run runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py +++ test_input: ok tests/test_input_octahedron.py nodes: 100% |###################################################| Time: 00:00:00 elements: 100% |################################################| Time: 00:00:01 +++ test_input: ok tests/test_input_navier_stokes.py +++ test_input: ok tests/test_input_poisson.py +++ test_input: ok tests/test_elasticity_small_strain.py +++ test_get_solution: ok +++ test_linear_terms: ok tests/test_quadratures.py +++ test_problemCreation: ok tests/test_io.py +++ test_recursiveDictHDF5: ok /usr/lib/python2.5/site-packages/scipy/sparse/compressed.py:28: DeprecationWarning: dims= is deprecated, use shape= instead warn("dims= is deprecated, use shape= instead", DeprecationWarning) +++ test_sparseMatrixHDF5: ok tests/test_parsing.py +++ test_parseEquations: ok +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py +++ test_input: ok tests/test_lcbc_2d.py +++ test_linearRigidBodyBC: ok tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py +++ test_input: ok tests/test_input_time_poisson.py +++ test_input: ok tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py +++ test_linearRigidBodyBC: ok tests/test_input_sinbc.py +++ test_input: ok tests/test_meshio.py nodes: 100% |###################################################| Time: 00:00:00 elements: 100% |################################################| Time: 00:00:00 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 35.84 s, 0 failure(s) of 23 test(s)
Thanks for your help,
Thanks for figuring everything out. Which system are you using? If you use Debian or Ubuntu, just install the regular python-scipy package and it should just work.
Ondrej
Ryan Krauss wrote:
O.K. Sorry that I am mostly talking to myself now, but I think I have everything working. Removing and old _sparsetools.so and reinstalling scipy seems to have solved my problem.
Great, thanks for fighting your way through the installation issues. We try to respond immediately, but all people that could answer work in the European time zone, so for you the answers probably come too late. (Ondrej is an exception, he works all the time :)
r.
all people that could answer work in the European time zone
I think I knew that, but will defintely keep it in mind for future issues. I'll post my problems when I go to bed and wake up to solutions :)- (I am in the St. Louis area in US central time).
Ryan
On Fri, May 16, 2008 at 3:39 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ryan Krauss wrote:
O.K. Sorry that I am mostly talking to myself now, but I think I have everything working. Removing and old _sparsetools.so and reinstalling scipy seems to have solved my problem.
Great, thanks for fighting your way through the installation issues. We try to respond immediately, but all people that could answer work in the European time zone, so for you the answers probably come too late. (Ondrej is an exception, he works all the time :)
r.
Ryan Krauss wrote:
I think I knew that, but will defintely keep it in mind for future issues. I'll post my problems when I go to bed and wake up to solutions :)- (I am in the St. Louis area in US central time).
You have a way of checking I am online: look at irc channel #sfepy at Freenode.
BTW. May is not the greatest month to get assistance fast. While I have been sitting in my office for the rest of the year, now I am going to visit conferences/seminars every week, till june 6, with only small gaps. I hope I will have net access next week to get you running in the right direction :-)
r.
No problem. I am actually on vacation next week and am working on a paper draft that is due June 2. So, I appreciate knowing you will be more available later on, and things will really pick up for me after June 2.
On Fri, May 16, 2008 at 10:19 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Ryan Krauss wrote:
I think I knew that, but will defintely keep it in mind for future issues. I'll post my problems when I go to bed and wake up to solutions :)- (I am in the St. Louis area in US central time).
You have a way of checking I am online: look at irc channel #sfepy at Freenode.
BTW. May is not the greatest month to get assistance fast. While I have been sitting in my office for the rest of the year, now I am going to visit conferences/seminars every week, till june 6, with only small gaps. I hope I will have net access next week to get you running in the right direction :-)
r.
Hi Ryan,
sorry for late reply, I was at a conference and the net connection was really a pain there...
It looks like you have installed an old version of pyparsing. I use 1.4.10, so you should try at least this version or newer.
thanks for your interest!
cheers, r.
RyanGT wrote:
I have correctly installed and tested SfePy on my desktop. I am having issues on my laptop. Both are running Ubuntu Gutsy. I think I followed the same procedure on both. make finishes on both machines without errors. Here is the output of trying to run "python simple.py input/poisson.py":
ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python simple.py input/poisson.py sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.03 s sfe: setting up domain edges... sfe: ...done in 0.02 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 Traceback (most recent call last): File "simple.py", line 106, in <module> main() File "simple.py", line 98, in main dpb, vecDP, data = solveDirect( conf, options ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 155, in solveDirect pb, state, data = solveStationary( conf, saveNames = saveNames ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 55, in solveStationary problem = ProblemDefinition.fromConf( conf ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 67, in fromConf obj.setEquations( conf.equations ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 133, in setEquations equations.parseTerms( self.domain.regions ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 147, in parseTerms eq.parseTerms( regions, self.caches ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 230, in parseTerms terms = parseTerms( regions, self.desc, self.itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 26, in parseTerms bnf = createBNF( termDescs, itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/parseEq.py", line 79, in createBNF default = [] )( "args" ) + ")" TypeError: 'Optional' object is not callable
So, it seems like something is missing, but I don't know what sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] means.
Here is the output of "python runTests.py": ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py --- test_input: failed! tests/test_input_octahedron.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 --- test_input: failed! tests/test_input_navier_stokes.py --- test_input: failed! tests/test_input_poisson.py --- test_input: failed! tests/test_elasticity_small_strain.py --- test_get_solution: failed! +++ test_linear_terms: ok tests/test_quadratures.py --- test_problemCreation: failed! tests/test_io.py +++ test_recursiveDictHDF5: ok --- test_sparseMatrixHDF5: failed! tests/test_parsing.py --- test_parseEquations: failed! +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py --- test_input: failed! tests/test_lcbc_2d.py --- test_linearRigidBodyBC: failed! tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py --- test_input: failed! tests/test_input_time_poisson.py --- test_input: failed! tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py --- test_linearRigidBodyBC: failed! tests/test_input_sinbc.py --- test_input: failed! tests/test_meshio.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 7.65 s, 14 failure(s) of 23 test(s)
What do I need to do to get this fixed?
Thanks,
Ryan
participants (4)
-
Ondrej Certik
-
Robert Cimrman
-
Ryan Krauss
-
RyanGT