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
5
votes
1 answer

Matrix operations in C++ (using Blas/Lapack or some other alternative)

I am new to C++, and I am trying to learn how to do matrix operations in C++. I have read that BLAS/LAPACK is the best way to do it (see http://cpplapack.sourceforge.net/). However, I find it difficult to get started with using it. What is some…
dreamer
  • 1,192
  • 5
  • 20
  • 42
5
votes
1 answer

Error in linking armadillo lapack blas to code: undefined reference to `dtrsm_ '

I am using armadillo as a wrapper framework for linear algebra routines which further uses linear algebra static libraries like lapack and blas. I have manually compiled blas and lapack libraries and so as per readme.txt of armadillo, i am supposed…
Hobby_Web_programmer
  • 775
  • 2
  • 10
  • 18
5
votes
2 answers

Linking LAPACK in Fortran on Mac OS X

I imagine this to be a standard noob problem but after spending all morning searching the web, I decided to bug you anyway. I'm on Mac OS 10.9 and I'd like to call a LAPACK eigenvalue routine from a Fortran program. I had the pleasure of being…
Jonas Greitemann
  • 1,011
  • 10
  • 25
5
votes
2 answers

Lapack linking error, recompile with -fPIC

I have a sophisticated program for fitting nonlinear functions with the Levenberg-Marquardt's method. The program uses a solver for a system of linear Equations from the Lapack library, where I have used: extern "C" ... To link to external fortran…
The Quantum Physicist
  • 24,987
  • 19
  • 103
  • 189
5
votes
2 answers

Is integer multiplication implemented using double precision floating point exact up until 2^53?

I ask because I am computing matrix multiplications where all the matrix values are integers. I'd like to use LAPACK so that I get fast code that is correct. Will two large integers (whose product is less than 2^53), stored as doubles, when…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
5
votes
1 answer

How to perform matrix inverse operation using the accelerate framework?

I would like to find the inverse of a matrix. I know this involves first LU factorisation then the inversion step but I cannot find the required function by searching apple's docs of 10.7! This seems like a useful post Symmetric Matrix Inversion in…
Daniel Farrell
  • 9,316
  • 8
  • 39
  • 62
5
votes
2 answers

Using alternative LAPACK driver in numpy's svd method?

I'm using numpy.svd to compute singular value decompositions of badly conditioned matrices. For some special cases the svd won't converge and raise a Linalg.Error. I've done some research and found that numpy uses the DGESDD routine from LAPACK. The…
Mischa Obrecht
  • 2,737
  • 6
  • 21
  • 31
4
votes
1 answer

Lapack version on Mac LION

Lapack 3.2.1 is not fully theard safe right...but 3.3 is which is recently being released by netlib with help of intel. So do some one know whether or not Lapack 3.3 version would be shipped with new MacPro.
sunny
  • 73
  • 5
4
votes
1 answer

Multiplication of two huge dense matrices Hadamard-multiplied by a sparse matrix

I have two dense matrices A and B, and each of them has a size fo 3e5x100. Another sparse binary matrix, C, with size 3e5x3e5. I want to find the following quantity: C ∘ (AB'), where ∘ is Hadamard product (i.e., element wise) and B' is the transpose…
rando
  • 365
  • 3
  • 12
4
votes
2 answers

How to build BLAS and LAPACK for use in C++ on Linux cluster?

I have a large computational problem I am working on. To decrease the computation speed of a set of linear equations in a square matrix, I have made use of lapack and blas. To get the libraries on my laptop (Ubuntu 2020) I ran the following…
GeneralCode
  • 794
  • 1
  • 11
  • 26
4
votes
1 answer

Writing a fast linear system solver in OpenCL C

I'm writing an OpenCL kernel which will involve solving a linear system. Currently my kernel is simply too slow, and improving the performance of the linear system portion seemed like a good place to start. I should also note that I'm not trying…
Set
  • 934
  • 6
  • 25
4
votes
0 answers

CMake is not able to find LAPACK sgemm on macOS

I'm trying to compile this code, but when running cmake .. in the build folder I get the messages: -- Looking for Fortran sgemm -- Looking for Fortran sgemm - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
4
votes
2 answers

Visual C++ 2010 and Lapack, Blas libraries

I want to use Blas and Lapack libraries to use some rutines, however I do not know how to use them in Visual C++ 2010. How to use them in this context?
edgarmtze
  • 24,683
  • 80
  • 235
  • 386
4
votes
0 answers

How can I make numpy use SSE4_2 instead of AVX?

I am struggling with a python reproducibility problem across different machines. I have two machines: an older server with SSE4_2 and a newer desktop with AVX. Running the same python script on both machines results in different outputs (I made sure…
ej_01
  • 51
  • 4
4
votes
1 answer

Compiling Fortran code using BLAS (LAPACK) modules

I've just started to use Fortran and have a problem with using BLAS modules from (?) LAPACK in my program. I'm working on Ubuntu 18.04, I've already installed (?) LAPACK and BLAS packages by command sudo apt-get install libblas-dev liblapack-dev.…
Maciej K.
  • 41
  • 1
  • 4