blas

Is armadillo solve() thread safe?

懵懂的女人 提交于 2019-12-03 04:08:06
In my code I have loop in which I construct and over determined linear system and try to solve it: #pragma omp parallel for for (int i = 0; i < n[0]+1; i++) { for (int j = 0; j < n[1]+1; j++) { for (int k = 0; k < n[2]+1; k++) { arma::mat A(max_points, 2); arma::mat y(max_points, 1); // initialize A and y arma::vec solution = solve(A,y); } } } Sometimes, quite randomly the program hangs or the results in the solution vector are NaN. And if I put do this: arma::vec solution; #pragma omp critical { solution = solve(weights*A,weights*y); } then these problem don't seem to happen anymore. When it

Mystified by qr.Q(): what is an orthonormal matrix in “compact” form?

好久不见. 提交于 2019-12-03 03:51:24
问题 R has a qr() function, which performs QR decomposition using either LINPACK or LAPACK (in my experience, the latter is 5% faster). The main object returned is a matrix "qr" that contains in the upper triangular matrix R (i.e. R=qr[upper.tri(qr)] ). So far so good. The lower triangular part of qr contains Q "in compact form". One can extract Q from the qr decomposition by using qr.Q() . I would like to find the inverse of qr.Q() . In other word, I do have Q and R, and would like to put them in

Any good documentation for the cblas interface? [closed]

吃可爱长大的小学妹 提交于 2019-12-03 02:20:48
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Can someone recommend a good reference or tutorial for the cblas interface? Nothing comes up on google, all of the man pages I've found are for the fortran blas interface, and the pdf that came with MKL literally took ten seconds to search and wasn't helpful. In particular, I'm curious why there is an extra parameter for row vs. column-major; can't the same operations already be achieved with the transpose flags? It

Fortran 90/95 library for sparse matrices?

拜拜、爱过 提交于 2019-12-03 02:06:15
I am looking for a library for dealing with sparse matrices in fortran 90/95. I only need very basic operations like matrix-vector multiplication. What do you suggest I use? I have searched around and an extension(?) to BLAS called "sparse blas", documented in chapter 3 of the blast technical forum specification: http://www.netlib.org/blas/blast-forum/ , seems ideal. According to that document, there should be a fortran 95 interface to the library. However, I haven't been able to find an actual implementation of this specification anywhere that I was able to download. I am kind of getting the

What is the relation between BLAS, LAPACK and ATLAS

别等时光非礼了梦想. 提交于 2019-12-03 00:02:48
问题 I don't understand how BLAS, LAPACK and ATLAS are related and how I should use them together! I have been looking through all of their manuals and I have a general idea of BLAS and LAPACK and how to use them with the very few examples I find, but I can't find any actual examples using ATLAS to see how it is related with these two. I am trying to do some low level work on matrixes and my primary language is C. First I wanted to use GSL, but it says that if you want the best performance you

How to make sure the numpy BLAS libraries are available as dynamically-loadable libraries?

一个人想着一个人 提交于 2019-12-02 22:13:03
The theano installation documentation states, that theano will as a default use the BLAS libraries from numpy, if the "BLAS libraries are available as dynamically-loadable libraries". This seems not to be working on my machine, see error message. How do I find out, if the numpy BLAS libraries are availalbe as dynamically-loadable? How do I recompile the numpy BLAS libraries, if they are not dynamically-loadable? Please indicate, if you would need more information! Error message We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure

Distributing Cython based extensions using LAPACK

我的梦境 提交于 2019-12-02 19:48:29
I am writing a Python module that includes Cython extensions and uses LAPACK (and BLAS ). I am open to using either clapack or lapacke , or some kind of f2c or f2py solution if necessary. What is important is that I am able to call lapack and blas routines from Cython in tight loops without Python call overhead. I've found one example here . However, that example depends on SAGE. I want my module to be installable without installing SAGE, since my users are not likely to want or need SAGE for anything else. My users are likely to have packages like numpy, scipy, pandas, and scikit learn

What is a good free (open source) BLAS/LAPACK library for .net (C#)? [closed]

我是研究僧i 提交于 2019-12-02 19:28:24
I have a project written in C# where I need to do various linear algebraic operations on matrices (like LU-factorization). Since the program is mainly a prototype created to confirm a theory, a C# implementation will suffice (compared to a possibly speedier C++ one), but I would still like a good BLAS or LAPACK library available to save me some coding. Long story short, can anybody recommend a free/open source BLAS or LAPACK library for use with .net? Best regards Egil. Update: Found Math.NET Numerics today, looks interesting, anybody have any experience with that? AMD's ACML is a free

Replicating BLAS matrix multiplication performance: Can I match it?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 18:38:24
Background If you have been following my posts, I am attempting to replicate the results found in Kazushige Goto's seminal paper on square matrix multiplication C = AB . My last post regarding this topic can be found here . In that version of my code, I follow the memory layering and packing strategy of Goto with an inner kernel computing 2x8 blocks of C using 128 bit SSE3 intrinsics. My CPU is i5-540M with hyperthreading off. Additional info about my hardware can be found in another post and is repeated below. My Hardware My CPU is an Intel i5 - 540M. You can find the relevant CPUID

What is the relation between BLAS, LAPACK and ATLAS

こ雲淡風輕ζ 提交于 2019-12-02 13:50:19
I don't understand how BLAS, LAPACK and ATLAS are related and how I should use them together! I have been looking through all of their manuals and I have a general idea of BLAS and LAPACK and how to use them with the very few examples I find, but I can't find any actual examples using ATLAS to see how it is related with these two. I am trying to do some low level work on matrixes and my primary language is C. First I wanted to use GSL, but it says that if you want the best performance you should use BLAS and ATLAS. Is there any good webpage giving some nice examples of how to use these (in C)