Installing PyPardiso

The PyPardiso package provides an interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations. Trying to install this package with Conda raises the message:

To search for alternate channels that may provide the conda package you’re
looking for, navigate to and use the search bar at the top of the page.

This provides the link:

which provides the command line:

conda install -c haasad pypardiso

Ensure that the Intel MKL library is installed before installing pypardiso.

The pypardiso Github site is at:

This provides the following documentation:

I have now modified my py_spsolve function to use the PyPardiso solver by default:

@xl_func(category = "Scipy-Linalg")
@xl_arg('v', 'numpy_array', ndim=1)
@xl_arg('i', 'numpy_array', ndim=1)
@xl_arg('j', 'numpy_array', ndim=1)
@xl_arg('ya', 'numpy_array', ndim=1)
def py_spsolve(v, i, j, ya, out = 0, use_pardiso = True, permc_spec = 'MMD_AT_PLUS_A'):
    Solve a matrix equation Ax = y in sparse COO format.
:param v: value vector
:param i: row index vector
:param j: column index vector
:param ya: y vector
    timea = np.zeros((1,2))
    stime =time.perf_counter()
    n = ya.size
    A = ssp.coo_matrix((v,(i,j)),shape=(n,n)).tocsc()
    timea[0,0] = time.perf_counter()-stime
    if use_pardiso:
        res = spsolve(A, ya)
        res = sspla.spsolve(A, ya, permc_spec)
    timea[0,1] = time.perf_counter()-stime
    if out == 1:
        return timea
        return res

This entry was posted in Excel, Finite Element Analysis, Frame Analysis, Link to Python, Newton, NumPy and SciPy, PyXLL, UDFs and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.