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

heap corruption on cblas_sgemv in release mode

Bruno_Colombet
Beginner
441 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
441 Views
Bruno, can you give the comprehensive example to check on our side?
0 Kudos
Bruno_Colombet
Beginner
441 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.
0 Kudos
Reply