Skip to main content

pymatsolver: Matrix Solvers for Python

Project description

Latest PyPI version MIT license. Travis CI build status Coverage status

A (sparse) matrix solver for python.

Solving Ax = b should be as easy as:

Ainv = Solver(A)
x = Ainv * b

In pymatsolver we provide a number of wrappers to existing numerical packages. Nothing fancy here.

Solvers Available

All solvers work with scipy.sparse matricies, and a single or multiple right hand sides using numpy:

  • L/U Triangular Solves

  • Wrapping of SciPy matrix solvers (direct and indirect)

  • Pardiso solvers now that MKL comes with conda!

  • Mumps solver with nice error messages

Installing Mumps

We have not been able to get the pip install to work because of multiple dependencies on fortran libraries. However, the linux and mac installs are relatively easy. Note that you must have mumps pre-installed, currently we have only got this working for the sequential version, so when you are installing, you will need to point to that one. You can also look at the .travis.yml file for how to get it working on TravisCI.

Linux

From a clean install on Ubuntu:

apt-get update
apt-get -y install gcc gfortran git libopenmpi-dev libmumps-seq-dev libblas-dev liblapack-dev

# Install all the python you need!
wget http://repo.continuum.io/miniconda/Miniconda-3.8.3-Linux-x86_64.sh -O miniconda.sh;
chmod +x miniconda.sh
./miniconda.sh -b
export PATH=/root/anaconda/bin:/root/miniconda/bin:$PATH
conda update --yes conda
conda install --yes numpy scipy matplotlib cython ipython nose

git clone https://github.com/rowanc1/pymatsolver.git
cd pymatsolver
make mumps

Mac

This assumes that you have Brew and some python installed (numpy, scipy):

brew install mumps --with-scotch5 --without-mpi

git clone https://github.com/rowanc1/pymatsolver.git
cd pymatsolver
make mumps_mac

If you have problems you may have to go into the Makefile and update the pointers to Lib and Include for the various libraries.

This command is helpful for finding dependencies. You should also take note of have happens when brew installs mumps.

mpicc --showme

Code: https://github.com/simpeg/pymatsolver

Tests: https://travis-ci.org/simpeg/pymatsolver

Bugs & Issues: https://github.com/simpeg/pymatsolver/issues

License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymatsolver-0.1.3.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file pymatsolver-0.1.3.tar.gz.

File metadata

  • Download URL: pymatsolver-0.1.3.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pymatsolver-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a9dd23e4b44cdc5dc738b6f0375f2e5ced8a605a27f7fae891c1604de7a1b071
MD5 5eb5dd4b9df5ca3c6ec8731a833a0c3e
BLAKE2b-256 6f7e02343a5a1f28a5d11e87d4ee8be67faefac8a9c2fd71bc0d3824c7c0ecac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page