<div dir="ltr">Hi Tim,<div><br></div><div><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 27, 2015 at 7:32 PM, Tim Gallagher <span dir="ltr"><<a href="mailto:tim.gallagher@gatech.edu" target="_blank">tim.gallagher@gatech.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-family:'times new roman','new york',times,serif;font-size:12pt;color:rgb(0,0,0)">Hi Siebren,<br><br>I tried to link statically and it did not work for me, similar errors as to what you are getting. <br></div></div></blockquote><div><br></div><div>Ok, thank you for verifying</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-family:'times new roman','new york',times,serif;font-size:12pt;color:rgb(0,0,0)">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.<br></div></div></blockquote><div><br></div><div>Sound good to me.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="font-family:'times new roman','new york',times,serif;font-size:12pt;color:rgb(0,0,0)">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.<br></div></blockquote><div><br></div><div>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.</div><div>- 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.</div><div>- The static flag was giving errors on the command line, an easy fix was to use the same syntax as for the other flags:</div><div><div>         list(APPEND mkl_tool_opts "--linking=static")</div></div><div>- 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.</div><div>- 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.</div><div>- I was not sure about the tool1 vs tool2 differences, was this also intermediate work on getting the mkl_version information in?</div><div><br></div><div>I'll have more time to look at this next week, thanks for sharing this.</div><div><br></div><div>best,</div><div>Siebren</div><div><br></div><div><br></div><div></div><div> </div></div></div></div></div>