Questions tagged [openblas]
Questions regarding OpenBLAS, an open source library that implements BLAS API and has hand-crafted optimizations for specific processor types.
openblas
280
questions
58
votes
1
answer
93k
views
Install openblas via apt-get `sudo apt-get install openblas-dev` [closed]
Is it possible to install openblas via apt-get like sudo apt-get install openblas-dev?
Seems on ubuntu 14.04 it can't find it.
sudo apt-get install openblas-dev
Reading package lists... Done
...
54
votes
3
answers
49k
views
Compiling numpy with OpenBLAS integration
I am trying to install numpy with OpenBLAS , however I am at loss as to how the site.cfg file needs to be written.
When the installation procedure was followed the installation completed without ...
46
votes
1
answer
7k
views
Keras not using multiple cores
Based on the famous check_blas.py script, I wrote this one to check that theano can in fact use multiple cores:
import os
os.environ['MKL_NUM_THREADS'] = '8'
os.environ['GOTO_NUM_THREADS'] = '8'
os....
30
votes
7
answers
47k
views
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
I am facing a problem now, unable to run any program in the cluster. It gives error.
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC ...
19
votes
1
answer
9k
views
Multiple instances of Python running simultaneously limited to 35
I am running a Python 3.6 script as multiple separate processes on different processors of a parallel computing cluster.
Up to 35 processes run simultaneously with no problem, but the 36th (and any ...
17
votes
2
answers
12k
views
Set max number of threads at runtime on numpy/openblas
I'd like to know if it's possible to change at (Python) runtime the maximum number of threads used by OpenBLAS behind numpy?
I know it's possible to set it before running the interpreter through the ...
16
votes
5
answers
9k
views
dyld: Library not loaded: /usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib
When I run R I get:
dyld: Library not loaded: /usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib
Referenced from: /usr/local/Cellar/r/3.5.0_1/lib/libR.dylib
Reason: image not found
Abort trap:...
13
votes
3
answers
34k
views
Scipy installation issue, getting ImportError: libopenblas.so.0: cannot open shared object file or directory
I am installing Scipy-0.16.1 on Ubuntu 14.04
OpenBLAS_0.2.18 and Numpy-1.11.0 have been installed with no issues.
Scipy-0.16.1.tar.gz has been downloaded
site.cfg was copied and un-commented the ...
13
votes
3
answers
4k
views
Is it possible to switch between BLAS libraries without recompiling program?
For example can I have Atlas, OpenBlas, MKL installed on my Ubuntu 14.04 at the same time and switch between them without recompiling Caffe?
13
votes
2
answers
9k
views
Numpy with ATLAS or OpenBLAS?
After spending a huge amount of time on building the ATLAS from the source code, I found that libopenblas and libatals in the OpenSUSE 13.1 repository. My questions are
Does that easy-install (...
12
votes
1
answer
3k
views
performance of NumPy with different BLAS implementations
I'm running an algorithm that is implemented in Python and uses NumPy. The most computationally expensive part of the algorithm involves solving a set of linear systems (i.e. a call to numpy.linalg....
11
votes
0
answers
383
views
How can I use BLAS on Windows with the GNU toolchain?
I have this dependency:
blas = "0.18.1"
During building this simple program (no types used de facto in the program):
extern crate blas;
use blas::c::*;
I get these errors:
error: linking with `...
10
votes
2
answers
9k
views
Unable to import numpy: Error: /usr/lib/liblapack.so.3: undefined symbol: gotoblas
When I try to import numpy, I get the following error:
/usr/local/lib/python2.7/dist-packages/numpy/linalg/__init__.py in <module>()
49 from .info import __doc__
50
---> 51 from ....
9
votes
1
answer
6k
views
Cython prange slower for 4 threads then with range
I am currently trying to follow a simple example for parallelizing a loop with cython's prange.
I have installed OpenBlas 0.2.14 with openmp allowed and compiled numpy 1.10.1 and scipy 0.16 from ...
9
votes
1
answer
20k
views
How to check which BLAS is in my Ubuntu system?
In particular, I would like to know if xianyi's OpenBLAS has been installed.
I work on several PCs and had it installed in several PCs over the past couple of years, but I lost track which were not ...
7
votes
4
answers
12k
views
Tutorial for installing numpy with OpenBLAS on Windows
Please, I do need a light here. I want to install numpy using a good BLAS/LAPACK lib on Windows, but absolutely no page explains the process well enough. It seems OpenBLAS is a good and fast option.
...
7
votes
2
answers
440
views
Why is matrix product slower when matrix has very small values?
I create two matrices A and B of the same dimension. A contains larger values than B. The matrix multiplication A %*% A is about 10 times faster than B %*% B.
Why is this?
## disable openMP
library(...
6
votes
3
answers
15k
views
"/usr/bin/ld: cannot find -lopenblas" error in Caffe compilation
When I was compiling Caffe, I had this error, despite OpenBLAS is installed:
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: cannot find -lopenblas
collect2: ld ...
6
votes
2
answers
8k
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 ...
6
votes
1
answer
3k
views
Why is numpy.dot much faster than numpy.einsum?
I have numpy compiled with OpenBlas and I am wondering why einsum is much slower than dot (I understand in the 3 indices case, but I dont understand why it is also less performant in the two indices ...
6
votes
1
answer
5k
views
How to force armadillo library to link to local OpenBLAS during compilation
I need to have armadillo (current version is 5.100.1) available as a local library within $HOME (cluster application, and can't install on every compute node, but $HOME is shared folder). I'm using ...
6
votes
1
answer
3k
views
installing theano "blas error"
>>> import numpy # OK!
>>> import scipy # OK!
>>> import theano # warning
WARNING (theano.tensor.blas): Failed to import scipy.linalg.blas, and Theano
flag blas.ldflags is ...
6
votes
0
answers
4k
views
Why can R be linked to a shared BLAS later even if it was built with `--with-blas = lblas`?
The BLAS section in R installation and administration manual says that when R is built from source, with configuration parameter --without-blas, it will build Netlib's reference BLAS into a standalone ...
5
votes
1
answer
4k
views
Why does numpy.float16 break the OpenBlas/Atlas functionalities?
Ok, I know float16 is not a real primitive type, but it's simulated by Python/numpy. However, the question is: if that exists and Python allows to use it in arrays multiplication using the numpy.dot() ...
5
votes
1
answer
3k
views
"Too many memory regions" error with Dask
When using Dask with Dask array I suddenly get the following error and my kernel that dies / restarts.
The console says:
BLAS : Program is Terminated. Because you tried to allocate too many memory ...
5
votes
3
answers
8k
views
Setting up Anaconda for AMD Ryzen without MKL
Like many others, I've bought myself a new Ryzen CPU. I need to use Anaconda Python for my PhD (together with Tensorflow etc). Since Anaconda now comes pre-packaged with MKL which is slow on AMD CPUs, ...
5
votes
1
answer
4k
views
Floating-point number vs fixed-point number: speed on Intel I5 CPU
I have a C/C++ program which involves intensive 32-bit floating-point matrix math computations such as addition, subtraction, multiplication, division, etc.
Can I speed up my program by converting 32-...
5
votes
1
answer
6k
views
CMake, .dll vs .dll.a vs .a: What library should I specify in the CMake configuration?
I am working on Windows 10 and CMake 3.14.1.
I am trying to build OpenCV (Version 4.0.1) myself, since I need the contrib modules and the SFM module. I downloaded a prebuilt version of openBLAS 0.2....
5
votes
1
answer
1k
views
Build R with OpenBLAS
I'm trying to build R-devel / R-patched. I've read some links, connected with steps for doing this.
1) https://www.r-bloggers.com/2022/01/building-r-4-2-for-windows-with-openblas/
2) https://www.r-...
5
votes
1
answer
302
views
OpenBLAS issue with ComBat() function of the R Bioconductor SVA package on Torque cluster
I've a problem with ComBat() function from the SVA package of Bioconductor in R.
On my laptop (Latitude 5590 running a Linux Ubuntu 18 operating
system), it works well.
But if I ran it on a TORQUE ...
5
votes
1
answer
5k
views
Numpy dot operation is not using all cpu cores
I am doing numpy dot product on two matrices (Let us assume a and b are two matrices).
When the shape of a is (10000, 10000) and shape of b is (1, 10000) then the numpy.dot(a, b.T) is using all the ...
5
votes
2
answers
8k
views
Installing OpenBLAS on CentOS / Fedora
In a Java project I am using matrix-toolkits-java (MTJ) for efficient matrix multiplication. This relies on netlib-java, which in turn relies on an optimized implementation of BLAS and LAPACK ...
5
votes
1
answer
7k
views
Link against openblas; do I need still Lapack?
I do compile Ipopt with openblas using the linkage: ./configure --with-blas-incdir="-L/home/moritz/build/CoinIpopt_test/ThirdParty/openblas/include/" --with-blas-lib="-L/home/moritz/build/...
5
votes
0
answers
264
views
How can I have a finer control on number of threads used for each BLAS kernel call on CPU?
I am writing an OpenMP code calling different BLAS kernels, mostly DGEMMs with different sizes, in different threads. To maximize performance I want to have control over the number of threads I am ...
5
votes
0
answers
3k
views
Checking BLAS and LAPACK libraries links in scipy and numpy
I'm trying to link my code (scipy.linalg.solve notably) to a given library like OpenBLAS.
I am using python 3.7.7 in a virtual environment:
Python 3.7.7 (default, Mar 29 2020, 18:12:06)
[Clang 11.0.3 ...
5
votes
0
answers
983
views
Attempting to run R with Atlas/OpenBLAS on redhat
For two days I've been trying to install Openblas/atlas with Lapack and use it in R. it's driving me crazy. I'm at a point where I can't even think anymore.
My server uses:
Red Hat Enterprise Linux ...
4
votes
1
answer
5k
views
Why numpy/scipy is faster without OpenBLAS?
I made two installations:
brew install numpy (and scipy) --with-openblas
Cloned GIT repositories (for numpy and scipy) and built it myself
After I cloned two handy scripts for verification of these ...
4
votes
1
answer
3k
views
static linking to libopenblas
I am compiling a C++ program with -static so that I can take my program to a server and run it. The server has not all libraries installed I am linking with and when trying to run the program I get ...
4
votes
2
answers
10k
views
How can I make NumPy use OpenBlas in Ubuntu?
I have both BLAS and OpenBLAS installed:
$ dpkg -l \*blas\* | grep ^i
ii libblas-dev 1.2.20110419-7 amd64 Basic ...
4
votes
1
answer
12k
views
Why would setting "export OPENBLAS_NUM_THREADS=1" impair the performance?
I try to set "export OPENBLAS_NUM_THREADS=1" as this document suggests. But I found a strange phenomenon that setting this significantly impairs the performance of my RL algorithms(I've done some ...
4
votes
1
answer
239
views
Problem calling BLAS from julia directly (could not find function :zgemm_64_ in library libopenblas64_)
I'm trying to call BLAS in Julia using ccall like this
ccall((BLAS.@blasfunc(:zgemm_), BLAS.libblas),...other arguments)
For as far as I can tell, this is the same way the LinearAlgebra package ...
4
votes
1
answer
879
views
Cloud Run - OpenBLAS Warnings and application restarts (Not a cold start issue)
Problem
I have an application running on a Cloud Run instance for a 5 months now.
The application has a startup time of about 3 minutes and when the startup is over it does not need much RAM.
Here are ...
4
votes
1
answer
359
views
BLAS function returns zero in Fortran90
I am learning to use BLAS in Fortran90, and wrote a simple program using the subroutine SAXPY and the function SNRM2. The program computes the distance between two points by subtracting one vector ...
4
votes
1
answer
5k
views
OpenBLAS error when importing numpy: `pthread_creat error in blas_thread_init function`
All of a sudden, I cannot import numpy:
import numpy as np
OpenBLAS: pthread_creat error in blas_thread_init function. Error code:1
I'm running numpy from Anaconda 1.10.1-py27_0 but I had the same ...
4
votes
1
answer
1k
views
R and nvblas.dynlib (on a mac)
I have R on my mac installed via CRAN. I also have openblas installed via homebrew. I can switch between BLAS implementations as follows:
Reference blas (netlib I think):
ln -sf /Library/Frameworks/...
4
votes
1
answer
7k
views
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 ...
4
votes
3
answers
6k
views
How to use multi CPU cores to train NNs using caffe and OpenBLAS
I am learning deep learning recently and my friend recommended me caffe. After install it with OpenBLAS, I followed the tutorial, MNIST task in the doc. But later I found it was super slow and only ...
4
votes
1
answer
545
views
Error when trying to add OpenBLAS dependency twice: via add_subdirectory and find_package at the same time
I am making use of OpenBLAS for both my BLAS and LAPACK routine calls. I do not want the user base of my C++ library to have to install the dependency on their machine. So I want to supply the ...
4
votes
0
answers
2k
views
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 ...
3
votes
1
answer
3k
views
Does installing BLAS/ATLAS/MKL/OPENBLAS will speed up R package that is written in C/C++?
I found that using one of BLAS/ATLAS/MKL/OPENBLAS will give improvement on speed in R. However, will it still improve the R Package that is written in C or C++?
for example, R package Glmnet is ...