- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Does MKL #define anything that indicate its version number and that can be seen by the preprocessor during a compile (C/C++)? Some function definitions seem to have changed between MKL 10.1 and 10.2. For example, the LAPACK function 'cpptrf' changed from
cpptrf(char*, int*, float*, int*)
to
cpptrf(char*,int*,(MKL_Complex8*),int*)
Right now we have the user explicitly set a #define before comple to indicate which mkl version they have, but it would be nice if we could key off something that is set by MKL itself.
Thanks,
John
Does MKL #define anything that indicate its version number and that can be seen by the preprocessor during a compile (C/C++)? Some function definitions seem to have changed between MKL 10.1 and 10.2. For example, the LAPACK function 'cpptrf' changed from
cpptrf(char*, int*, float*, int*)
to
cpptrf(char*,int*,(MKL_Complex8*),int*)
Right now we have the user explicitly set a #define before comple to indicate which mkl version they have, but it would be nice if we could key off something that is set by MKL itself.
Thanks,
John
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look up the functions MKL_Get_Version() and MKL_Get_Version_String().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am aware of those functions, but those are at run time. I would like to #ifdef things at compile time depending on the MKL version.
John
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In that case, why not insert your own version symbol into, say, mkl.h ? If needed, a comparison of the value of this preprocessor symbol to the return value of MKL_Get_Version() could be put in your initialization code as a sanity check .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your suggestion.Introducing kind of MKL_VERSION macro into would be very helpful but only for C/C++ users.
Thanks for your suggestion.Introducing kind of MKL_VERSION macro into
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That would be one solution. However, some users do not have write access to MKL libraries on the systems they are using.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Victor,
That would be great if some macros could be added.
I am not sure if the Fortran libraries suffer from the same problem that the C/C++ libraries do, so maybe having the version available at compile time is not as useful on the Fortran side. For example, the C/C++ interface of 'cpptrf' changed between versions 11.1 and 11.2. I do not think (but I have not checked) the Fortran interface for this particular function changed between 11.1 and 11.2. I suppose subroutine interface changes could happen in the Fortran libraries as well though.
That being said, if you want to make a macro available to Fortran users who do actually pre-process their files, you could create a separate header such as 'mkl_version.h'. Inside 'mkl_version.h' would only exist #define macros. That way a Fortran user who is using pre-processing could still #include it.
Thanks,
John
That would be great if some macros could be added.
I am not sure if the Fortran libraries suffer from the same problem that the C/C++ libraries do, so maybe having the version available at compile time is not as useful on the Fortran side. For example, the C/C++ interface of 'cpptrf' changed between versions 11.1 and 11.2. I do not think (but I have not checked) the Fortran interface for this particular function changed between 11.1 and 11.2. I suppose subroutine interface changes could happen in the Fortran libraries as well though.
That being said, if you want to make a macro available to Fortran users who do actually pre-process their files, you could create a separate header such as 'mkl_version.h'. Inside 'mkl_version.h' would only exist #define macros. That way a Fortran user who is using pre-processing could still #include it.
Thanks,
John
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page