Questions tagged [lapack]

LAPACK (Linear Algebra PACKage) is a software library package to solve linear algebra equations. LAPACK is written in Fortran 90.

LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. LAPACK is written in Fortran 90.

1025 questions
4
votes
1 answer

Multiplying a 2d array with each slice of 3d array - Numpy

I am looking for an optimized way of computing a element wise multiplication of a 2d array by each slice of a 3d array (using numpy). for example: w = np.array([[1,5], [4,9], [12,15]]) y = np.ones((3,2,3)) I want to get a result as a 3d array with…
inarighas
  • 720
  • 5
  • 24
4
votes
2 answers

how does numpy.linalg.eigh vs numpy.linalg.svd?

problem description For a square matrix, one can obtain the SVD X= USV' decomposition, by using simply numpy.linalg.svd u,s,vh = numpy.linalg.svd(X) routine or numpy.linalg.eigh, to compute the eig decomposition on Hermitian matrix X'X and…
4
votes
2 answers

NumPy + BLAS + LAPACK on GPU (AMD and Nvidia)

We have a Python code which involves expensive linear algebra computations. The data is stored in NumPy arrays. The code uses numpy.dot, and a few BLAS and LAPACK functions which are currently accessed through scipy.linalg.blas and…
srcerer
  • 1,068
  • 10
  • 19
4
votes
0 answers

LAPACK SVD vs. MATLAB SVD

I am using LAPACK dgesvd to compute the SVD of a real-valued Hankel matrix as a part of my C program and am comparing the results obtained against the MATLAB function SVD. I notice that while the worst difference between the singular values is of…
4
votes
1 answer

Multiplying a subset of matrix to another matrix using lapack/blas

I want to multiply a subset of matrix A to another matrix, using dgemm or anyother lapack/blas function. I think that since elements of the submatrix may not be contiguous, I cannot use dgemm directly without copying the submatrix to another space.…
user85361
  • 177
  • 1
  • 9
4
votes
1 answer

Link to Fortran library (Lapack) from C++

I'm using Lapack in my C++ code. I'm quite confused how to properly link to the library. Here is a small example corresponding to my code calling a function from Lapack: #include namespace lapack { extern "C" { void ilaver(int* major,…
Caduchon
  • 4,574
  • 4
  • 26
  • 67
4
votes
1 answer

Matrix Inversion in CBLAS/LAPACK vs Python

The matrix I am trying to invert is: [ 1 0 1] A = [ 2 0 1] [-1 1 1] The true inverse is: [-1 1 0] A^-1 = [-3 2 1] [ 2 -1 0] Using Python's numpy.linalg.inv, I get the correct answer. One of my routines for matrix…
The Dude
  • 661
  • 2
  • 11
  • 20
4
votes
1 answer

Cross-compile Fortran library from Linux to Windows using CMake including Lapack

I have a Fortran library that I have been developing on Linux that I want to share with colleagues who normally use Windows. I do not expect them to help develop it, so all I want to do is produce a static executable using a cross-compiler so they…
cbcoutinho
  • 634
  • 1
  • 12
  • 28
4
votes
1 answer

Using Accelerate (CLAPACK) to solve an augmented matrix?

Does anyone know what function/method to use in Accelerate (CLAPACK) to solve an augmented matrix such as the one below? Looking for any sample code, links to samples, hints on how to solve the matrix. I've been looking through the documentation but…
John
  • 1,413
  • 3
  • 16
  • 27
4
votes
3 answers

Linking Ipopt with Intel MKL

I'm trying to link Ipopt with Intel MKL (instructions). Intel's Link Advisor suggests: Link line: -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a…
Agrim Pathak
  • 3,047
  • 4
  • 27
  • 43
4
votes
1 answer

lapack/blas/openblas proper installation from source - replace system libraries with new ones

I wanted to install BLAS, CBLAS, LAPACK and OpenBLAS libraries from source using available packages you can download here openblas and lapack, blas/cblas. Firstly I removed my system blas/cblas and lapack libraries, but unfortunately atlas library…
Bociek
  • 1,195
  • 2
  • 13
  • 28
4
votes
0 answers

Linking NumPy with BLAS on windows

I'm trying to install Theano on a Windows system and need to install BLAS and LAPACK. I've got the .dll files for these in my System32 folder. When I run numpy.config.show() from Anaconda, the paths to the libraries are displayed properly. However,…
PrithviJC
  • 393
  • 3
  • 9
4
votes
1 answer

How to call LAPACK code (cpbtrf) in Julia

I'm currently trying to translate my existing Python code into Julia, and I need to compute a Cholesky Decomposition of a banded, complex matrix. The correct LAPACK routine is cpbtrf (the one currently called by SciPy), and I'm struggling to get it…
jimbarrett27
  • 157
  • 1
  • 2
  • 9
4
votes
2 answers

Scipy output error :undefined symbol: sgegv_

When I tried running keras examples, the program output an error, /usr/local/lib/python2.7/dist-packages/scipy/linalg/lapack.py in () 354 from .blas import find_best_blas_type as find_best_lapack_type 355 --> 356 from scipy.linalg…
Chao Ding
  • 41
  • 3
4
votes
2 answers

what is high performance version of LAPACK and BLAS?

This page of IMSL says To obtain improved performance we recommend linking with High Performance versions of LAPACK and BLAS, if available. What is High Performance versions of LAPACK and BLAS ?
user15964
  • 2,507
  • 2
  • 31
  • 57