intel-mkl

Gohlke's numpy + mkl installation - Change MKL install directory on Windows

不打扰是莪最后的温柔 提交于 2019-12-11 06:22:50
问题 I've been trying to get a working fast numpy with BLAS on Windows, and so far, the only method that seems feasible is downloading the precompiled library with MKL from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy. So far ok, but chekcing later numpy.__config__.show() , I see it points to directories that don't exist, such as C:\program files (x86)\IntelSWTools I assume numpy is trying to place the MKL libraries in this directory, but I have no administration privileges for creating files

Cholesky with ScaLAPACK

烈酒焚心 提交于 2019-12-11 03:17:44
问题 I am trying to do a Cholesky decomposition via pdpotrf() of MKL-Intel's library, which uses ScaLAPACK. I am reading the whole matrix in the master node and then distribute it like in this example. Everything works fine when the dimension of the SPD matrix is even. However, when it's odd, pdpotrf() thinks that the matrix is not positive definite. Could it be because the submatrices are not SPD? I am working with this matrix: and the submatrices are (with 4 processes and blocks of size 2x2): A

Matrix multiplication with MKL

喜夏-厌秋 提交于 2019-12-11 00:39:25
问题 I have the CSR coordinates of a matrix. /* alloc space for COO matrix */ int *coo_rows = (int*) malloc(K.n_rows * sizeof(int)); int *coo_cols = (int*) malloc(K.n_rows * sizeof(int)); float *coo_vals = (float*) malloc(K.n_rows * sizeof(float)); /*Load coo values*/ int *rowptrs = (int*) malloc((N_unique+1)*sizeof(int)); int *colinds = (int*) malloc(K.n_rows *sizeof(int)); double *vals = (double*) malloc(K.n_rows *sizeof(double)); /* take csr values */ int job[] = { 2, // job(1)=2 (coo->csr with

MKL Sparse BLAS segfault when transposing CSR with 100M rows

只愿长相守 提交于 2019-12-11 00:03:51
问题 I am trying to use MKL Sparse BLAS for CSR matrices with number of rows/columns on the order of 100M. My source code that seems to work fine for 10M rows/columns fails with segfault when I increase it to 100M. I isolated the problem to the following code snippet: void TestSegfault1() { float values[1] = { 1.0f }; int col_indx[1] = { 0 }; int rows_start[1] = { 0 }; int rows_end[1] = { 1 }; // Step 1. Create 1 x 100M matrix // with single non-zero value at (0,0) sparse_matrix_t A; mkl_sparse_s

Proper way to calculate `trans(a)*inv(b)*a` with Intel MKL

喜欢而已 提交于 2019-12-10 22:42:04
问题 I am using Intel's MKL LAPACKE and CBLAS to calculate yn = trans(a)*inv(zt)*a + trans(b)*inv(zl)*b Where a and b are m-by-n real matrices, zt and zl are m-by-m complex matrices. The resulting complex matrix yn is n-by-n. Here is how I am doing it: zt <- inv(zt) zl <- inv(zl) c <- zt*a yn <- trans(a)*c c <- zl*b yn <- trans(b)*c + yn The actual code: #include <math.h> #include <complex.h> #include <stdlib.h> #include <mkl_types.h> #define MKL_Complex16 _Complex double //overwrite type #include

How to define in Cython an external C++ function which has input parameters as enums? MKL

这一生的挚爱 提交于 2019-12-10 20:28:29
问题 So trying to wrap this in Cython from MKL, and digging in the mkl_cblas.h I see these are enums: typedef enum {CblasRowMajor=101, CblasColMajor=102} CBLAS_ORDER; typedef enum {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113} CBLAS_TRANSPOSE; And here is the function declaration: void cblas_dgemm(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const MKL_INT M, const MKL_INT N, const MKL_INT K, const double alpha, const double *A, const MKL_INT lda,

How to use Intel fortran compiler with MKL on command line

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 19:37:06
问题 I've freshly installed the Intel® Parallel Studio XE Composer Edition for Fortran OS X* (student version). It comes with the Math Kernel Library, which is why I bought it. I'm having a hard time getting started with MKL. Here's what I've done step-by-step. 1) Installed Intel® Parallel Studio XE Composer Edition for Fortran OS X* (no problem). I can run a 'hello world' script using ifort and throw the -mkl link command on at the end with no problem (not calling any mkl commands just yet). 2)

Why is matlab's mldivide so much better than dgels?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 19:05:45
问题 Solve Ax = b . Real double. A is overdetermined Mx2 with M >> 2. b is Mx1. I've run a ton of data against mldivide , and the results are excellent. I wrote a mex routine with MKL LAPACKE_dgels and it's nowhere near as good. The results have a ton of noise and the underlying signal is barely there. I checked the routine against the MKL example results first. I've searched through the mldivide doc (flowchart) and the SO questions. All I found is Matlab uses QR factorization for overdetermined

How to link Intel MKL library, just cblas_dgemm function is used

随声附和 提交于 2019-12-10 15:14:57
问题 I want to test Intel MKL matrix multiplication, So I include and I just use the cblas_dgemm function, but it always says undefined reference to `cblas_dgemm' I also link the -lmkl_core -lmkl_blas95_lp64 -lmkl_lapack95_lp64 , But I have testes many combinations among the libraries in the $MKLROOT/lib/intel64/ directory, the error still exists. Could someone give me some advice, please? Thanks. 回答1: Maybe this is a right answer, we can use cblas_ : In the project file of a QT Creator: unix {

MKL Performance on Intel Phi

本小妞迷上赌 提交于 2019-12-08 19:47:46
问题 I have a routine that performs a few MKL calls on small matrices (50-100 x 1000 elements) to fit a model, which I then call for different models. In pseudo-code: double doModelFit(int model, ...) { ... while( !done ) { cblas_dgemm(...); cblas_dgemm(...); ... dgesv(...); ... } return result; } int main(int argc, char **argv) { ... c_start = 1; c_stop = nmodel; for(int c=c_start; c<c_stop; c++) { ... result = doModelFit(c, ...); ... } } Call the above version 1. Since the models are independent