Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6651 Discussions

Parameter error for cblas_zgemmt with CblasConjTrans

Kotas__Charlotte
Beginner
657 Views

I'm having trouble getting cblas_zgemmt to work with the "CblasConjTrans" option.  I'm currently getting the error "Intel MKL ERROR: Parameter 4 was incorrect on entry to cblas_zgemmt." 

The line of code that is giving the error is as follows:

  cblas_zgemmt( CblasColMajor, CblasLower, CblasNoTrans, CblasConjTrans, N, K, &alpha, d, N, d, N, &beta, C, N );

For full context, see the attached main.cpp file.

 

The documentation at https://software.intel.com/en-us/mkl-developer-reference-c-cblas-gemmt lists CblasConjTrans as a valid option for transa and transb, and the sample program that I've attached builds without error. The program will run if the option "CblasTrans" is used instead of "CblasConjTrans" for transb, suggesting that I am on the right track.

I'm using CentOS Linux 7, gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC), and Intel MKL 2020.0.166. I also saw this error before I updated MKL from the 2019.4.243 to the 2020 version.  The attached makefile produced the following build commands:

g++  -O3 -std=c++11 -mcmodel=large -I/opt/intel/compilers_and_libraries/linux/mkl/include    -c main.cpp -o main.o
gcc -O3 -std=c++11 -mcmodel=large -o test main.o  -Wl,--start-group /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.a /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64_lin/libmkl_sequential.a /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64_lin/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl    -lstdc++ -lm

Is this my mistake or a problem with the library/documentation?

Thank you for your help!

0 Kudos
1 Solution
Aaron_J_Intel2
Employee
657 Views

Until the cblas interface fix is available, please consider the following work around.

>     // cblas_zgemmt( CblasColMajor, CblasLower, CblasNoTrans, CblasConjTrans,
>     //         N, K,
>     //         &alpha, d, N, d, N, &beta, C, N );

>     zgemmt("L", "N", "C",
>             &N, &K,
>             &alpha, d, &N, d, &N, &beta, C, &N );

 

View solution in original post

7 Replies
Aaron_J_Intel2
Employee
657 Views

Hi Charlotte,

 

I'm looking into this.  It might be a bug in the library.  Thank you for providing a code sample and makefile. :-)

 

Aaron

Gennady_F_Intel
Moderator
657 Views

here is the output I see when reproding the case

MKL_VERBOSE Intel(R) MKL 2020.0 Product build 20191122 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions (Intel(R) AVX) enabled processors, Lnx 2.80GHz lp64 intel_thread
MKL_VERBOSE ZGEMM(N,C,4,4,6,0x7ffe057a6208,0x649080,4,0x649080,4,0x7ffe057a6220,0x65be30,4) 106.37us CNR:OFF Dyn:1 FastMM:1 TID:0  NThr:20

 after cblas_zgemm : C=
 ( 11.2509 + 1j*  0.0000) (  6.2208 + 1j*  4.8820) (  2.6395 + 1j* -8.1273) ( -2.8260 + 1j*  2.7114)
 (  6.2208 + 1j* -4.8820) ( 16.2653 + 1j*  0.0000) ( -0.3040 + 1j* -9.3907) ( -0.3793 + 1j* -2.7510)
 (  2.6395 + 1j*  8.1273) ( -0.3040 + 1j*  9.3907) ( 17.3026 + 1j*  0.0000) ( -3.5431 + 1j*  3.3478)
 ( -2.8260 + 1j* -2.7114) ( -0.3793 + 1j*  2.7510) ( -3.5431 + 1j* -3.3478) ( 15.1319 + 1j*  0.0000)

Intel MKL ERROR: Parameter 4 was incorrect on entry to cblas_zgemmt.
 

Aaron_J_Intel2
Employee
657 Views

Yes, this is a bug.   The documentation is correct.  A fix is being prepared for a near future MKL update.

Aaron_J_Intel2
Employee
658 Views

Until the cblas interface fix is available, please consider the following work around.

>     // cblas_zgemmt( CblasColMajor, CblasLower, CblasNoTrans, CblasConjTrans,
>     //         N, K,
>     //         &alpha, d, N, d, N, &beta, C, N );

>     zgemmt("L", "N", "C",
>             &N, &K,
>             &alpha, d, &N, d, &N, &beta, C, &N );

 

Kotas__Charlotte
Beginner
657 Views

The workaround works for me. Thanks!

Gennady_F_Intel
Moderator
655 Views

the fix of the issue is targeting to the next update of the Intel MKL 2020


Gennady_F_Intel
Moderator
607 Views

The fix of the issue is available in MKL 2020 update 2 which available for downloading.


Reply