1,040 questions
3
votes
1
answer
144
views
Build numpy 2.3+ without accelerated libraries
Related post: Compile numpy WITHOUT Intel MKL/BLAS/ATLAS/LAPACK
Recent versions of numpy use meson for build configuration, I can build numpy from source but failed to exclude BLAS/LAPACK/... deps.
...
1
vote
0
answers
75
views
LAPACK Inconsistent across multiple different operating systems and devices
Description
I have a deterministic program that uses jax, and is heavy on linear algebra operations.
I ran this code on CPU, using three different CPUs. Two MacOs Systems (one on Sequoia (M1 Pro), ...
0
votes
0
answers
42
views
OpenBLAS and MKL give incosistent SVD decompositions?
I find that MKL and OpenBLAS give slightly different SVD decompositions.
I have this declaration of dgesvd,
extern "C" {
void dgesvd_(char const& jobu, char const& jobvt, int ...
0
votes
0
answers
18
views
BLAS/LAPACK compatibility
I've been trying to figure out whether the newer version of BLAS/LAPACK are backward compatible with the older releases but I can't find anything on the netlib website or docs.
Are they compatible ...
0
votes
0
answers
39
views
Cannot locate lapacke.h on windows [duplicate]
What is the common way to configure lapack for CMake project on Windows?
I have built lapack from sources and installed it. CMake is able to find it via find_package(LAPACK COMPONENTS LAPACKE REQUIRED)...
1
vote
1
answer
104
views
Why does the ZHEEV function give different eigenvalues with the same matrix?
I wrote a Fortran code below to use the ZHEEV function to diagonalize the matrix and obtain the eigenvalue.
SUBROUTINE DOTPRODUCT(v1,v2,v3)
IMPLICIT NONE
INTEGER, PARAMETER :: dp = ...
1
vote
0
answers
188
views
Using a LAPACK function in C from the Accelerate Package on a M1 Mac
I am working on a scientific package in C and would like to incorporate a few LAPACK functions, which I aim to compile on my M1 MacBook running macOS 15.2. I understand that macOS uses Apple's ...
0
votes
0
answers
80
views
Octave build doesn't link LAPACK properly
I am trying to install Octave 9.2.0 in a specific directory since I'm not root, including BLAS, LAPACK and FFT3W. I work on RedHat 7.
The BLAS and LAPACK libraries are available under openblas which I ...
0
votes
1
answer
99
views
Is it safe to pass a pointer of a non-contiguous array to a Lapack95 routine in Fortran?
I would like to call the syevd Lapack95 subroutine for a non-contigous array as follows:
real :: mat(15000, 15000), vec(15000)
mat=1.d0
associate(eig_vects=>mat(:10000,:10000),eig_vals=>vec(:...
1
vote
1
answer
46
views
Wrong answer from LAPACKE_chbevd
I am using LAPACKE_chbevd on AGX Orin, which is an embedded device based on arm, to calculate the eigenvalues and eigenvectors of a matrix, but the results are incorrect.
From LAPACKE_chbevd (ARM ...
0
votes
0
answers
69
views
A x = B with sgesvx of LAPACK
I am trying to solve problems of the form Ax = b by using the function sgesvx. However, it is returning a wrong solution for one test case: - 0.33333 * x_1 - 0.06667 * x_2 = - 0.133333, which is ...
0
votes
0
answers
108
views
Calling LAPACK through Pybind crashes
I am writing a simple function to calculate log determinate in C++ using LAPACK. I write a unit test in C++, and it works fine. But when I use pybind and call this function in python with the same ...
0
votes
1
answer
55
views
Install libraries in VS Studio using CMAKE
I am trying to compute the eigenvalues for the Hamiltonian for the 1D Ising Model in a Transverse Field using C in VS Studio. However, I need to use the lapack library and I am struggling with CMAKE ...
0
votes
0
answers
98
views
Unexpected behaviour of matmul when compiled with blas in Fortran
I am trying to benchmark the blas routines dgemv and dgemm in Fortran. For that I have written this simple codes:
matmul.f90:
program test ...
0
votes
1
answer
90
views
Incompatible function argument list between header and shared lib doesn't crash my program, why?
When building my university project on two different machines I experienced issues with LAPACK and Intel's implementation in MKL. I already figured out the main problem: I used the LAPACK headers from ...
3
votes
1
answer
151
views
Inaccurate Eigenvectors from LAPACK's ZHEEVR routine
I was trying to replace Scipy's eigh routine in my cython code with C-level LAPACK. Essentially I want to compute eigenvectors corresponding to the largest and smallest eigenvalues of a hermitian ...
1
vote
1
answer
101
views
Why does using `extern` allow for runtime linking?
I have this code snippet:
extern crate blas;
extern crate openblas_src;
pub fn eigen_decompose_symmetric_tri_diagonal(
main_diag: &Vec<f64>,
sub_diag: &Vec<...
2
votes
1
answer
134
views
QR decomposition successful but has high errors
I have two implementations of QR decomposition in a Fortran code. One is a custom QR decomposition function:
! QR decomposition solving for vector B in AX = B
subroutine qr_eqsystem(A, B, X, M, N, ...
1
vote
0
answers
131
views
How to setup rust LAPACK wrappers?
This has been asked before with no good answer.
As an MVE one can try this:
use lapack::*;
fn main() {
let n = 3;
let mut a = vec![3.0, 1.0, 1.0, 1.0, 3.0, 1.0, 1.0, 1.0, 3.0];
let mut w =...
0
votes
1
answer
1k
views
Numpy/Scipy BLAS/LAPACK Linking on macOS (with Apple Accelerate)
Question
I am trying to find out if the latest version of NumPy (2.0.0) is taking advantage of the updated Accelerate BLAS/LAPACK library, including ILP64.
Numpy
Numpy in their 2.0.0 release added ...
1
vote
0
answers
316
views
Change the BLAS version used by R
I am currently having issues with the 'Eigen()' function in R.
It was mentioned that I should try using 'OpenBLAS'. How abouts should I go about installing this and make R use this version of BLAS.
I ...
0
votes
0
answers
349
views
How can I install LAPACK for gfortran compiler in Visual studio code?
Can someone please tell me proper instructions to install LAPACK for gfortran compiler in Visual studio code.
I tried whatever l found on google search and there is not a single proper instructions ...
0
votes
0
answers
25
views
Unable to link pre-built LAPACKE library in CMake C project [duplicate]
I would like to use CI for building my C project that I manage with cmake. The project will heavily employ Fortran's BLAS and LAPACK through CBLAS and LAPACKE. The CMakeLists.txt looks like this:
...
0
votes
1
answer
110
views
Why is there no equivalent of GEEV in scalapack?
I am hoping to find the eigenvalues of a large complex non-hermitian matrix using ScaLAPACK. I cannot seem to find any documentation for such a general eigensolver (presumably the name would be ...
0
votes
0
answers
67
views
Compiling Clapack for find_package ( LAPACK
I have to use Clapack as a replacement for blas/lapack in an environment without Fortran compiler. However, some subprojects use find_package ( LAPACK to detect lapack which always fails. Only ...
0
votes
0
answers
46
views
How to extract residual sum of squares from C LAPACKE_sgelss with LAPACK_ROW_MAJOR
I am using MKL LAPACKE_sgelss to compute least square solution to $Ax = b_j$, where $j \in [0 , nrhs) $, A is $m \times n$ matrix and $n < m < nrhs$.
I somehow managed to extract the solution ...
0
votes
0
answers
467
views
Using Lapack in Fortran with CMake Build
I am having some trouble compiling my Fortran code with lapack using CMake - I am new to all of this. I have blas and lapack installed in /usr/lib/x86_64-linux-gnu/ and am using the following ...
0
votes
0
answers
1k
views
Install LAPACK and locate library
I am completely new to Fortran90 and I need to install LAPACK for this code that I want to run. Looking at the make.inc file of the code, I need to specify the relevant directory that leads to the ...
0
votes
1
answer
370
views
Ipopt can't find Lapack, which should be installed
I'm trying to install Ipopt on a Linux machine, however I dont have any sudo rights. I think the Lapack installation was succesful (is there any way I can check this?). Due to not having sudo rights, ...
1
vote
1
answer
258
views
How are built eigenvectors with lapack in C
I am working on eigenvectors with lapacke in C code and I was wondering how are they built when the the eigenvalue has a imaginary part? I mean I have to malloc on the same dimension as if they were ...
0
votes
0
answers
81
views
cannot call SASUM by itself as in x=SASUM without fortran 'call'
compiled a program with 'call segesv()' to solve system of 3 Equates in 3 Vars and that works fine so I know I'm linked to Blas and Lapack however, 'call SASUM' also compiles (I pass a vector of ...
0
votes
0
answers
52
views
Errors linking Lapack to CodeBlocks
I am having issues running Armadillo library in my Code::Blocks 20.03 on Windows. I am always stuck on some kind of error and would really appreciate help.
I have downloaded the LAPACK libraries, the ...
0
votes
1
answer
45
views
ATLAS: error when computing inverse of a matrix
I am getting an error while computing the inverse of a matrix using ATLAS library.
I get the error output:
On entry to DTRSM parameter number 9 had an illegal value
Aborted (core dumped)
I have a ...
0
votes
1
answer
638
views
"undefined reference to `dgesvx_'" although LAPACK is installed and located
I'm trying to run a fortran script that includes the function dgesvx(). I ran the script as
gfortran -lblas -llapack -o cft numtype.o cfapprox.o cftest.o
and the output is
gfortran -lblas -llapack -o ...
0
votes
0
answers
93
views
zheev outputs incorrect and random results when called from within dynamic library
I have DFT(density functional theory) code written in Fortran. Inside this program I use zheev function from lapack to diagonalize overlap matrix (S). I compile the code in two different targets (a) ...
0
votes
0
answers
302
views
How to resolve runtime error related to compile Pytorch with LAPACK support?
I am running DNN model on synthetic datasets to draw decision boundaries polytope in order to study the tropical geometrical perspective of synthetic adversarial attack. And getting the following ...
0
votes
0
answers
323
views
LAPACKE_dgeqrf/LAPACKE_dorgqr: How to generate matrix Q of the QR factorization of an orthogonal matrix that has more rows than columns
Introduction:
I'm using the Intel Math Kernel Library (MKL) functions LAPACKE_dgeqrf and LAPACKE_dorgqr for generating the QR decomposition of a general input matrix A of size (m x n) stored in row-...
-1
votes
1
answer
65
views
Passing a custom Matrix class to a Lapack subroutine
I would like the lapack package for some very useful functions which I would not like/being able to implement myself that well. The problem is that I cannot pass my custom Matrix class to the lapack ...
2
votes
0
answers
49
views
Compute generalized eigenvalue problem with CLapack in C
I'm going to show you an example how to compute generalized eigenvalue problem in C with CLapack.
Here I have two matrices.
#define row 5
#define column 5
float A[row * column] = { 9.5605, 6.8163, -...
0
votes
1
answer
96
views
Why do I get two pivot values of same type for LU-factorization? LAPACK sgetrf
I'm using LAPACK and I'm getting two types of identical pivot values. I'm using the LAPACK routine sgetrf to compute the LU-factorization
A = L*U*P
This C code below gives the same result as my ...
1
vote
2
answers
179
views
Equivalent to C++ lapack dgesvd in Python
I'm currently working my way through converting some C++ code from a paper to Python (a language I'm far more familiar with). I've gotten all the values to this point in the code to match (I managed ...
0
votes
1
answer
140
views
Type mismatch in LAPACK seemingly resolves itself
I am going through some old Fortran code and there are frequent calls to the LAPACK routine dsyevd, which takes an argument IWORK, expected to be an integer array. In this code, IWORK is often ...
1
vote
0
answers
124
views
Calculating full set of eigenvectors with arbitrary error tolerance
I'm trying to numerically compute the full set of eigenvectors of a large dense matrix, with the freedom to specify the error tolerance and maximum number of iterations. (The default error tolerance ...
0
votes
0
answers
103
views
Computing a truncated Hessenberg decomposition
I'm working on a linear algebra problem where I am given a real, symmetric matrix A. For any such matrix, we can compute its Hessenberg decomposition, A = QHQ^T, where Q is an orthogonal matrix and H ...
0
votes
0
answers
114
views
/usr/bin/ld: cannot find -larmpl_lp64: No such file or directory
I was trying to compile a program dependent on LAPACK. During compilation this error message popped up:
FAILED: /home/parallels/qp2/src/basis_correction/basis_correction
gfortran -g -ffree-line-...
0
votes
1
answer
185
views
"undefined reference to" error during linking process
I am building my application using OpenMPI (built with LLVM) and few other external libraries including netcdf-fortran, BLAS and LAPACK. The files compile without any problem, but in the last stage ...
0
votes
1
answer
274
views
LU-Factorization differs in Lapack and Matlab
I'm computing a LU-Factorization with Lapack and compare the results. I use either dgetrf or dgetf2. Comparing the results to the corresponding function lu(...) in Matlab, they are identical as long ...
0
votes
0
answers
1k
views
Could not find the lapack library! Could not find a sufficient BLAS/LAPACK installation: BLAS/LAPACK symbol check failed
I have one question when I installed deal.II (version 9.5.0-pre) during compiling.
I use:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/dealII -DLAPACK_FOUND=true
-DDEAL_II_WITH_UMFPACK=ON -...
0
votes
0
answers
98
views
How do I fix this Fortran text parser for Lapack within Gem5
After about an hour, I need to ask for some help.
I've downloaded the math benchmark Lapack to run within a few CPU configurations for the simulation tool Gem5, which lets you build X86 computers and ...
0
votes
0
answers
142
views
How can I get a full symmetric matrix from it's upper triangle in fortran
I work with a symmetric matrix and only store its upper triangle (the lower triangle gets allocated but never initialized or touched). Now I need to add a vector to the first row of this matrix and ...