hidden text to trigger early load of fonts ПродукцияПродукцияПродукцияПродукция Các sản phẩmCác sản phẩmCác sản phẩmCác sản phẩm المنتجاتالمنتجاتالمنتجاتالمنتجات מוצריםמוצריםמוצריםמוצרים
Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7176 Discussions

Parameter error for cblas_zgemmt with CblasConjTrans

Kotas__Charlotte
Beginner
2,671 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!

(Virus scan in progress ...)
(Virus scan in progress ...)
0 Kudos
1 Solution
Aaron_J_Intel2
Employee
2,671 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

(Virus scan in progress ...)
0 Kudos
7 Replies
Aaron_J_Intel2
Employee
2,671 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

0 Kudos
Gennady_F_Intel
Moderator
2,671 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.
 

0 Kudos
Aaron_J_Intel2
Employee
2,671 Views

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

0 Kudos
Aaron_J_Intel2
Employee
2,672 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 );

 

(Virus scan in progress ...)
0 Kudos
Kotas__Charlotte
Beginner
2,671 Views

The workaround works for me. Thanks!

0 Kudos
Gennady_F_Intel
Moderator
2,669 Views

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


0 Kudos
Gennady_F_Intel
Moderator
2,621 Views

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


0 Kudos
Reply