You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2007 |
Jan
(2) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(6) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(6) |
Oct
(8) |
Nov
(19) |
Dec
(2) |
2010 |
Jan
(4) |
Feb
(4) |
Mar
(17) |
Apr
(12) |
May
(10) |
Jun
(17) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(12) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
From: <av...@fa...> - 2012-02-10 01:40:08
|
Hi, I am running a simple script downloaded from ase website: #!/usr/bin/env python from ase import * from ase.calculators.siesta import Siesta from ase.optimize import BFGS h2o = data.molecules.molecule('H2O') h2o.center(vacuum =5) calc = Siesta(label = 'H2O', xc = 'PBE', meshcutoff =200 * units.Ry, basis = 'dz') h2o.set_calculator(calc) dyn = optimize.BFGS( h2o, trajectory='h2o.traj', logfile='bfgs.log') dyn.run(fmax =0.05) I got the following error: Traceback (most recent call last): File "CourseA.py", line 2, in <module> from ase import * File "/usr/lib/python2.7/dist-packages/ase/__init__.py", line 7, in <module> from ase.atom import Atom File "/usr/lib/python2.7/dist-packages/ase/atom.py", line 3, in <module> import numpy as np File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 137, in <module> import add_newdocs File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 9, in <module> from numpy.lib import add_newdoc File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 13, in <module> from polynomial import * File "/usr/local/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 17, in <module> from numpy.linalg import eigvals, lstsq File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/__init__.py", line 48, in <module> from linalg import * File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 23, in <module> from numpy.linalg import lapack_lite ImportError: libifport.so.5: cannot open shared object file: No such file or directory My notebook has ubuntu 11.10 x86_64 GNU/Linux I installed numpy and pysparse from source: $ python -c "import numpy; print numpy.__version__" 1.6.1 $ python -c "import pysparse; print pysparse.__version__" 1.2-dev224 When I checked the site.cfg files, I found the following: -in pysparse: [blas_opt] libraries = pf77blas, pcblas, atlas [lapack_opt] libraries = lapack, pf77blas, pcblas, atlas -in numpy the site.cfg file: [blas_opt] libraries = ptf77blas, ptcblas, atlas [lapack_opt] libraries = lapack, ptf77blas, ptcblas, atlas Are they properly set? Thanks Lucia |
From: Daniel W. <dan...@gm...> - 2012-02-03 15:04:33
|
I am not sure what the issue is, but it might be better to build pysparse against a version of python and numpy that is distributed and installed by the package manager for your system. Is there a numpy rpm available? If for some reason that doesn't work or isn't available, maybe try installing numpy by hand using the system python. You can try different options in a virtualenv if you use that rather than installing into your system directories. Certainly with enthought, it is better to install in a virtualenv rather than messing with the system directories while prototyping. Googling the actual issue, this may be a 32 versus 64 bit issue. < http://stackoverflow.com/questions/648482/a-trivial-python-swig-error-question > Maybe using a 32 bit distribution on a 64 bit platform is not the way to go (speculation). Is there not a 64 bit dist? Like it says in the link maybe try passing some of the 32 bit flags to gcc. Hope this helps in some way. On Thu, Feb 2, 2012 at 11:12 AM, Leland M Barnard <lmb...@wi...>wrote: > I'm trying to set up pysparse to run on a 64 bit red hat linux machine > (specifically Rocks v5.2). We have gcc v4.1.2. We also have the > Enthought python distribution v7.1-2 (32 bit). with python 2.7. > > I'm having trouble installing pysparse v1.1.1. When I use the command > > python setup.py install > > I receive this error message: > > running install > running build > running build_py > running build_ext > building 'pysparse.spmatrix' extension > gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1 > -DLENFUNC_OK=1 -IInclude > > -I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include > -I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c > Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o > In file included from > /share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58, > from Src/spmatrixmodule.c:1: > /share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: > error: > #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc > config?)." > error: command 'gcc' failed with exit status 1 > > I was hoping there might be someone else on the mailing list that > encountered this and might have a solution. Please let me know if there > is any more information I can supply that might be helpful in diagnosing > the trouble. Thanks! > > VTY, > Leland Barnard > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Pysparse-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysparse-users > -- Daniel Wheeler |
From: Leland M B. <lmb...@wi...> - 2012-02-02 16:12:50
|
I'm trying to set up pysparse to run on a 64 bit red hat linux machine (specifically Rocks v5.2). We have gcc v4.1.2. We also have the Enthought python distribution v7.1-2 (32 bit). with python 2.7. I'm having trouble installing pysparse v1.1.1. When I use the command python setup.py install I receive this error message: running install running build running build_py running build_ext building 'pysparse.spmatrix' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1 -DLENFUNC_OK=1 -IInclude -I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include -I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o In file included from /share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58, from Src/spmatrixmodule.c:1: /share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." error: command 'gcc' failed with exit status 1 I was hoping there might be someone else on the mailing list that encountered this and might have a solution. Please let me know if there is any more information I can supply that might be helpful in diagnosing the trouble. Thanks! VTY, Leland Barnard |
From: Dominique O. <dom...@gm...> - 2012-02-02 11:57:24
|
On Thursday, February 2, 2012, Xiayi Wang <wan...@gm...> wrote: > Hello, > > I am trying to install Fipy in my mac. But I got stocked at the step of installing pysparse. > I download pysparse 1.1.1 , but I cannot understand the instruction of installing. > Could you tell my have to install this in mac? Hi, Pip install pysparse should do the trick. Dominique -- Dominique |
From: Xiayi W. <wan...@gm...> - 2012-02-02 06:43:20
|
Hello, I am trying to install Fipy in my mac. But I got stocked at the step of installing pysparse. I download pysparse 1.1.1 , but I cannot understand the instruction of installing. Could you tell my have to install this in mac? Thanks Sherry |
From: Daniel W. <dan...@gm...> - 2012-01-17 16:19:02
|
On Tue, Jan 17, 2012 at 10:33 AM, list user <qua...@gm...> wrote: > I really don't want to use pythonxy or enthought python. My group > develops an application that is looking to ship FiPy for PDE solving. I don't think you have to make pythonxy or enthought python dependencies necessarily. I was just suggesting that pythonxy and enthought python (or entought tool suite) could be used in the compilation process for pysparse. I am assuming that you want to build a pysparse binary for Windows distribution. Once you build the .exe then the only dependency is the correct version of python and the correct version of numpy (pythonxy or enthought python necessarily won't be required). Adding an off-brand python dependency would not be ideal. OSX already > makes my life hard enough when it comes to python. OSX? I thought we were talking about windows. -- Daniel Wheeler |
From: list u. <qua...@gm...> - 2012-01-17 15:34:06
|
I really don't want to use pythonxy or enthought python. My group develops an application that is looking to ship FiPy for PDE solving. Adding an off-brand python dependency would not be ideal. OSX already makes my life hard enough when it comes to python. On Fri, Jan 13, 2012 at 10:12 AM, Daniel Wheeler <dan...@gm...>wrote: > On Wed, Jan 11, 2012 at 5:14 PM, list user <qua...@gm...> wrote: > >> Dear PySparse Users, >> >> I successfully compiled PySparse 1.1.1 (VS 9, Python27, NumPy 1.5.1) and >> installed to the python installation directory: >> C:\Python27\Lib\site-packages\pysparse . >> >> Importing pysparse goes smoothly but I can't import itsolvers or any >> other sub-modules. >> > > Hi, I've had exactly the same issues and I can't remember whether I solved > then or moved on. It may have been that I switched to using either pythonxy > or enthought python and that using one of these packages compilers fixed > things or did something differently. Which version of windows are you > using? > > >> from pysparse import itsolvers >> ImportError: DLL load failed: The specific module could not be found >> >> I thought maybe the PYTHONPATH variable would solve the problem but I >> still get the same ImportError fail. > > > >> I know other people have had similar problems but the solution was often >> to download precompiled version. >> > > I might look into this soon as I'm doing an imminent fipy release which > uses pysparse and I'll look into the pysparse-windows issues again. Sorry I > can't be more helpful. > > > -- > Daniel Wheeler > |
From: Daniel W. <dan...@gm...> - 2012-01-13 15:12:21
|
On Wed, Jan 11, 2012 at 5:14 PM, list user <qua...@gm...> wrote: > Dear PySparse Users, > > I successfully compiled PySparse 1.1.1 (VS 9, Python27, NumPy 1.5.1) and > installed to the python installation directory: > C:\Python27\Lib\site-packages\pysparse . > > Importing pysparse goes smoothly but I can't import itsolvers or any other > sub-modules. > Hi, I've had exactly the same issues and I can't remember whether I solved then or moved on. It may have been that I switched to using either pythonxy or enthought python and that using one of these packages compilers fixed things or did something differently. Which version of windows are you using? > from pysparse import itsolvers > ImportError: DLL load failed: The specific module could not be found > > I thought maybe the PYTHONPATH variable would solve the problem but I > still get the same ImportError fail. > I know other people have had similar problems but the solution was often > to download precompiled version. > I might look into this soon as I'm doing an imminent fipy release which uses pysparse and I'll look into the pysparse-windows issues again. Sorry I can't be more helpful. -- Daniel Wheeler |
From: list u. <qua...@gm...> - 2012-01-11 22:14:47
|
Dear PySparse Users, I successfully compiled PySparse 1.1.1 (VS 9, Python27, NumPy 1.5.1) and installed to the python installation directory: C:\Python27\Lib\site-packages\pysparse . Importing pysparse goes smoothly but I can't import itsolvers or any other sub-modules. from pysparse import itsolvers ImportError: DLL load failed: The specific module could not be found I thought maybe the PYTHONPATH variable would solve the problem but I still get the same ImportError fail. I know other people have had similar problems but the solution was often to download precompiled version. Any ideas? |
From: Dominique O. <dom...@gm...> - 2011-06-14 14:00:12
|
On Tue, Jun 14, 2011 at 1:43 PM, Jonathan Guyer <gu...@ni...> wrote: > > On Jun 14, 2011, at 9:25 AM, Dominique Orban wrote: > > > As you may know, Pysparse used to be part of Scipy several years ago. For > some reason, the Scipy folks decided to write their own sparse matrix > library. > > I don't believe that's exactly true. In the course of refactoring their > already existing sparse code several years ago (around 2005), the scipy > developers imported Pysparse to see if there were things they could gain > from Pysparse (Pysparse' LU solver is dramatically faster, for instance). I > don't know that Pysparse was ultimately used much in that refactoring and I > think it has subsequently been removed from the scipy codebase. > > I seem to recall that Roman indicated to us many years ago that he's not > interested in merging pysparse into a larger suite like scipy; that he > prefers individually maintained small packages to large monolithic systems. > Ok, thanks for clarifying this. -- Dominique |
From: Jonathan G. <gu...@ni...> - 2011-06-14 13:44:04
|
On Jun 14, 2011, at 9:25 AM, Dominique Orban wrote: > As you may know, Pysparse used to be part of Scipy several years ago. For some reason, the Scipy folks decided to write their own sparse matrix library. I don't believe that's exactly true. In the course of refactoring their already existing sparse code several years ago (around 2005), the scipy developers imported Pysparse to see if there were things they could gain from Pysparse (Pysparse' LU solver is dramatically faster, for instance). I don't know that Pysparse was ultimately used much in that refactoring and I think it has subsequently been removed from the scipy codebase. I seem to recall that Roman indicated to us many years ago that he's not interested in merging pysparse into a larger suite like scipy; that he prefers individually maintained small packages to large monolithic systems. |
From: Dominique O. <dom...@gm...> - 2011-06-14 13:26:14
|
On Tue, Jun 14, 2011 at 7:11 AM, Oz Nahum Tiram <na...@gm...> wrote: > On Tue, Jun 14, 2011 at 5:12 AM, Dominique Orban > <dom...@gm...> wrote: > > > > Hi Oz, > > I just pushed improved wrappers for the iterative solvers to the > 'suitesparse' branch of Pysparse (which is meant to become trunk in the near > future). The wrappers are now more streamlined. For some reason, Bicgstab > and Gmres were left out when we wrote those wrappers. I just added them. If > you look in itsolvers_utils.py, you will see an example towards the bottom > of the file. The wrappers accept both ll_mat and PysparseMatrix input. This > is the better way to call the iterative solvers. There shouldn't be much of > a difference in speed. > > What do you mean by "why is your code not there"? > > > > -- > > Dominique > > Hi Dominique, > I looked at the code in itsolvers_utils.py, which uses the classes and > objects concept. > It is not unfamiliar for me to write code like that, but imho it adds > a layer of complexity I prefer to avoid. > Complexity? In my view such classes offer more flexibility (e.g., you can subclass them) and are designed to make the user's life easier. For instance, now, they accept both ll_mat and PysparseMatrix input. I also moved arguments such as tol, itmax and K (the preconditioner) to the solve() method as that is where they belong. The old-style calling sequence is more C-like and less Python-like. In what way are they more complex to you? > What I meant in my question is from the two ways I used the matrices, > is there some which gives better performance ? > No, there should not be any performance hit when calling the solver. There may be a slight hit when you construct the matrix, but I would guess it is negligible and I've never bothered to measure it. >What do you mean by "why is your code not there"? > About code in scipy: it is good to have both projects, I just thought > if you merge your code into scipy, it will reach bigger audiences. > As you may know, Pysparse used to be part of Scipy several years ago. For some reason, the Scipy folks decided to write their own sparse matrix library. -- Dominique |
From: Oz N. T. <na...@gm...> - 2011-06-14 07:11:38
|
On Tue, Jun 14, 2011 at 5:12 AM, Dominique Orban <dom...@gm...> wrote: > > Hi Oz, > I just pushed improved wrappers for the iterative solvers to the 'suitesparse' branch of Pysparse (which is meant to become trunk in the near future). The wrappers are now more streamlined. For some reason, Bicgstab and Gmres were left out when we wrote those wrappers. I just added them. If you look in itsolvers_utils.py, you will see an example towards the bottom of the file. The wrappers accept both ll_mat and PysparseMatrix input. This is the better way to call the iterative solvers. There shouldn't be much of a difference in speed. > What do you mean by "why is your code not there"? > > -- > Dominique Hi Dominique, I looked at the code in itsolvers_utils.py, which uses the classes and objects concept. It is not unfamiliar for me to write code like that, but imho it adds a layer of complexity I prefer to avoid. What I meant in my question is from the two ways I used the matrices, is there some which gives better performance ? >What do you mean by "why is your code not there"? About code in scipy: it is good to have both projects, I just thought if you merge your code into scipy, it will reach bigger audiences. Thanks a lot for you answers, Oz |
From: Dominique O. <dom...@gm...> - 2011-06-14 03:12:50
|
On Mon, Jun 13, 2011 at 10:41 PM, Oz Nahum Tiram <na...@gm...> wrote: > Thanks Dominique! > You where right, my matrix in this code was created so: > A=sp.pysparseMatrix.PysparseMatrix(size=numn) > > while in another code I created A so: > A = sp.spmatrix.ll_mat(m*n, m*n) > > I didn't notice this difference ... > > Your solution does work. Is it smarter to use one way or another ? > > One more thing, I thought of rewriting my code with the sparse modules from > scipy. > Which brought up the questions - > both codes are BSD, why is your code not there? > Are there differences in speed ? > Hi Oz, I just pushed improved wrappers for the iterative solvers to the 'suitesparse' branch of Pysparse (which is meant to become trunk in the near future). The wrappers are now more streamlined. For some reason, Bicgstab and Gmres were left out when we wrote those wrappers. I just added them. If you look in itsolvers_utils.py, you will see an example towards the bottom of the file. The wrappers accept both ll_mat and PysparseMatrix input. This is the better way to call the iterative solvers. There shouldn't be much of a difference in speed. What do you mean by "why is your code not there"? -- Dominique |
From: Dominique O. <dom...@gm...> - 2011-06-13 20:30:19
|
On Mon, Jun 13, 2011 at 1:30 PM, Oz Nahum Tiram <na...@gm...> wrote: > Hi, > Thanks for the answer - I should have mentioned such important info. > I am using pysparse from the debian squeeze repositories... > > Cheers, > > Oz > > > On Mon, Jun 13, 2011 at 3:01 PM, Dominique Orban < > dom...@gm...> wrote: > >> On Mon, Jun 13, 2011 at 8:43 AM, Oz Nahum Tiram <na...@gm...>wrote: >> >>> Hi *, >>> >>> I am trying to solve a simple sparse system and I get an unclear error. >>> I have used the solvers before and never encoutered this error. Here is >>> an example: >>> >>> In [505]: print A >>> --------> print(A) >>> 1.000000 --- --- --- --- >>> --- 2.000000 --- --- --- >>> --- --- 3.000000 --- --- >>> --- --- --- 4.000000 --- >>> --- --- --- --- 5.000000 >>> >>> In [506]: print b >>> --------> print(b) >>> [ 1. 2. 3. 4. 5.] >>> >>> In [507]: b >>> Out[507]: array([ 1., 2., 3., 4., 5.]) >>> >>> In [508]: info, iter, relres = sp.itsolvers.bicgstab(A,b,x, tol, maxit) >>> >>> --------------------------------------------------------------------------- >>> TypeError Traceback (most recent call >>> last) >>> >>> /home/ozdeb/aeg-master/python book/richards flow/RichardsPython/<ipython >>> console> in <module>() >>> >>> TypeError: matvec() takes exactly 2 arguments (3 given) >>> >> >> Hi Oz, >> >> What version of Pysparse are you using? Is this the Pysparse from Pypi or >> one from SVN? >> >> Thanks, >> >> -- >> Dominique > > Hi Oz, I presume your matrix A is an instance of pysparseMatrix. The solvers in the itsolvers module were originally designed for either ll_mat, csr_mat or sss_mat matrices. To fix the problem you can do info, iter, relres = sp.itsolvers.bicgstab(A.matrix, b, x, tol, maxit) I'll fix this in the next release. -- Dominique |
From: Oz N. T. <na...@gm...> - 2011-06-13 13:30:54
|
Hi, Thanks for the answer - I should have mentioned such important info. I am using pysparse from the debian squeeze repositories... Cheers, Oz On Mon, Jun 13, 2011 at 3:01 PM, Dominique Orban <dom...@gm...>wrote: > On Mon, Jun 13, 2011 at 8:43 AM, Oz Nahum Tiram <na...@gm...> wrote: > >> Hi *, >> >> I am trying to solve a simple sparse system and I get an unclear error. >> I have used the solvers before and never encoutered this error. Here is an >> example: >> >> In [505]: print A >> --------> print(A) >> 1.000000 --- --- --- --- >> --- 2.000000 --- --- --- >> --- --- 3.000000 --- --- >> --- --- --- 4.000000 --- >> --- --- --- --- 5.000000 >> >> In [506]: print b >> --------> print(b) >> [ 1. 2. 3. 4. 5.] >> >> In [507]: b >> Out[507]: array([ 1., 2., 3., 4., 5.]) >> >> In [508]: info, iter, relres = sp.itsolvers.bicgstab(A,b,x, tol, maxit) >> >> --------------------------------------------------------------------------- >> TypeError Traceback (most recent call >> last) >> >> /home/ozdeb/aeg-master/python book/richards flow/RichardsPython/<ipython >> console> in <module>() >> >> TypeError: matvec() takes exactly 2 arguments (3 given) >> > > Hi Oz, > > What version of Pysparse are you using? Is this the Pysparse from Pypi or > one from SVN? > > Thanks, > > -- > Dominique > |
From: Dominique O. <dom...@gm...> - 2011-06-13 13:27:07
|
On Mon, Jun 13, 2011 at 8:43 AM, Oz Nahum Tiram <na...@gm...> wrote: > Hi *, > > I am trying to solve a simple sparse system and I get an unclear error. > I have used the solvers before and never encoutered this error. Here is an > example: > > In [505]: print A > --------> print(A) > 1.000000 --- --- --- --- > --- 2.000000 --- --- --- > --- --- 3.000000 --- --- > --- --- --- 4.000000 --- > --- --- --- --- 5.000000 > > In [506]: print b > --------> print(b) > [ 1. 2. 3. 4. 5.] > > In [507]: b > Out[507]: array([ 1., 2., 3., 4., 5.]) > > In [508]: info, iter, relres = sp.itsolvers.bicgstab(A,b,x, tol, maxit) > --------------------------------------------------------------------------- > TypeError Traceback (most recent call last) > > /home/ozdeb/aeg-master/python book/richards flow/RichardsPython/<ipython > console> in <module>() > > TypeError: matvec() takes exactly 2 arguments (3 given) > Hi Oz, What version of Pysparse are you using? Is this the Pysparse from Pypi or one from SVN? Thanks, -- Dominique |
From: Oz N. T. <na...@gm...> - 2011-06-13 08:49:52
|
Hi *, I am trying to solve a simple sparse system and I get an unclear error. I have used the solvers before and never encoutered this error. Here is an example: In [505]: print A --------> print(A) 1.000000 --- --- --- --- --- 2.000000 --- --- --- --- --- 3.000000 --- --- --- --- --- 4.000000 --- --- --- --- --- 5.000000 In [506]: print b --------> print(b) [ 1. 2. 3. 4. 5.] In [507]: b Out[507]: array([ 1., 2., 3., 4., 5.]) In [508]: info, iter, relres = sp.itsolvers.bicgstab(A,b,x, tol, maxit) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/ozdeb/aeg-master/python book/richards flow/RichardsPython/<ipython console> in <module>() TypeError: matvec() takes exactly 2 arguments (3 given) Any help would be appreciated, Thanks in advance, Oz |
From: Dominique O. <dom...@gm...> - 2011-04-29 00:02:07
|
On Thu, Apr 28, 2011 at 8:40 AM, Yoshi Rokuko <y...@ro...> wrote: > hey - nice work! > > we use your software in an open source project (not published yet) > for complex networks and our sparse matrices are adjacency matrices. > often we use unweighted networks so the matrix consists of ones and > zeros, so there is no need for a double precision array ... > > so until now i used a single integer array for storing such a matrix, > that is also easy to pass to a c function from python. is there a way > to do such a thing in your framework? passing sparse matrices to a > python module in c and save memory by not allocating a double array? > Hi Yoshi, Thanks for the compliments! At this point, there is no way to just store a sparsity pattern in PySparse but that would be easy enough to add. However the bigger question is: what do you need to do with your matrix? Just multiplies to determine paths or do you need a factorization of some sort? Cheers, -- Dominique |
From: Yoshi R. <y...@ro...> - 2011-04-28 13:21:21
|
hey - nice work! we use your software in an open source project (not published yet) for complex networks and our sparse matrices are adjacency matrices. often we use unweighted networks so the matrix consists of ones and zeros, so there is no need for a double precision array ... so until now i used a single integer array for storing such a matrix, that is also easy to pass to a c function from python. is there a way to do such a thing in your framework? passing sparse matrices to a python module in c and save memory by not allocating a double array? thank you - best regards |
From: Tony S. <Ton...@na...> - 2011-03-07 16:28:22
|
Thanks, it does indeed resolve the issue. Actually, your update is exactly the same fix that I tried myself. :) Tony On Mon, Mar 7, 2011 at 4:14 PM, Dominique Orban <dom...@gm...> wrote: > On Tue, Mar 1, 2011 at 2:25 PM, Tony Stillfjord > <Ton...@na...> wrote: >> Hello, >> >> I seem to have found a memory leak in the Umfpack module, more >> specifically in the function factorize (umfpackmodule.c). >> This calls the function newUMFPackObject, in which (as far as I >> understand it) memory is allocated for the variable colidx >> via SpMatrix_LLMatBuildColIndex(&colidx, matrix, 1). This memory is never freed. >> >> Calling SpMatrix_LLMatDestroyColIndex(&colidx) towards the end of >> newUMFPackObject seems to resolve the issue, but I >> am uncertain where it is safe to make this call. I would guess that >> one should call it just before the two switch statements >> that check for problems with the matrix and return NULL if something >> is awry. colidx does not seem to be in use at this point, >> but someone with more insight into the code than me should confirm this. > > Hi Tony, > > Good catch! I pushed an update to the SVN repository. Let us know if > that resolves the problem for you. > > -- > Dominique > |
From: Dominique O. <dom...@gm...> - 2011-03-07 15:15:17
|
On Tue, Mar 1, 2011 at 2:25 PM, Tony Stillfjord <Ton...@na...> wrote: > Hello, > > I seem to have found a memory leak in the Umfpack module, more > specifically in the function factorize (umfpackmodule.c). > This calls the function newUMFPackObject, in which (as far as I > understand it) memory is allocated for the variable colidx > via SpMatrix_LLMatBuildColIndex(&colidx, matrix, 1). This memory is never freed. > > Calling SpMatrix_LLMatDestroyColIndex(&colidx) towards the end of > newUMFPackObject seems to resolve the issue, but I > am uncertain where it is safe to make this call. I would guess that > one should call it just before the two switch statements > that check for problems with the matrix and return NULL if something > is awry. colidx does not seem to be in use at this point, > but someone with more insight into the code than me should confirm this. Hi Tony, Good catch! I pushed an update to the SVN repository. Let us know if that resolves the problem for you. -- Dominique |
From: Tony S. <Ton...@na...> - 2011-03-01 14:26:05
|
Hello, I seem to have found a memory leak in the Umfpack module, more specifically in the function factorize (umfpackmodule.c). This calls the function newUMFPackObject, in which (as far as I understand it) memory is allocated for the variable colidx via SpMatrix_LLMatBuildColIndex(&colidx, matrix, 1). This memory is never freed. Calling SpMatrix_LLMatDestroyColIndex(&colidx) towards the end of newUMFPackObject seems to resolve the issue, but I am uncertain where it is safe to make this call. I would guess that one should call it just before the two switch statements that check for problems with the matrix and return NULL if something is awry. colidx does not seem to be in use at this point, but someone with more insight into the code than me should confirm this. Kind regards, Tony Stillfjord |
From: Daniel W. <dan...@gm...> - 2010-08-10 18:43:57
|
Merged source:branches/keys to source:branches/version-1_1 and source:trunk and removed source:branches/keys. Cheers On Fri, Aug 6, 2010 at 7:40 AM, Toine Bogers <tb...@iv...> wrote: > Thanks, that seems to have done the job! Thanks for the speedy response! > > -Toine > >> I reverted keys() back to its old behavior. I don't know why I changed >> it in the first place. It's on branches/keys right now, so check it >> out and make sure it does what you want and I'll merge back to >> branches/version-1_1 and trunk. >> >> Can we tidy up branches by removing some of the dead wood in there? >> Can I delete 1_1_x, PSI, branch_numpy, branch_rel_1_0, class_branch, >> python-2_4? >> >> On Tue, Aug 3, 2010 at 5:21 AM, Toine Bogers <tb...@iv... >> wrote: >>> Dear PySparse maintainers, >>> First of all: thanks for creating PySparse! It's been extremely useful in >> writing my Python code for my collaborative filtering experiments. Up till >>> now I never really had any problems with it, but after I migrated to >>> v1.1.1 I ran into a peculiar 'bug/feature' with the keys() method. >>> I used to run v1.0 of PySparse on OS X 10.5 without any problems. I tried >>> installing the later versions, but they would never compile and the .dmg >>> of >>> v1.0 on SourceForge worked fine for me. I recently migrated to Snow >>> Leopard >>> (clean install) and to my surprise I could compile and install the latest >>> version of PySparse (v1.1.1) without any problems. >>> At first glance everything seemed to work just fine until I ran one of my >>> larger scripts. It returned a very peculiar error: the keys() method no >>> longer works as it should. Instead of returning a list of tuples of (row, >>> column)-indices it now returns a list containing two lists, one >>> containing >>> all row indices, the other containing all column indices >>> The following example shows what I mean. I've created a small 3x3 sparse >>> matrix A: >>>>> print A >>> ll_mat(general, [3,3]): >>> 1.000000 2.000000 -------- >>> 1.000000 1.000000 2.000000 >>> 4.000000 5.000000 4.000000 >>> Then when I print out the keys, it returns this: >>>>> print A.keys() >>> [[0, 0, 1, 1, 1, 2, 2, 2], [0, 1, 0, 1, 2, 0, 1, 2]] >>> whereas it used to return: >>> [[0, 0], [0, 1], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]] >>> And of course all of my code is expecting that method to work like that. >>> The >>> online documentation still says that keys() returns "[...]a list of >>> tuples >>> (i,j) of the nonzero matrix entries." Which is also what I expected it to >>> do, but not what it does anymore. >>> The strange thing is that the items() method still returns a list of >>> tuple-value pairs: >>>>> print A.items() >>> [((0, 0), 1.0), ((0, 1), 2.0), ((1, 0), 1.0), ((1, 1), 1.0), ((1, 2), >>> 2.0), >>> ((2, 0), 4.0), ((2, 1), 5.0), ((2, 2), 4.0)] >>> In a way this is good, since it means I can, with some relatively minor >>> adjusments, use the items() method instead. But I would prefer not to >>> have >>> to use items() when keys() is enough. >>> Do you have an explanation for the change in behavior I've observed? Is >>> it >>> perhaps some sort of compilation option that I didn't set properly (which >>> makes the underlying Fortran/C-code return its results in a different >>> format >>> to the keys() method)? >>> >>> Kind regards, >>> Toine Bogers >> >> -- >> Daniel Wheeler > > ---- > Toine Bogers > Royal School of Library & Information Science > Birketinget 6 | 2300 Copenhagen S | Denmark > http://itlab.dbit.dk/~toine/ > Phone: +45 32 34 13 67 | Room: C4.02 > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Pysparse-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysparse-users > > -- Daniel Wheeler |
From: Toine B. <tb...@iv...> - 2010-08-06 11:54:17
|
Thanks, that seems to have done the job! Thanks for the speedy response! -Toine > I reverted keys() back to its old behavior. I don't know why I changed > it in the first place. It's on branches/keys right now, so check it > out and make sure it does what you want and I'll merge back to > branches/version-1_1 and trunk. > > Can we tidy up branches by removing some of the dead wood in there? > Can I delete 1_1_x, PSI, branch_numpy, branch_rel_1_0, class_branch, > python-2_4? > > On Tue, Aug 3, 2010 at 5:21 AM, Toine Bogers <tb...@iv...> wrote: >> Dear PySparse maintainers, >> First of all: thanks for creating PySparse! It's been extremely useful in > writing my Python code for my collaborative filtering experiments. Up till >> now I never really had any problems with it, but after I migrated to >> v1.1.1 I ran into a peculiar 'bug/feature' with the keys() method. >> I used to run v1.0 of PySparse on OS X 10.5 without any problems. I tried >> installing the later versions, but they would never compile and the .dmg of >> v1.0 on SourceForge worked fine for me. I recently migrated to Snow Leopard >> (clean install) and to my surprise I could compile and install the latest >> version of PySparse (v1.1.1) without any problems. >> At first glance everything seemed to work just fine until I ran one of my >> larger scripts. It returned a very peculiar error: the keys() method no >> longer works as it should. Instead of returning a list of tuples of (row, >> column)-indices it now returns a list containing two lists, one containing >> all row indices, the other containing all column indices >> The following example shows what I mean. I've created a small 3x3 sparse >> matrix A: >>>> print A >> ll_mat(general, [3,3]): >> 1.000000 2.000000 -------- >> 1.000000 1.000000 2.000000 >> 4.000000 5.000000 4.000000 >> Then when I print out the keys, it returns this: >>>> print A.keys() >> [[0, 0, 1, 1, 1, 2, 2, 2], [0, 1, 0, 1, 2, 0, 1, 2]] >> whereas it used to return: >> [[0, 0], [0, 1], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]] >> And of course all of my code is expecting that method to work like that. The >> online documentation still says that keys() returns "[...]a list of tuples >> (i,j) of the nonzero matrix entries." Which is also what I expected it to >> do, but not what it does anymore. >> The strange thing is that the items() method still returns a list of >> tuple-value pairs: >>>> print A.items() >> [((0, 0), 1.0), ((0, 1), 2.0), ((1, 0), 1.0), ((1, 1), 1.0), ((1, 2), 2.0), >> ((2, 0), 4.0), ((2, 1), 5.0), ((2, 2), 4.0)] >> In a way this is good, since it means I can, with some relatively minor >> adjusments, use the items() method instead. But I would prefer not to have >> to use items() when keys() is enough. >> Do you have an explanation for the change in behavior I've observed? Is it >> perhaps some sort of compilation option that I didn't set properly (which >> makes the underlying Fortran/C-code return its results in a different format >> to the keys() method)? >> >> Kind regards, >> Toine Bogers > > -- > Daniel Wheeler ---- Toine Bogers Royal School of Library & Information Science Birketinget 6 | 2300 Copenhagen S | Denmark http://itlab.dbit.dk/~toine/ Phone: +45 32 34 13 67 | Room: C4.02 |