Hi Robert, Ondrej,
Finally I was able to re-build numpy/scipy and tried the new version of sfepy. Even during building of scipy, whenever a fortran or f2py based shared lib to be built, I need to manually insert "-shared" to the command (that is after it fails to build an executable! . Same with sfepy physics module. But tests did run and two failed : ... tests/test_lcbc_2d.py --- test_linear_rigid_body_bc: failed! tests/test_lcbc_3d.py --- test_linear_rigid_body_bc: failed! ... expected?
Regards, -osman
osman wrote:
Hi Robert, Ondrej,
Finally I was able to re-build numpy/scipy and tried the new version of sfepy. Even during building of scipy, whenever a fortran or f2py based shared lib to be built, I need to manually insert "-shared" to the command (that is after it fails to build an executable! . Same with sfepy physics module. But tests did run and two failed :
I will make this configurable via site_cfg.py, thanks for the report, see http://code.google.com/p/sfepy/issues/detail?id=54
... tests/test_lcbc_2d.py --- test_linear_rigid_body_bc: failed! tests/test_lcbc_3d.py --- test_linear_rigid_body_bc: failed! ... expected?
All tests should pass. Could you try
./runTests.py tests/test_lcbc_2d.py --debug
and report back the output, thanks!
r.
All tests should pass. Could you try
./runTests.py tests/test_lcbc_2d.py --debug
test instance prepared (1 test(s)) sfepy: reading mesh (database/phono/mesh_circ21.mesh)... sfepy: ...done in 0.04 s sfepy: setting up domain edges... sfepy: ...done in 0.03 s sfepy: creating regions... sfepy: leaf Bottom region_10 sfepy: leaf Top region_11 sfepy: leaf Y region_1000 sfepy: leaf Y1 region_1 sfepy: leaf Y3 region_3 sfepy: leaf Y2 region_2 sfepy: ...done in 0.10 s sfepy: equation "balance": sfepy: dw_lin_elastic_iso.i1.Y( solid.lame, v, u ) = 0 sfepy: describing geometries... sfepy: ...done in 0.02 s sfepy: setting up dof connectivities... sfepy: ...done in 0.00 s sfepy: using solvers: nls: newton ls: ls u rigid1 Y2 (953,) u rigid2 Y3 (407,) 8406 5692 2720 5686 <type 'exceptions.ValueError'> Traceback (most recent call last): File "./runTests.py", line 222, in <module> main() File "./runTests.py", line 210, in main stats = run_test( test_filename, options ) File "./runTests.py", line 111, in run_test ok, n_fail, n_total = test.run( options.debug ) File "/home/osman/sfepy-release-00.50.00/sfepy/base/testing.py", line 38, in run ret = test_method() File "tests/testsBasic.py", line 104, in test_linear_rigid_body_bc nls_status = status ) File "/home/osman/sfepy-release-00.50.00/sfepy/solvers/generic.py",
stargate:/home/osman/sfepy-release-00.50.00-bash-> ./runTests.py tests/test_lcbc_2d.py --debug /usr/lib/python2.5/site-packages/scipy/sparse/linalg/dsolve/linsolve.py:20: DeprecationWarning: scipy.sparse.linalg.dsolve.umfpack will be removed, install scikits.umfpack instead ' install scikits.umfpack instead', DeprecationWarning ) <<< tests/test_lcbc_2d.py sfepy: left over: ['__builtins__', '__file__', '__name__', 'TestLCBC', 'output_name', '__doc__'] line 57, in solve_stationary problem.time_update( None ) File "/home/osman/sfepy-release-00.50.00/sfepy/fem/problemDef.py", line 259, in time_update create_matrix ) File "/home/osman/sfepy-release-00.50.00/sfepy/fem/problemDef.py", line 217, in update_bc self.variables.setup_lcbc_operators( conf_lcbc, self.domain.regions ) File "/home/osman/sfepy-release-00.50.00/sfepy/fem/variables.py", line 329, in setup_lcbc_operators mtx_lc[indx,icols] = op_lc File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 297, in __setitem__ if isspmatrix(x) and index == (slice(None), slice(None)): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() stargate:/home/osman/sfepy-release-00.50.00-bash->
On Thu, Sep 4, 2008 at 2:51 AM, osman <os...@fuse.net> wrote:
All tests should pass. Could you try
./runTests.py tests/test_lcbc_2d.py --debug
test instance prepared (1 test(s)) sfepy: reading mesh (database/phono/mesh_circ21.mesh)... sfepy: ...done in 0.04 s sfepy: setting up domain edges... sfepy: ...done in 0.03 s sfepy: creating regions... sfepy: leaf Bottom region_10 sfepy: leaf Top region_11 sfepy: leaf Y region_1000 sfepy: leaf Y1 region_1 sfepy: leaf Y3 region_3 sfepy: leaf Y2 region_2 sfepy: ...done in 0.10 s sfepy: equation "balance": sfepy: dw_lin_elastic_iso.i1.Y( solid.lame, v, u ) = 0 sfepy: describing geometries... sfepy: ...done in 0.02 s sfepy: setting up dof connectivities... sfepy: ...done in 0.00 s sfepy: using solvers: nls: newton ls: ls u rigid1 Y2 (953,) u rigid2 Y3 (407,) 8406 5692 2720 5686 <type 'exceptions.ValueError'> Traceback (most recent call last): File "./runTests.py", line 222, in <module>
stargate:/home/osman/sfepy-release-00.50.00-bash-> ./runTests.py tests/test_lcbc_2d.py --debug /usr/lib/python2.5/site-packages/scipy/sparse/linalg/dsolve/linsolve.py:20: DeprecationWarning: scipy.sparse.linalg.dsolve.umfpack will be removed, install scikits.umfpack instead ' install scikits.umfpack instead', DeprecationWarning ) <<< tests/test_lcbc_2d.py sfepy: left over: ['__builtins__', '__file__', '__name__', 'TestLCBC', 'output_name', '__doc__'] main() File "./runTests.py", line 210, in main stats = run_test( test_filename, options ) File "./runTests.py", line 111, in run_test ok, n_fail, n_total = test.run( options.debug ) File "/home/osman/sfepy-release-00.50.00/sfepy/base/testing.py", line 38, in run ret = test_method() File "tests/testsBasic.py", line 104, in test_linear_rigid_body_bc nls_status = status ) File "/home/osman/sfepy-release-00.50.00/sfepy/solvers/generic.py", line 57, in solve_stationary problem.time_update( None ) File "/home/osman/sfepy-release-00.50.00/sfepy/fem/problemDef.py", line 259, in time_update create_matrix ) File "/home/osman/sfepy-release-00.50.00/sfepy/fem/problemDef.py", line 217, in update_bc self.variables.setup_lcbc_operators( conf_lcbc, self.domain.regions ) File "/home/osman/sfepy-release-00.50.00/sfepy/fem/variables.py", line 329, in setup_lcbc_operators mtx_lc[indx,icols] = op_lc File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 297, in __setitem__ if isspmatrix(x) and index == (slice(None), slice(None)): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Which scipy version do you use?
In [1]: import scipy
In [2]: scipy.version.version Out[2]: '0.6.0'
if you use svn, which svn revision?
Ondrej
On Thu, 2008-09-04 at 08:35 +0200, Ondrej Certik wrote:
Which scipy version do you use?
In [1]: import scipy
In [2]: scipy.version.version Out[2]: '0.6.0'
if you use svn, which svn revision?
Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:43) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.version.version '0.7.0.dev4681'
The website required svn of the latest scipy.
svn --version svn, version 1.4.4 (r25188) compiled Sep 28 2007, 11:57:48
-osman
On Fri, Sep 5, 2008 at 1:34 AM, osman <os...@fuse.net> wrote:
On Thu, 2008-09-04 at 08:35 +0200, Ondrej Certik wrote:
Which scipy version do you use?
In [1]: import scipy
In [2]: scipy.version.version Out[2]: '0.6.0'
if you use svn, which svn revision?
Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:43) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.version.version '0.7.0.dev4681'
The website required svn of the latest scipy.
svn --version svn, version 1.4.4 (r25188) compiled Sep 28 2007, 11:57:48
Could you please try the scipy which is in Ubuntu? I hope it will work. Then we can figure out how to fix sfepy to also work with the latest scipy.
Ondrej
P,S, This is a nice example why we should never depend on a svn version of anything, because it will break sooner or later.
osman wrote:
All tests should pass. Could you try
./runTests.py tests/test_lcbc_2d.py --debug
stargate:/home/osman/sfepy-release-00.50.00-bash-> ./runTests.py tests/test_lcbc_2d.py --debug 329, in setup_lcbc_operators mtx_lc[indx,icols] = op_lc File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 297, in __setitem__ if isspmatrix(x) and index == (slice(None), slice(None)): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() stargate:/home/osman/sfepy-release-00.50.00-bash->
I see. It is a bug caused by a very recent change to LIL matrix. The patch below should fix it - I have sent it to Nathan Bell (current maintainer of scipy.sparse) for review, until then you can just use the last released version of scipy, or apply the patch yourself. r. --- scipy/sparse/lil.py (revision 4688) +++ scipy/sparse/lil.py (working copy) @@ -294,18 +294,20 @@ elif not isinstance(x, spmatrix): x = lil_matrix(x) - if isspmatrix(x) and index == (slice(None), slice(None)): - # self[:,:] = other_sparse - x = lil_matrix(x) - self.rows = x.rows - self.data = x.data - return - try: i, j = index except (ValueError, TypeError): raise IndexError, "invalid index" + if isspmatrix(x): + if (isinstance(i, slice) and (i == slice(None))) and \ + (isinstance(j, slice) and (j == slice(None))): + # self[:,:] = other_sparse + x = lil_matrix(x) + self.rows = x.rows + self.data = x.data + return + if isscalar(i): row = self.rows[i] data = self.data[i]
Ondrej Certik wrote:
On Fri, Sep 5, 2008 at 1:34 AM, osman <os...@fuse.net> wrote:
On Thu, 2008-09-04 at 08:35 +0200, Ondrej Certik wrote:
Which scipy version do you use?
In [1]: import scipy
In [2]: scipy.version.version Out[2]: '0.6.0'
if you use svn, which svn revision? Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:43) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.version.version '0.7.0.dev4681' The website required svn of the latest scipy.
svn --version svn, version 1.4.4 (r25188) compiled Sep 28 2007, 11:57:48
Could you please try the scipy which is in Ubuntu? I hope it will work. Then we can figure out how to fix sfepy to also work with the latest scipy.
Ondrej
P,S, This is a nice example why we should never depend on a svn version of anything, because it will break sooner or later.
Well, we have already relaxed that requirement, it's just not got propagated to the docs. SfePy should run _both_ with the last stable release of NumPy/SciPy and with the SVN version.
r.
Robert Cimrman wrote:
osman wrote:
All tests should pass. Could you try
./runTests.py tests/test_lcbc_2d.py --debug
stargate:/home/osman/sfepy-release-00.50.00-bash-> ./runTests.py tests/test_lcbc_2d.py --debug 329, in setup_lcbc_operators mtx_lc[indx,icols] = op_lc File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 297, in __setitem__ if isspmatrix(x) and index == (slice(None), slice(None)): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() stargate:/home/osman/sfepy-release-00.50.00-bash->
I see.
It is a bug caused by a very recent change to LIL matrix. The patch below should fix it - I have sent it to Nathan Bell (current maintainer of scipy.sparse) for review, until then you can just use the last released version of scipy, or apply the patch yourself.
It is fixed in scipy SVN now. '0.7.0.dev4691'
r.
On Fri, Sep 5, 2008 at 11:23 PM, osman <os...@fuse.net> wrote:
On Fri, 2008-09-05 at 18:29 +0200, Robert Cimrman wrote:
It is fixed in scipy SVN now. '0.7.0.dev4691'
Thanks Robert, all tests passed.
-osman
P.S. scipy in my ubuntu doesn't work with sfepy.
Which version of sfepy do you have in your ubuntu?
Ondrej
On Sat, 2008-09-06 at 01:13 +0200, Ondrej Certik wrote:
P.S. scipy in my ubuntu doesn't work with sfepy.
Which version of sfepy do you have in your ubuntu?
sfepy-release-00.50.00
my ubuntu is gutsy 64 bit on AMD
scipy did not/could not support umfpack for 64 bit. I think that's why I built my own from the latest svn.
-osman
osman wrote:
On Sat, 2008-09-06 at 01:13 +0200, Ondrej Certik wrote:
P.S. scipy in my ubuntu doesn't work with sfepy. Which version of sfepy do you have in your ubuntu?
sfepy-release-00.50.00
my ubuntu is gutsy 64 bit on AMD
scipy did not/could not support umfpack for 64 bit. I think that's why I built my own from the latest svn.
I see. So sfepy-release-00.50.00 + SVN scipy works for you now, right?
I will find time to look at the umfpack issue for 64 bits, as I did its wrappers for scipy.
r.
On Sat, Sep 6, 2008 at 4:34 PM, osman <os...@fuse.net> wrote:
On Sat, 2008-09-06 at 01:13 +0200, Ondrej Certik wrote:
P.S. scipy in my ubuntu doesn't work with sfepy.
Which version of sfepy do you have in your ubuntu?
sfepy-release-00.50.00
my ubuntu is gutsy 64 bit on AMD
scipy did not/could not support umfpack for 64 bit. I think that's why I built my own from the latest svn.
Ah, sorry, I meant to ask, which version of *scipy* you have. So you say that scipy + umfpack doesn't work on amd64? I use it in Debian on amd64 routinely and it seems to work and the ubuntu package is essentially the same. Generally, please report a bug in the ubuntu bug tracking system.
Ondrej
On Sat, 2008-09-06 at 16:41 +0200, Robert Cimrman wrote:
I see. So sfepy-release-00.50.00 + SVN scipy works for you now, right?
Yes. Latest svn of scipy (0.7.0.dev4692) and sfepy-release-00.50.00 works. Passes 31 tests. I was listening to your conversations with Ondrej, and thought that sfepy was now working with pre-built numpy/scipy. So I unloaded my working svn versions, and using apt-get installed the release ones. But for one reason or another I kept getting errors and for a while sfepy was not working for me. So I decided to go back and re-build svn versions. I needed to almost manually install the .so libs. Somehow python was not putting --shared to gfortran link call. I really hate this as I have no idea where this is coming from. With T the good old autoconf/make files at least you knew the culprit and you could fix the makefile(s). Robert, is the current sfepy capable of running the optimal flow problem found in your presentations?
-osman
On Sat, Sep 6, 2008 at 10:58 PM, osman <os...@fuse.net> wrote:
On Sat, 2008-09-06 at 16:41 +0200, Robert Cimrman wrote:
I see. So sfepy-release-00.50.00 + SVN scipy works for you now, right?
Yes. Latest svn of scipy (0.7.0.dev4692) and sfepy-release-00.50.00 works. Passes 31 tests. I was listening to your conversations with Ondrej, and thought that sfepy was now working with pre-built numpy/scipy. So I unloaded my working svn versions, and using apt-get installed the release ones. But for one reason or another I kept getting errors and for a while sfepy was not working for me. So I decided to go back and re-build svn versions. I needed to almost manually install the .so libs. Somehow python was not putting --shared to gfortran link call. I really hate
Yes, we need to get rid of the fortran code:
http://code.google.com/p/sfepy/issues/detail?id=55
I just was too busy, but we'll do it.
Ondrej
participants (3)
-
Ondrej Certik
-
osman
-
Robert Cimrman