Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- problem with cblas_zgemm

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Sunny_Beast

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2011
04:54 PM

74 Views

problem with cblas_zgemm

I am trying MKL 10.3 provided with c++ composer xe for mac.

I was trying this simple code : for C = I*A;

???? but getting C as all zeros

#include

#include

using namespace std;

int main () {

MKL_Complex16 A[2], I[4], C[2], alpha, beta;

I[0].real = 1.0;I[0].imag = 1.0;

I[1].real = 1.0;I[1].imag = 1.0;

I[2].real = 1.0;I[2].imag = 1.0;

I[3].real = 1.0;I[3].imag = 1.0;

A[0].real = 10.0;A[0].imag = 1.0;

A[1].real = 11.0;A[1].imag = 11.0;

alpha.real = 1.0; alpha.imag = 0.0;

beta.real = 0.0; beta.imag = 0.0;

cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 2, 2, 1, α, I, 2, A, 2, β, C, 2);

cout << C[0].real << "+" << C[0].imag<

return 0;

}

// its a cpp file

build it with:

icpc main.cpp -o results_t -static-intel -DMKL_ILP64 -m64 /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_intel_ilp64.a /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_intel_thread.a /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_core.a /Developer/opt/intel/composerxe-2011.4.184/compiler/lib/libiomp5.a -lpthread

//results are

0+0

0+0

1 Solution

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-10-2011
05:09 AM

74 Views

From the call to cblas_zgemm one would conclude from the values given for the arguments m, n and k that matrix I is of size 2 X 1 and A is of size 1 X 2. But that would make the product I.A of size 2 X 2. However, the apparent size of matrix C is different. This discrepancy needs to be resolved.

Link Copied

1 Reply

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-10-2011
05:09 AM

75 Views

From the call to cblas_zgemm one would conclude from the values given for the arguments m, n and k that matrix I is of size 2 X 1 and A is of size 1 X 2. But that would make the product I.A of size 2 X 2. However, the apparent size of matrix C is different. This discrepancy needs to be resolved.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.