Certain CBLAS functions crash

Certain CBLAS functions crash

diff's picture

Gents,


I am trying to make MKL 9.0 run in Visual Studio 2005.


I have the following code fragment :



nt main(void)


{


int n=1;


MKL_Complex8 a;


MKL_Complex8 *b=new MKL_Complex8[1];


b->real=3.141592;


MKL_Complex8 *c=new MKL_Complex8[1];


int* indx=new int[1];


indx[0]=1;


cblas_caxpyi(n, &a, b, indx, c);


int X=1;


double* pX=new double[2];


pX[0]=1;pX[1]=2;


int incY=1;


int incX=1;


double* pY=new double[2];


pY[0]=3; pY[1]=4;


cblas_dcopy(X , pX, incX, pY, incY);


}


The code compiled, the first call does not crash, while the second crashes.


I was linking the following lib files : mkl_c_dll.lib libguide40.lib


The system I was running : P4 (2.8GHz), 512 MB RAM ( free : ~150 MB at the time of computation )


Any help is appreciated.


BR-Diff



1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.