Open loriab opened 6 years ago
Thanks a lot Lori! That module is up for a serious redesign very soon (before xmas) and your notes and recommendations are super useful for this. If you have more thoughts, please append. They will all be considered.
I think this could be "escalated" to a CMake issue/merge request. The default BLAS/LAPACK module is simply awful.
Second the "simply awful" appraisal. But I can't imaging supporting Windows, ilp64, all combinations of static, cdft, etc. to replace the CMake one.
Slightly off-topic for autocmake, but the fall-back approach seems to work for modules who don't want to check in the enhanced math detection, https://github.com/ilyak/libefp/blob/master/cmake/FindTargetLAPACK.cmake
Yes, old mathlibs detection is utilized in my mini project, https://github.com/miroi/mathlibs-tester ...
I have no comprehensive idea as how to make universal cmake mathlibs detection macro ....
My goal is less entanglement, higher cohesion, and give more control to the caller and leave less thinking to this library. All suggestions welcome which help to brainstorm this better.
Thanks!
a thought on matching math detection to a pre-built numpy. preserving the comment here. https://github.com/psi4/psi4/pull/1031#discussion_r192517976
Hi, @bast, @robertodr asked me to collect some of my thoughts on renovated math detection, esp. in the light of new CMake features. So here's some ramblings, and I'll post to this issue as other things occur to me.
TargetLAPACK_DIR
var.LAPACK_LIBRARIES=-Wl,--start-list;-lmkl_lapack_95;-Wl,--end-list;-Wl,--start-list;-lmkl_thread;-liomp5;-Wl,--end-list
get "optimized" by cmake. It considers each of those items a library, thinks it knows the rules of rearranging libraries, and helps out by optimizing away your link directives. Very bad. CMake respects targets much more than strings.