blas

Problems with porting a fortran program from ubuntu to windows

人走茶凉 提交于 2019-12-10 12:11:16
问题 I previously had some troubles updating old code that still needed a not supported compiler and expensive libraries to a version with gfortran in Eclipse on Windows. I let it rest for a while and recently I took a whole other approach, rebuilding the program from scratch, developping on a ubuntu machine, but now I want to bring it back to a windows machine so that my co-workers can contribute on it. The status: Program compiles, runs and gives good results on an ubuntu machine with the GCC

Matrix-multiplication using BLAS from Common Lisp

我是研究僧i 提交于 2019-12-09 04:11:35
Let's say I have two matrices (in the form of a Common Lisp array) foo and bar such that: (defvar foo #2A((2 1 6) (7 3 4))) (defvar bar #2A((3 1) (6 5) (2 3))) I would like to perform a matrix multiplication using BLAS without using wrappers such as Matlisp, GSLL, LLA, & co. so that I get an array with the result: #2A((24 25) (47 34)) Which steps should I take to perform such operation? My understanding is that I should call the BLAS matrix multiplication function from the REPL and pass it my arguments foo and bar. In R, I can easily do it like this: foo %*% bar How can I do it in Common Lisp?

numpy OpenBLAS set maximum number of threads

冷暖自知 提交于 2019-12-08 16:05:14
问题 I am using numpy and my model involves intensive matrix-matrix multiplication. To speed up, I use OpenBLAS multi-threaded library to parallelize the numpy.dot function. My setting is as follows, OS : CentOS 6.2 server #CPUs = 12, #MEM = 96GB python version: Python2.7.6 numpy : numpy 1.8.0 OpenBLAS + IntelMKL $ OMP_NUM_THREADS=8 python test_mul.py code, of which I took from https://gist.github.com/osdf/ test_mul.py : import numpy import sys import timeit try: import numpy.core._dotblas print

Matrix-multiplication using BLAS from Common Lisp

拜拜、爱过 提交于 2019-12-08 06:45:51
问题 Let's say I have two matrices (in the form of a Common Lisp array) foo and bar such that: (defvar foo #2A((2 1 6) (7 3 4))) (defvar bar #2A((3 1) (6 5) (2 3))) I would like to perform a matrix multiplication using BLAS without using wrappers such as Matlisp, GSLL, LLA, & co. so that I get an array with the result: #2A((24 25) (47 34)) Which steps should I take to perform such operation? My understanding is that I should call the BLAS matrix multiplication function from the REPL and pass it my

Theano with Anaconda on Windows: how to setup BLAS?

我怕爱的太早我们不能终老 提交于 2019-12-08 05:19:29
I've used Anaconda to install Theano (and Keras) on Windows 7 64bit. Here are my steps. Install the latest Anaconda for Python 3.5 conda install mingw libpython pip install Theano conda install pydot-ng pip install keras Edit .keras/keras.json to use "theano" instead of "tensorflow". Open Jupyter, copy and paste this code: https://github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py It executes fine until the call to model.fit : imports, data download, model compilation all work. Please note that I set data_augmentation to False. The call to model.fit fails with the following error

Armadillo + Matlab Mex segfault

北城以北 提交于 2019-12-07 23:25:32
问题 I fiddled with this the whole day, so I thought I might make everyone benefit from my experience, please see my answer below. I first had a problem with running a compiled Mex file within Matlab, because Matlab complained that it couldn't open the shared library libarmadillo . I solved this using the environment variables LD_LIBRARY_PATH and LD_RUN_PATH ( DYLD_LIBRARY_PATH and LYLD_RUN_PATH in osx). The problem remained however, that a simple test file would segfault at runtime even though

How can I make NumPy use OpenBlas in Ubuntu?

a 夏天 提交于 2019-12-07 15:42:43
问题 I have both BLAS and OpenBLAS installed: $ dpkg -l \*blas\* | grep ^i ii libblas-dev 1.2.20110419-7 amd64 Basic Linear Algebra Subroutines 3, static library ii libblas3 1.2.20110419-7 amd64 Basic Linear Algebra Reference implementations, shared library ii libopenblas-base 0.2.8-6ubuntu1 amd64 Optimized BLAS (linear algebra) library based on GotoBLAS2 ii libopenblas-dev 0.2.8-6ubuntu1 amd64 Optimized BLAS (linear algebra) library based on GotoBLAS2 However, NumPy still says that OpenBLAS is

memory leak in dgemm_

房东的猫 提交于 2019-12-07 13:01:06
问题 I am currently working on an application which involves lots and lots of calls to blas routines. Routinely checking for memory leaks I discovered, that I am loosing bytes in a dgemm call. The call looks like this: // I want to multiply 2 nxn matrices and put the result into C - an nxn matrix double zero = 0.0; double one = 1.0; double n; // matrix dimension char N = 'N'; dgemm_(&N, &N, &n, &n, &n, &one, A, &n, B, &n, &zero, C, &n); A,B and C are double fields of size n*n. The valgrind output

Link MKL to an installed Numpy in Anaconda?

旧城冷巷雨未停 提交于 2019-12-07 10:10:26
问题 >>> numpy.__config__.show() atlas_threads_info: NOT AVAILABLE blas_opt_info: libraries = ['f77blas', 'cblas', 'atlas'] library_dirs = ['/home/admin/anaconda/lib'] define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')] language = c atlas_blas_threads_info: NOT AVAILABLE openblas_info: NOT AVAILABLE lapack_opt_info: libraries = ['lapack', 'f77blas', 'cblas', 'atlas'] library_dirs = ['/home/admin/anaconda/lib'] define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')] language = f77 openblas_lapack_info: NOT

Docker images with architecture optimisation?

眉间皱痕 提交于 2019-12-07 09:20:07
问题 Some libraries such as BLAS/LAPACK or certain optimisation libraries get optimised for the local machine architecture upon compilation time. Lets take OpenBlas as an example. There exist two ways to create a Docker container with OpenBlas: Use a Dockerfile in which you specify a git clone of the OpenBlas library together with all necessary compilation flags and build commands. Pull and run someone else's image of Ubuntu + OpenBlas from the Docker Hub. Option (1) guarantees that OpenBlas is