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

Bug in dsytrf() in versions 10 and 11.1?

Yuri_R_1
Beginner
367 Views

Hello!

I have MKL version 10.2.5.035 and have found that the

following program dies when compiled for 64bit (for 32bit it runs correctly):

#include "stdafx.h"
#include <malloc.h>
#include "mkl_lapack.h"

int main(int argc, char* argv[])
{
 MKL_INT m = 3, info;
 double tmp;
    MKL_INT work_sz = -1; // workspace query; optimal size is returned in tmp
    dsytrf("L", &m, NULL, &m, NULL, (double *)&tmp, &work_sz, &info);
 fprintf(stdout, "info=%d tmp=%lf\n", info, tmp);
 return(0);
}

Debugging has shown that MKL tries to write 12 bytes to the location of the second NULL, so replacement of the second NULL with the address of the dummy variable (two int's, for example) keeps the program alive, but the optimal size is 192 (which is much larger than correct value of 3), and returned value of info is not 0.

I have downloaded trial version 11.1. Now the program does not die, and returns optimal size of 3, but returned info is still not 0, but ~-3689348818177884160 (which nevertheless prints out as 0).

Is it a known bug? I would appreciate any observations with regards to this issue.

Thanks,

    Yuri

 

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
367 Views

this is an unexpected problem. I have checked how it works with the latest 11.1 update1. Windows, 64 bit.

linking line: mkl_intel_lp64.lib;mkl_intel_thread.lib;mkl_core.lib;libiomp5md.lib

Major version:           11

Minor version:           1
Update version:          1
Product status:          Product
Build:                   20131010
Processor optimization:  Intel(R) Advanced Vector Extensions (Intel(R) AVX) Enabled Processor
================================================================

info=0 tmp=3.000000

Press any key to continue . . .

+++++++++++++++++++++++++++++++

here is the code which I used:

int mkl_version(void) {
    MKLVersion Version;
    mkl_get_version(&Version);
 
    printf("Major version:           %d\n",Version.MajorVersion);
    printf("Minor version:           %d\n",Version.MinorVersion);
    printf("Update version:          %d\n",Version.UpdateVersion);
    printf("Product status:          %s\n",Version.ProductStatus);
    printf("Build:                   %s\n",Version.Build);
    printf("Processor optimization:  %s\n",Version.Processor);
    printf("================================================================\n");
    printf("\n");
 
    return 0;
}

int main( ) {
    int m = 3, info;
     double tmp;

    mkl_version();

    int work_sz = -1; // workspace query; optimal size is returned in tmp
        dsytrf("L", &m, NULL, &m, NULL, (double *)&tmp, &work_sz, &info);
        fprintf(stdout, "info=%d tmp=%lf\n\n\n", info, tmp);

    return(0);
}

0 Kudos
Yuri_R_1
Beginner
367 Views

Hello Gennady,

I've got:

Major version:           11
Minor version:           1
Update version:          0
Product status:          Product
Build:                   20130711
Processor optimization:  Intel(R) Core(TM) i7 Processor

info=0 tmp=3.000000

 

But as I said, despite being printed as 0, debugging shows that info is not 0, and this can be verified by adding

 if(info!=0)
  fprintf(stdout, "info is not 0\n");

This makes check for correctness of execution useless. So some sort of bug is still there.

What really bothers me, is that my current version, 10.2.5.035 just dies.

 

Thanks,

    Yuri

0 Kudos
Reply