c++ - OpenBLAS crash on Windows -


i'm working openblas on windows , experiencing crashes. i'm using test code bellow (entire program), taken intel mkl here (i modified it). same problem other function calls. step step debugging, crash occurs after return 0 in main. loop outputs matrix print correct result.

double *a, *b, *c; int m, n, k, i, j; double alpha, beta;  m = 2, k = 2, n = 2; alpha = 1.0; beta = 0.0;  = (double *) malloc(m*k*sizeof(double)); b = (double *) malloc(k*n*sizeof(double)); c = (double *) malloc(m*n*sizeof(double));  (i = 0; < (m*k); i++) a[i] = (double) (i + 1); (i = 0; < (k*n); i++) b[i] = (double) (-i - 1); (i = 0; < (m*n); i++) c[i] = (double) 0.0;   cblas_dgemm(cblasrowmajor, cblasnotrans, cblasnotrans,     m, n, k, alpha, a, k, b, n, beta, c, n);   printf("\n top left corner of matrix c: \n"); (i = 0; i<min(m, 6); i++) {     (j = 0; j<min(n, 6); j++)         printf("%12.5g", c[j + i*n]);     printf("\n"); }  free(a); free(b); free(c); 

the crash occurs after exit(mainret) executed.

 #else  /* !defined (_winmain_) && defined (_crt_app) */         if ( !managedapp )         {  #ifndef _crt_app             exit(mainret);  #else             _exit_app();  #endif  /* _crt_app */  #if !defined(_winmain_) && defined(_crt_app)             /* winapi_family_app "windows" applications should never reach here,              * console applications if not exit process.              * so, terminate process console apps              */             exitprocess(mainret);  #endif         } 

the first thing thought of esp value, might corrupted if function calling conventions not match (i'm using prebuilt mingw openblas 0.2.14 libraries), esp checks in debug build pass successfully. i'm using msvc++ compiler , built assembly 32-bit.

how can pinpoint problem more precisely or might cause behind crashes?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -