Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
6463 Discussions

heap corruption on cblas_sgemv in release mode

Bruno_Colombet
Beginner
99 Views

Hello everyone,I'm just using MKL for two weeks and I face a strange behavior.My code is running fine in DEBUG but crash in Release. Ok it's a well known pb, but I've checked all macros and coding problem and can't see the light.Here is the function causing the crash on cblas_sgemv, it seems..[cpp]void randperm(float *data, float *trsf, float *bias, int *perm, int m, int n, int k, float *proj) { int i, im, swap, inc = 1; float alpha = 1.0, beta; if (bias) { for (i=0,im=0 ; iperm is allocated before and its size is k elements.data is allocated before and its size is m x n elements.I had a similar behavior in another function in which I was using sgesv_().I replaced with a LAPACKE call : LAPACKE_sgesv() and problem was solved.I know heap corruption are not easy to detect but I'm wondering where is exaclty the heap corruption...Any idea will be appreciated.

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
99 Views
Bruno, can you give the comprehensive example to check on our side?
Bruno_Colombet
Beginner
99 Views
I've found the issue.
I was linking in release mode with different libs than in debug.
Building was ok though with no warnings or complaints on unresolved symbols.
Everything is Ok now, no pb in cblas functions in my code.
Reply