Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6743 Discussions

problem with cblas_cgemm3m when MKL_Domain_Set_Num_Threads(1, MKL_DOMAIN_BLAS)

yang_w_1
Beginner
208 Views

dear,

     I'm using cblas_cgemm3m to calculate matrix multiply matrix. when i use default mkl_domain_num_threads, api return correct result .

but when i use MKL_Domain_Set_Num_Threads(1, MKL_DOMAIN_BLAS),the result is wrong.

what's wrong with me?

mkl version i using is 10.3.7.

code below:

    int iRows = 24;
    int iCols = 25;
    int iLength = iRows*iCols;
    std::shared_ptr<std::complex<float> > pDataSrc(new std::complex<float>[iLength],std::default_delete<std::complex<float>[]>());
    std::shared_ptr<std::complex<float> > pDataRes(new std::complex<float>[iLength],std::default_delete<std::complex<float>[]>());
    //MKL_Domain_Set_Num_Threads(1, MKL_DOMAIN_BLAS);
    ReadBin(pDataSrc.get(),iLength*sizeof(std::complex<float>),"CORR_1.bin");
    MKL_Complex8 alpha;alpha.real = 1.0f;alpha.imag = 0.0f;
    MKL_Complex8 beta;beta.real = 0.0f;beta.imag = 0.0f;
    cblas_cgemm3m(CblasRowMajor, CblasNoTrans, CblasConjTrans,
        iRows,iRows,iCols,&alpha,pDataSrc.get(),iCols,pDataSrc.get(),iCols,&beta,pDataRes.get(),iRows);

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
208 Views

pls check the problem with the latest 11.3 version of MKL( you may take the eval version for 30 days). The similar symptoms were fixed in the past versions.

Reply