Page 1 of 1

Unhandled exception while calling dgemm_

PostPosted: Wed Nov 02, 2011 12:04 am
by wwnigel
I am using dgemm_ for matrix multiplication in visual studio, but an "Unhandled exception" was occurred while calling dgemm_. The error information and code section is listed as below:

The code is very short and simple. Did anyone meet the similar problem while using dgemm_ in lapack?



Unhandled exception at 0x000693aa in ****.exe: 0xC0000005: Access violation reading location 0x00000002.

Code: Select all
   int M, N, K, lda, ldb, ldc;
   M = N = K = 2;
   lda = ldb = ldc = 2;
   char transa = 'N';
   char transb = 'N';
   double alpha = 1.0;
   double beta = 0.0;
   double aa[4] = {1,2,3,4};
   double bb[4] = {1,1,1,1};
   double cc[4];
   dgemm_ (&transa,
      &transb,
      (integer*) &M,
      (integer*) &N,
      (integer*) &K,
      &alpha,
      aa,
      (integer*)lda,
      bb,
      (integer*)ldb,
      &beta,
      cc,
      (integer*)ldc );

Re: Unhandled exception while calling dgemm_

PostPosted: Tue Nov 29, 2011 10:40 pm
by admin
lda, ldb and ldc needs the &
Julie