[cmake-developers] Is there an official FindMKL module?

Tim Gallagher tim.gallagher at gatech.edu
Fri Aug 28 11:09:20 EDT 2015


It's possible this wasn't the "final" version we came up with, but it's also possible that it is the final version and that's why I never formally submitted it. Like I said, it was last touched in 2012 and I found these files on a colleague's backup drive! 

We can work on getting it fully functioning and submit it as an official module moving forward if you are willing/able to be a module maintainer with me on it. When you get time to work on it again, let me know and I'll see what I can do to help. I don't have a ton of time for it right now, but I will do what I can. 

We can take the development discussion off-list if you would like and set up a github for it so we can collaborate and get things moving along. 

Tim 

----- Original Message -----

From: "Siebren Reker" <siebren.reker at gmail.com> 
To: "tim gallagher" <tim.gallagher at gatech.edu> 
Cc: cmake-developers at cmake.org 
Sent: Friday, August 28, 2015 4:42:29 AM 
Subject: Re: [cmake-developers] Is there an official FindMKL module? 


Hi Tim, 




On Thu, Aug 27, 2015 at 7:32 PM, Tim Gallagher < tim.gallagher at gatech.edu > wrote: 




Hi Siebren, 

I tried to link statically and it did not work for me, similar errors as to what you are getting. 





Ok, thank you for verifying 

<blockquote>


The way the macro is supposed to work -- it checks for the MKL link tool and if it is available, it uses and provides the libraries needed. If it is unavailable (or throws errors or whatever else the case may be), then FindBLAS reverts back to the way it handles MKL currently. 

</blockquote>



Sound good to me. 

<blockquote>

I have attached the module that provides the interface to the MKL command line tool as well as the changed FindBLAS module that uses it. Major caveat here -- I have not used these since 2012, with one of the Intel 12.something compilers and CMake 2.8. I did a quick diff on the FindBLAS in the current version and the CMake 2.8 version and there's only very minor changes that shouldn't affect this working. If it turns out this is useful and close to functional, then we can work on getting it current. 

</blockquote>



What you have sent feels 80% complete. It doesn't work out of the box, but I could hack some small changes in to get some things working. I won't have more time for this today, so here is what I've spotted so far, in case you want to continue on this now. 
- The calls to the macro (in FindBLAS.cmake) don't match with the macro input in GetIntelMKLInfo, maybe you were adding additional parameters for the mkl version and things such as integer representation, but hadn't gotten around to adding them in the macro? Removing them from FindBLAS.cmake allowed me to test further, but I can see that some more inputs to the MKL command line tool need to be supported. 
- The static flag was giving errors on the command line, an easy fix was to use the same syntax as for the other flags: 

list(APPEND mkl_tool_opts "--linking=static") 
- The stripping off of the additional libraries is very nice, but the regex for the math library is overzealous: "-lm" matches all "-lmkl_intel_thread" etc. 
- The grouping of the static libraries results in them being parsed as "static_flags", which leaves the final mkl_libs empty. Even though all information has correctly been extracted, the macro then reports failure. 
- I was not sure about the tool1 vs tool2 differences, was this also intermediate work on getting the mkl_version information in? 


I'll have more time to look at this next week, thanks for sharing this. 


best, 
Siebren 






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150828/afea885f/attachment.html>


More information about the cmake-developers mailing list