Community
cancel
Showing results for 
Search instead for 
Did you mean: 
chao_n_
Beginner
27 Views

Deal with huge matrix

I have written some codes with MKL library, but recently these codes do not work. They can be complied well and do not report any error when I run it. However, they did not work for some huge matrix operations. They keep running, but no results return. Here is an example code. When the variable nID exceed 31, the program will keep running forever.

#include <stdio.h>
#include <mkl.h>
int main(){
int nID=31;
int nSNP=33;
double *mMatrix = (double*) calloc(nID*nSNP,sizeof(double));
double *AGmatrix = (double*) calloc(nID*nID,sizeof(double));
    const CBLAS_LAYOUT Layout=CblasRowMajor;
    double alpha=1;
    double beta=0;
    cblas_dgemm (Layout, CblasTrans, CblasNoTrans, nID, nID, nSNP, alpha, mMatrix, 
nID, mMatrix, nID, beta, AGmatrix, nID);
0 Kudos
0 Replies
Reply