1,040 questions
0
votes
0
answers
33
views
"Undefined reference to SSYEV" error while using LAPACK in a module in fortran [duplicate]
I have created the following module: quantum.f90
module quantum
implicit none
contains
function renyi_entropy(A, N, p) result(entropy)
implicit none
integer :: N, p, INFO, i
real :: A(N,...
1
vote
0
answers
424
views
Linking LAPACK and BLAS libraries to a C++ program using Armadillo, in Ubuntu 18.04: What changes should I make in the Makefile?
I am a beginner in programming in C++. I have a program in C++ that uses Armadillo (a linear algebra library that uses LAPACK and BLAS), which is directly included in my scripts. The functionality of ...
0
votes
1
answer
521
views
matrix diagonalization and basis change with geev
I want to diagonalize a matrix and then be able to do basis changes. The aim in the end is to do matrix exponentiation, with exp(A) = P.exp(D).P^{-1}.
I use sgeev to diagonalize A. If I am not ...
0
votes
1
answer
171
views
Wrong eigenvector with MKL sgeev
I want to compute the eigenvalues and eigenvectors of a matrix. I'm using sgeev of MKL lapack.
I have this very simple test code:
integer :: i,n, info
real, allocatable:: A(:,:), B(:,:), C(:,:)
real, ...
0
votes
0
answers
59
views
Cannot find lapack library in Photran Eclipse
I have some problems with building a Fortran program on Windows. I use Photran Eclipse with an autogenerated makefile but there are some problems with the lapack library.
Lapack packages were ...
1
vote
1
answer
612
views
Raise a matrix to a power
Suppose we have a Hermitian matrix A that is known to have an inverse.
I know that ZGETRF and ZGETRI subroutines in LAPACK library can compute the inverse matrix.
Is there any subroutine in LAPACK or ...
1
vote
1
answer
731
views
How to compile lapack with rust
I am trying to use lapack with rust. Therefore I started with the example from the rust crates https://crates.io/crates/lapack
My Cargo.toml file looks like
enter [package]
name = "matmul"
...
0
votes
0
answers
312
views
install bonmin solver on windows
I want to install bonmin solver on windows 10 for yalmip.
I did whatever can be found on the internet but I still have problem in "make" line in cygwin for making executable bonmin file.
I ...
0
votes
1
answer
466
views
Minimal Example to use the MKL Linear Equation Solver
I would like to use BLAS for finding the solution of an equation structured AX = B, and X is to be solved.
The Matrix A is of shape m x 4, B is of the shape m x 3 and X is of shape 4 x 1.
My code is ...
1
vote
1
answer
127
views
Do you need a Fortran compiler in your machine to have Matlab work?
Do you need a Fortran compiler in your machine to have Matlab work?
I read that "Linear algebra functions and matrix operations in MATLAB® are built on LAPACK," and also learned that LAPACK ...
0
votes
1
answer
131
views
Why calling LAPACK ilaenv in C with the same parameter will sometimes obtain different return?
I used a docker container on M1 MacBook Pro with ubuntu 18.04 and ran a C program. In the main function I call ilaenv to check the block size for LAPACK routine DGETRF with size 1000*1000. The ...
-1
votes
1
answer
258
views
In what library is dgesvd_?
I'm trying to use the function dgesvd_() in a code and just can't find the library I have to include in order to the compiler to detect it!
I've only discovered some LAPACK or something like that but ...
7
votes
2
answers
10k
views
macOS Monterey - Install Scipy Error "No lapack/blas resources found"
I have installed pyenv on Mac using brew install pyenv. I want to run a python project which requires installation of scipy==1.5.4. I tried installing it using the command pip3 install scipy==1.5.4 ...
-1
votes
1
answer
165
views
gfortran SIGABRT error: the zgesvd function from lapack
I am coding a fortran 90 subroutine that calls the lapack function zgesvd. Unfortunately I get this error:
malloc(): corrupted top size
Program received signal SIGABRT: Process abort signal.
...
2
votes
1
answer
261
views
Efficient way to compute tensor change of components in Fortran
This is a follow up of this question.
I have an array D(:,:,:) of size NxMxM. Typically, for the problem that I am considering now, it is M=400 and N=600000 (I reshaped the array in order to give the ...
1
vote
0
answers
763
views
How to compile ipopt with BLIS and libFLAME on Windows with MinGW or/and cygwin
Related to my other question, I was trying to compile ipopt with the BLIS and libFLAME library, but am still struggling to get this set up correctly. Since there are many different sources of ...
1
vote
0
answers
23
views
Fortran LAPACK cblat1 check2 ctest: pass value instead of array? [duplicate]
I'm porting LAPACK over to Jai, and I stumbled upon the following strange code:
In LAPACK/cblat1/check2, line 569
CALL ctest(leny,cy,ct8(1,kn,ki),csize2(1,ksize),sfac)
ctest is called with an array ...
1
vote
0
answers
126
views
Poor numerical accuracy for the degenrate eigenvalues of companion matrices
When trying to compute the roots of a polynomial, I noticed that a common practice is to calculate the eigenvalues of the polynomial's companion matrix. For example, the "roots" function in ...
0
votes
0
answers
90
views
BLAS input matrix check
Currently I'm searching for how BLAS library is composed.
As I keep going, I could see few functions that get input matrix of specific form.
For instance, LEVEL 3 BLAS SYMM should get matrix A as a ...
3
votes
0
answers
426
views
LAPACKE or MAGMA GPU - inversion of matrix with Cholesky factorization - functions magma_dpotrf_gpu and magma_dpotri_gpu
I have a first version of a function that inverses a matrix of size m and using
magma_dgetrf_gpu and magma_dgetri_gpulike this :
// Inversion
magma_dgetrf_gpu( m, m, d_a, m, piv, &info);
...
1
vote
1
answer
751
views
How to properly use the -Xnvlink compiler options when we have 2 NVIDIA/CUDA GPU cards with NVLink hardware component
On Debian 10, I have 2 GPU cards RTX A6000 with NVlink hardware component and I would like to benefit of the potential combined power of both cards.
Currently, I have the following magma.make invoked ...
2
votes
1
answer
45
views
Creating a vector of size n based on an inputted matrix
So, I'm writing a function. In order to begin the computation, I need to create a vector of 1s. This is going to be multiplied by an inputted matrix A.
So if a matrix is 6x6, it becomes a vector of ...
0
votes
1
answer
1k
views
Quantum Espresso v6.8 not compiling on MacBook (Monterey 12.0.1 (21A559))
Following a guide posted here I have tried to install the newest version of quantum espresso (v6.8) on my MacBook (macOS: Monterey 12.0.1 (21A559)). I therefore installed all prerequisite packages (...
1
vote
1
answer
1k
views
Set libblas and liblapack used by R per user (not global/systemwide) Debian Linux 10
I can set the default BLAS/LAPACK for my system and subsequently used by R via:
sudo update-alternatives --config libblas.so.3-x86_64-linux-gnu
sudo update-alternatives --config liblapack.so.3-x86_64-...
1
vote
0
answers
481
views
Execution of simple MAGMA inversion matrix distributed on two GPU cards
I have below a simple program from MAGMA doc which inverses a large matrix on a GPU card.
#include <stdio.h>
#include <cuda.h>
#include "magma_v2.h"
#include "magma_lapack.h&...
1
vote
1
answer
709
views
How do libatlas3, liblapacke, and libopenblas0 interact with eachother?
I'm trying to figure out the interaction between the following library packages in Debian 11 and Ubuntu 20.04:
libatlas3-base
liblapacke
OpenBLAS
libopenblas0-openmp
libopenblas0-pthread
...
1
vote
1
answer
243
views
What is the calling convention difference between LAPACKE_zgetrf() and zgetrf_() in OpenBLAS?
I'm trying to support zgetrf() in both Ubuntu 18.04 and CentOS 7 by using dlopen() against the .so and opening the function in each version, but the calling convention is different. In CentOS it ...
1
vote
1
answer
632
views
What are the best driver routines in LAPACK for implementing the Moore-Penrose psudo inversion
I want to solve Y = X * A, for A (where Y is NxO, X is NxI, and A is IxO with N>>O,I)
I want to use the Moore-Penrose inverse A = inv(transpose(X) * X) * (transpose(X) * Y)
the square matrix: (...
2
votes
1
answer
348
views
Is it reasonable to expect identical results for LAPACK routines on two different processor architectures?
I'm trying to invert a 400x400 matrix with LAPACK using the Apple Accelerate library. I created a matrix inversion method using ?getrf_ and ?getri.
void invert() {
aligned_buffer<int> pivot(...
0
votes
1
answer
198
views
Eigen + MKL uses single core for complex matrix (ZHEEV)
there is a weird behavior from mkl on our cluster. I am calling Eigen::SelfAdjointEigenSolverEigen::MatrixXcd for a complex matrix (ZHEEV).
When I calculate the eigenvectors for large matrices (dim &...
0
votes
0
answers
572
views
When to switch from lapack to scalack?
I have a general question about scalapack and system resolution.
I am using DGESV (Fortran) on a dense matrix. From what size would it make sense to switch to Scalapack? From 10 000 X 10 000 ? 100 000 ...
1
vote
2
answers
374
views
How do you set configure.ac (autoconf) in my own application to auto-discover LAPACK, ATLAS, OpenBLAS, and KMP?
I'm new to autoconf as well as linear algebra libraries. So far as I can tell, LAPACK, ATLAS, OpenBLAS, and KML can co-exist on the filesystem but you can only use one of the libraries at link-time ...
1
vote
0
answers
805
views
Problem with Cmake with lapack API not found
When trying to build a file and compile it when I did cmake .. I've got the message below:
-- Configuring main project: VideoNLBayes
-- Setting CMAKE_PREFIX_PATH as /home/me/local/ for local libraries
...
0
votes
1
answer
252
views
How to import matrix into armadillo using binary files?
I am trying to import a matrix generated in MATLAB into armadillo. For example, I have a matrix "A" which is 100x1 double. I used information from a previous question on stackoverflow to ...
1
vote
1
answer
220
views
Problem in Heroku deployment - numpy.distutils.system_info.NotFoundError: No lapack/blas resources found
I am trying to deploy a flask based application on Heroku.
I connected my GitHub repository to the Heroku Platform and from the repository I am trying to push it to the deployment.
It goes fine until ...
1
vote
2
answers
4k
views
Error with pytorch compilation: LAPACK library not found in compilation. How to solve?
I am already desperate about this problem that I am having.
RuntimeError: inverse: LAPACK library not found in compilation
The easiest way to reproduce it is:
import torch
A = torch.rand(5,5)
torch....
2
votes
1
answer
237
views
What numpy workload would the yield the highest speed up? MMM? QR? SVD?
What numpy workload would yield the highest speed up when having MKL, OPENBLAS installed? MMM? QR? SVD? I have tried with MMM but I don't see a speed up, to the contrary it gets worse. My test code is ...
4
votes
2
answers
5k
views
How can I link numpy to use MKL as backend?
I have a numpy install and it shows no BLAS backend available:
(pyrepoux) bash-4.2$ python
Python 3.7.3 | packaged by conda-forge | (default, Dec 6 2019, 08:54:18)
[GCC 7.3.0] :: Anaconda, Inc. on ...
0
votes
0
answers
1k
views
Installing LAPACK using CMake on Windows
I would like to install LAPACK on my Windows.I am using CMake 3.21.0 GUI for my installation and the LAPACK version is 3.9.1.
I encountered the following error message:
CMake Error: Cannot open file ...
0
votes
1
answer
497
views
Why my inversions of matrices are such slow with LAPACKE in C++ : MAGMA Alternative and set up
I am using LAPACK to inverse a matrix: I did a reference passing, i.e by working on the address. Here below the function with an input matrix and an output matrix referenced by their address.
The ...
0
votes
0
answers
331
views
Scipy Blas/Lapack: Force use of AVX instruction set
I've written a simple cython program using scipy.linalg.cython_blas. When profiling the code, I see that the blas routines such as dgemv and dgemm are using the SSE instruction set. Given that my ...
0
votes
1
answer
814
views
Choleskey Decomposition in C++ via Lapack dpotrf gives invalid result
I'm trying to take the choleskey decomposition of a 1D double array using Lapack's dpotrf function.
It seems to work for some cases, but others it has strange behavior.
Here is my code:
int main(){
...
0
votes
3
answers
2k
views
R cannot load libraries calling lapack functions
I'm trying to install some of the popular R packages but somehow my R does not see the lapack installation. Or rather the compiler doesn't see it, I guess, because when it checks LAPACK_LIBS it says ...
0
votes
1
answer
1k
views
LAPACKE C++ linking error. Unable to find function
I'm looking to use the LAPACKE library to make C/C++ calls to the LAPACK library. On multiple devices, I have tried to compile a simple program, but it appears LAPACKE is not linking correctly.
Here ...
0
votes
1
answer
421
views
Matrix-vector-multiplication, Lost in Lapack
I would like to compute
x^T A x* (x transposed times matrix A times x conjugate complex)
using Lapack. I did not find a function for this. Or is there one? What is the fastest way of doing this?
8
votes
2
answers
3k
views
Accelerate framework uses only one core on Mac M1
The following C program (dgesv_ex.c)
#include <stdlib.h>
#include <stdio.h>
/* DGESV prototype */
extern void dgesv( int* n, int* nrhs, double* a, int* lda, int* ipiv,
...
2
votes
1
answer
227
views
Error in Lapack routine SGELS using an interface and allocatable WORK array
Problem:
Using an explicit interface for Lapack (http://www.netlib.org/lapack/) routines simplifies coding. There is a problem with routines like SGELS (https://www.netlib.org/lapack/explore-3.1.1-...
0
votes
0
answers
137
views
LAPACK, dgeev_ gives wrong Eigen Vectors for a Stochastic Matrix
I have the following code for calculating the Eigen Vectors (left and right) of a Stochastic matrix in C (with gcc compiler):
#include <stdio.h>
#include <stdlib.h>
#include <string....
1
vote
0
answers
307
views
Trouble linking llapacke
I'm learning to use BLAS and LAPACK on C, and I'm having trouble with the very first step: importing and linking the libraries.
My device is a Mac, and apparently neither Xcode nor the compiler can ...
0
votes
2
answers
337
views
Calling fortran function of lapack library from CUDA C
I am calling a fortran function sgesv() of lapack library for solving linear equations for unknown vector from my CUDA C routine. As per the general rule I am declaring the function as sgesv_() and ...