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

Header files between Windows and Linux release differ

DenizBahadir
New Contributor I
1,303 Views

I just downloaded the latest MKL 2023.0.0 release for Windows and Linux and realized that some header files differ between the Windows and Linux release.

I would recommend, to keep the header files of Windows, Linux and MacOS in sync and to use the exact same header files (maybe only differing in line endings if really needed).

 

Some examples I have found:

 

  • `mkl_dss.h`, `mkl_pardiso.h`, `mkl_rci.h` and `mkl_solvers_ee.h` in the Windows version use a macro `_Mkl_Api` to declare functions (which can be redefined by the user or `mkl.h`), while the Linux version still declares functions traditionally.
  • In some other header files, e.g. `mkl_blas2.h`, some functions are not marked `NOTHROW` in the Windows version while they are in the Linux versions are marked as `NOTHROW`.
  • In some header files the order of declared functions differ between the Windows and the Linux version, e.g. in `mkl_blas2.h`.
  • In some header files, e.g. `mkl_df_functions.h`, the Windows version declares a macro `MKL_CALL_CONV` that is used within the `_Mkl_Api`, `_mkl_api` and `_MKL_API` macros while the Linux version does not but instead adds an underscore to function names (but only for `_mkl_api` and `_MKL_API`.
    • While I understand that explicitly setting the calling convention for Windows compilers might not be important for Linux compilers, it should not be too difficult to disable this with `#ifdef`s when on Linux etc.
  • Spaces seem to be the normal characters for indenting code, however, in some Linux headers, e.g. `mkl_blasc.h` tabs are used instead in some lines.
  • Similar, some headers have superfluous whitespace characters in the Windows version, while they do not have these in the Linux version and vice versa.
  • Some other small differences in comments etc.
Labels (1)
0 Kudos
5 Replies
VidyalathaB_Intel
Moderator
1,233 Views

Hi Deniz,


Thanks for reaching out to us.

We are working on your issue. we will get back to you soon.


Regards,

Vidya.


0 Kudos
VidyalathaB_Intel
Moderator
1,211 Views

Hi Deniz,


Could you please let us know if the differences which you have mentioned cause any issues? If yes, please provide us with the reproducer and the necessary details so that it would help us better in understanding the issue.


Regards,

Vidya.


0 Kudos
DenizBahadir
New Contributor I
1,181 Views

Hi Vidya,

 

I haven't really tried compiling code with these yet.

However, at least for `mkl_pardiso.h` I can try to pre-define the `_Mkl_Api` macro (in order to e.g. add some compiler attribute or enable/disable some warnings conditionally etc.) but this will only ever have any effect on the Windows release of MKL, because the Linux version of this header does not use the `_Mkl_Api` macro at all.

 

In general, I would have thought that even for you at Intel it would be easier if the same release for different platforms provides at least the exact same header files.

0 Kudos
VidyalathaB_Intel
Moderator
1,100 Views

Hi Deniz,


Thanks for the suggestions.

We will get back to you soon with an update.


Regards,

Vidya.


0 Kudos
ShanmukhS_Intel
Moderator
714 Views

Hi Deniz,


Thank you for your patience. The issue raised by you has been fixed in version 2024.0. If the issue persists with new release, please start a new discussion thread in the community forum and we’d investigate it further. Please check the release notes for upcoming features and bug fixes.


Best Regards,

Shanmukh.SS


0 Kudos
Reply