![](https://secure.gravatar.com/avatar/2b1fbd0c1412f8a5a18ece0488196e0f.jpg?s=120&d=mm&r=g)
Hi Niels and Robert,
On Wed, Feb 10, 2010 at 4:08 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Hi Niels,
Niels L Ellegaard wrote:
I did a fres install of the newest sfepy from git (on debian sid), and I have trouble running ./runTests.py. Can you see if I am doing something wrong?
cd /home/niels/local/src/ && git clone git://git.sympy.org/sfepy.git && cd sfepy && make && ./runTests.py --debug
The same command sequence works for me. Could you send me more info? See below.
40 test file(s) executed in 52.13 s, 0 failure(s) of 55 test(s)
I'm also seeing this problem in sidux (based on debian sid). Using git bisect, it looks like the bug was introduced in commit c0e243c9.
./runTests.py --debug<<< directory: tests, test files: 40 <<< tests/test_lcbc_2d.py sfepy: left over: ['__builtins__', '__file__', '__name__', 'wy', 'wx', 'TestLCBC', 'top_dir', '_filename', 'output_name', '__doc__']
test instance prepared (1 test(s))
sfepy: reading mesh (/home/niels/local/src/sfepy/meshes/2d/special/ circle_in_square.mesh)... sfepy: ...done in 0.02 s sfepy: setting up domain edges... sfepy: ...done in 0.01 s sfepy: creating regions... sfepy: Bottom sfepy: Top sfepy: Y1 sfepy: Y sfepy: Y3 sfepy: Y2 sfepy: ...done in 0.02 s
<type 'exceptions.TypeError'>
Traceback (most recent call last): File "./runTests.py", line 226, in <module> main() File "./runTests.py", line 220, in main op.walk( options.test_dir, run_tests, stats ) File "/usr/lib/python2.5/posixpath.py", line 290, in walk func(arg, top, names) File "./runTests.py", line 148, in run_tests n_fail, n_total, test_time = run_test( conf_name, options ) File "./runTests.py", line 111, in run_test ok, n_fail, n_total = test.run( options.debug ) File "/home/niels/local/src/sfepy/sfepy/base/testing.py", line 38, in run ret = test_method() File "tests/testsBasic.py", line 107, in test_linear_rigid_body_bc nls_status = status ) File "/home/niels/local/src/sfepy/sfepy/solvers/generic.py", line 58, in solve_stationary problem = ProblemDefinition.from_conf( conf ) File "/home/niels/local/src/sfepy/sfepy/fem/problemDef.py", line 84, in from_conf obj.set_fields( conf.fields ) File "/home/niels/local/src/sfepy/sfepy/fem/problemDef.py", line 132, in set_fields self.fields = Fields.from_conf(conf_fields, self.domain.regions) File "/home/niels/local/src/sfepy/sfepy/fem/fields.py", line 19, in from_conf objs.append(Field.from_conf(val, regions)) File "/home/niels/local/src/sfepy/sfepy/fem/fields.py", line 88, in from_conf bases = conf.bases) File "/home/niels/local/src/sfepy/sfepy/fem/fields.py", line 137, in __init__ self.setup_coors() File "/home/niels/local/src/sfepy/sfepy/fem/fields.py", line 210, in setup_coors self.aps.setup_coors( self.domain.mesh, self.cnt_vn ) File "/home/niels/local/src/sfepy/sfepy/fem/fea.py", line 852, in setup_coors ap.eval_extra_coor( self.coors, mesh ) File "/home/niels/local/src/sfepy/sfepy/fem/fea.py", line 239, in eval_extra_coor bf = ginterp.poly_spaces['v'].eval_base(qp_coors) File "/home/niels/local/src/sfepy/sfepy/fem/poly_spaces.py", line 207, in eval_base eps=eps) File "/home/niels/local/src/sfepy/sfepy/fem/poly_spaces.py", line 325, in _eval_base self.mtx_i, bc, suppress_errors, eps) File "/home/niels/local/src/sfepy/sfepy/fem/extmods/fem.py", line 159, in eval_lagrange_simplex return _fem.eval_lagrange_simplex(*args) TypeError: unknown array type
The crucial line is the line 325 in sfepy/fem/poly_spaces.py, where numpy arrays are passed to a C function wrapped by swig. For this to work, the numpy array arguments must be C-contiguous. Could you check, please, the .flags attributes of base, coors, self.nodes, self.mtx_i and bc arguments?
For me, I get the following flags (using winpdb). It looks like the problem is in self.mtx_i? Can you confirm if you see the same flags, Niels?
eval base.flags C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False
eval coors.flags C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False
eval self.nodes.flags C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False
eval self.mtx_i.flags C_CONTIGUOUS : False F_CONTIGUOUS : True OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False
eval bc.flags C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False
Best regards, Logan