1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
Overview
--------
This is a patched version of Roman Geus's PySparse that is compatible with
numpy.
Currently manipulating the basic sparse matrix types seems to work but the
linear solvers are untested.
Current sparse matrix development in SciPy focuses on the sparse matrix module
under Lib/sparse. This code is in Python, with a Fortran back-end for
manipulation of CSC, CSR, and COO matrices. The purpose of having PySparse
in the tree is primarily to swipe some of its more useful features (perhaps
like the ll_mat class?)
Authors: Ed Schofield, Robert Cimrman.
Roman Geus's original README follows below.
-------------------
THE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND "WITH ALL
FAULTS". THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
CONCERNING THE QUALITY, SAFETY OR SUITABILITY OF THE SOFTWARE, EITHER
EXPRESSED OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
NON-INFRINGEMENT.
PySparse extends the Python interpreter by a set of sparse matrix
types holding double precision values. PySparse also includes modules
that implement
- iterative methods for solving linear systems of equations
- a set of standard preconditioners
- an interface to a direct solver for sparse linear systems of
equations (SuperLU)
- a Jacobi-Davidson eigenvalue solver for the symmetric, generalised
matrix eigenvalue problem (JDSYM)
All these modules are implemented as C extension modules for maximum
performance.
PySparse uses Numerical Python (NumPy) for handling dense vectors and
matrices and makes use of SuperLU for factorising sparse matrices.
Installation
------------
1. Install Numerical Python
- Download NumPy from http://www.pfdubois.com/numpy/
PySparse was tested with NumPy versions 20.x and 21.0
- Unpack and Install the NumPy package
Refer to the documentation provided in the NumPy package for
installation hints.
CAUTION: On 64-bit machines the NumPy distribution will not work
together with PySparse, since NumPy uses a non-standard datatype
to store Fortran integers. I have submitted a patch to the NumPy
developers, that fixes this. Hopefully this patch will be
incorporated in future releases (> 21.0) of NumPy. Please contact
me, if you need the 64-bit patch.
2. Customise the setup.py file
PySparse is needs to link against the BLAS and LAPACK libraries,
which must be available on your system.
Set the library_dirs_list, libraries_list, superlu_defs, f77_defs
variables according to your local configuration. Examples for
several architectures are provided.
3. Install PySparse
Run 'python setup.py install' to install PySparse into the default
directory of your Python installation. Refer to the Python
documentation, if you have advanced installation needs.
4. Testing
Testing support is only rudimentary.
Run the scripts in the Examples directory. Check if the results are
meaningful :-;
PySparse was successfully tested on many UNIX brands, including
Linux, Solaris (SunOS 5.6), Digital UNIX (OSF1 V4.0) and HP-UX
11.11, and Windows XP.
PySparse was tested using Python version 2.1 and 2.2.
Documentation
-------------
Some documentation is located in the Doc subdirectory. Alternatively
you can consult the documentation in the source code using the 'pydoc'
utility.
Acknowledgements
----------------
Major parts of this work was done while I was working as a PhD student at
Institute of Scientific Computing
ETH Zentrum
CH-8092 Zurich, Switzerland
and while I was working as a postdoc at
Paul Scherrer Institute
CH-5232 Villigen, Switzerland
I would like thank the developers of the SuperLU and Umfpack
packages. Both SuperLU and Umfpack are incorporated into the PySparse
software distribution.
Contact
-------
For comments, questions, bug reports, etc. contact me by email: roman@geus.ch
Roman Geus
|