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*)
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.
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 .
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.