- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recently started using MKL alongside other wrapper libraries like Armadillo and ran into some LAPACK function definition conflicts. Upon closer inspection, it appears that the MKL definitions of ?gelsd functions are inconsistent in mkl_lapack.h, and are incorrect for sgelsd, dgelsd, zgelsd.
For sgelsd, dgelsd, and zgelsd, the parameter for matrix "a" is defined as "const type*". This should not be the case as matrix "a" is overwritten as an output so it should not be defined with a "const" qualifier in the function parameters.
cgelsd correctly defines "a" without the "const" qualifier. This should be an easy fix but I'm unsure as how to contribute to the MKL code base since it's not open source.
MKL Version: 2019.4
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, we definitely will fix this problem. You may also edit the mkl_lapack.h file and remove const MKL_Complex16* a or etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! It's not feasible for us to manually remove the const qualifiers since we automatically obtain the headers from Anaconda packages in our build system and there isn't an easy way to patch the files. Great to hear that it'll be fixed in the next version though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, that's the real problem in such environment. In any case, we will update this thread when the fix of the problem will be available into the official version of MKL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, along the lines of function prototype definitions, it appears that MKL does not define the hidden arguments required for calling Fortran functions in its C prototypes. This is recently discovered to be wrong and can cause unintended stack corruptions during the calls. Is this something on your radar to be fixed?
Please see the linked threads for more information on this:
https://lwn.net/Articles/791393/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90329
https://bugzilla.redhat.com/show_bug.cgi?id=1709538
https://developer.r-project.org/Blog/public/2019/05/15/gfortran-issues-with-lapack/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
not yet, but we will look at these cases, thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
const qualifiers were removed from the declaration of these functions in MKL v2020 which has been released on Dec 12'19.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page