GithubHelp home page GithubHelp logo

pypropack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pypropack's Issues

Maybe use f2py templating

Hi,

You can in principle get rid of the prefix multiplication s, d, c, z by using f2py templating features. Check scipy/linalg/flapack.pyf in scipy how this works.

test_svdp.test_svdp fails 1st time it's run, passes 2nd time

The first time I run nosetests pypropack/tests, I get an error. However, if I rerun the tests without making any changes, they all pass. I have reproduced this several times.

FAIL: test_svdp.test_svdp(10, 20, 'csc_matrix', 'd', 3, False, 'L')
....
AssertionError:
Not equal to tolerance rtol=1e-08, atol=1e-08
(mismatch 66.66666666666666%)
x: array([ 17.875834, 13.45001 , 12.759742])
y: array([ 17.875834, 0. , 0. ])

image

Failing to install on Windows

I am trying to get this software working, but the install fails due to unmet dependencies.

Using Windows 7, 64 bit, with the following relevant installed software:

  • Python v3.6.0
  • Numpy v1.15.4 + mkl (from pre-built numpy-1.15.4+mkl-cp36-cp36m-win32.whl file)
  • SciPy v1.1.0

Is there something else I'm missing here? Perhaps an update to the README, with some additional information for windows users, would be helpful.

I am starting to think Windows is complicating things, so i might try installing this on a Linux system and see if that makes things easier. Would prefer to run on Windows though.

lapack_opt_info:
lapack_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries mkl_blas95,mkl_lapack95,mkl_rt not found in []
  NOT AVAILABLE

openblas_lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries openblas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Found executable C:\Program Files\Git\usr\bin\DF.exe
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
  NOT AVAILABLE

openblas_clapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries openblas,lapack not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries tatlas,tatlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries tatlas,tatlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries tatlas,tatlas not found in C:\Python36\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries satlas,satlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries satlas,satlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries satlas,satlas not found in C:\Python36\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries ptf77blas,ptcblas,atlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries ptf77blas,ptcblas,atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries ptf77blas,ptcblas,atlas not found in C:\Python36\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries f77blas,cblas,atlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries f77blas,cblas,atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries f77blas,cblas,atlas not found in C:\Python36\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

accelerate_info:
  NOT AVAILABLE

lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries lapack not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
  NOT AVAILABLE

lapack_src_info:
  NOT AVAILABLE

  NOT AVAILABLE

C:\Python36\lib\site-packages\numpy\distutils\system_info.py:708: UserWarning: Specified path C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/mkl/lib/ia32_win is invalid.
  return self.get_paths(self.section, key)
C:\Python36\lib\site-packages\numpy\distutils\system_info.py:708: UserWarning: Specified path C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/compiler/lib/ia32_win is invalid.
  return self.get_paths(self.section, key)
C:\Python36\lib\site-packages\numpy\distutils\system_info.py:719: UserWarning: Specified path C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/mkl/include is invalid.
  return self.get_paths(self.section, key)
C:\Python36\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  self.calc_info()
C:\Python36\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  self.calc_info()
C:\Python36\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  self.calc_info()
Traceback (most recent call last):
  File "setup.py", line 51, in <module>
    setup_package()
  File "setup.py", line 42, in setup_package
    configuration=configuration )
  File "C:\Python36\lib\site-packages\numpy\distutils\core.py", line 135, in setup
    config = configuration()
  File "setup.py", line 13, in configuration
    config.add_subpackage('pypropack')
  File "C:\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 1037, in add_subpackage
    caller_level = 2)
  File "C:\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 1006, in get_subpackage
    caller_level = caller_level + 1)
  File "C:\Python36\lib\site-packages\numpy\distutils\misc_util.py", line 943, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "pypropack\setup.py", line 13, in configuration
    raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

Fixes for some memory bugs in PROPACK

Hi

I'm one of the authors of R 'svd' package (https://github.com/asl/svd). It includes R wrappers for eigensolvers / SVD solvers like PROPACK and nuTRLan. We found and fixed some memory corruption problems in PROPACK which you might want to integrate (see e.g. asl/svd@ac3f496). Since PROPACK development was stopped we were unable to integrate them to the package itself.

Hope this might help you a bit :)

weird rank behavior with svdp

I'm seeing some strange behavior with svdp; in particular it gives different results from the top k eigenvalues as a function of how many are asked for...

aprod callback memory issue

On my 32bit linux box, the callback function overwrites some memory which causes a failure in the matrix dot product. Spent a while trying to track it down... I currently have no idea what's causing the problem.

This is the code that reproduces it:

import numpy as np
from pypropack import svdp
from scipy.sparse import csr_matrix

np.random.seed(0)
A = np.random.random((10, 20))
u, sigma, v = svdp(csr_matrix(A), 3)

This is fine on my 64-bit linux box, but on the 32-bit box results in:

capi_return is NULL
Call-back cb_daprod_in___user__routines failed.
Traceback (most recent call last):
  File "example.py", line 12, in <module>
    u, sigma, v = svdp(csr_matrix(A), 3)
  File "/home/vanderplas/Opensource/pypropack/pypropack/propack.py", line 161, in svdp
    work, iwork, doption, ioption, dparm, iparm)
  File "/home/vanderplas/Opensource/pypropack/pypropack/propack.py", line 46, in __call__
    y[:] = self.A.rmatvec(x)
  File "/home/vanderplas/VIRTUALENV/pydev/local/lib/python2.7/site-packages/scipy/sparse/linalg/interface.py", line 216, in rmatvec
    return self.A_conj.dot(x)
  File "/home/vanderplas/VIRTUALENV/pydev/local/lib/python2.7/site-packages/scipy/sparse/base.py", line 211, in dot
    return self * other
  File "/home/vanderplas/VIRTUALENV/pydev/local/lib/python2.7/site-packages/scipy/sparse/base.py", line 243, in __mul__
    return self._mul_vector(other)
  File "/home/vanderplas/VIRTUALENV/pydev/local/lib/python2.7/site-packages/scipy/sparse/compressed.py", line 261, in _mul_vector
    other.dtype.char))
ValueError: On entry to DLASCL parameter number 4 had an illegal value

if print x is added to _Aprod.__call__ in pypropack/propack.py, the error does not occur. This makes me think it's some sort of memory error in the callback function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.