You are right, Denis. In fact, though, sinocos/FindLAPACK.cmake <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fsiconos%2Fsiconos%2Fblob%2Fmaster%2Fcmake%2FFindLAPACK.cmake&sa=D&sntz=1&usg=AFQjCNHbqZbSIXPM3Nvv_ZmEm0dA9YlNBQ> introduces some conflicts, besides the need of FindBLAS.cmake which is minor. It would be interesting to sort this out for all mac users that need to link to lapacke, but my knowledge of cmake is so far limited. Thank you. Alberto
Il giorno martedì 28 marzo 2017 03:49:53 UTC-4, Denis Davydov ha scritto: > > Hi Alberto, > > My understanding is that CMake does not provide any interface to find > Lapacke ("e" is important here) > within their FindLAPACK > https://github.com/Kitware/CMake/blob/master/Modules/FindLAPACK.cmake . > So one would need to write extra code to pick-up lapacke.h and all. > AFAIK it's not used in deal.II anywhere, thereby enabling LAPACK in > deal.II won't get you Lapacke. > > A workaround could be to do some googling and find a FindLAPACK which is > hacked to look for Lapacke, i.e. > https://github.com/siconos/siconos/blob/master/cmake/FindLAPACK.cmake > <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fsiconos%2Fsiconos%2Fblob%2Fmaster%2Fcmake%2FFindLAPACK.cmake&sa=D&sntz=1&usg=AFQjCNHbqZbSIXPM3Nvv_ZmEm0dA9YlNBQ> > > Regards, > Denis. > > > On Monday, March 27, 2017 at 5:07:17 PM UTC+3, Alberto Salvadori wrote: >> >> Hi, >> >> >> I appreciate any help on the issue below. >> >> >> Moving from step-17 and step-18, I have been developing a non linear >> solver for mechanical problems. It is a way to learn about deal.II rather >> than else. Conceptually it is rather simple, I have implemented some >> material model drivers (as J2 plasticity, for instance ) and a >> Newton-Raphson scheme. >> >> >> In my material model however, I am using lapack (specifically lapacke or >> mkl). It turned out that I am not sufficiently skilled to modify the cmake >> file in order to link deal.II with those libraries. I wonder if anyone can >> provide some help. >> >> The error reads as follows: >> >> >> [ 22%] *Linking CXX executable step-18* >> >> Undefined symbols for architecture x86_64: >> >> "_LAPACKE_dgesv", referenced from: >> >> ttl::lib::solve_impl<ttl::expressions::Bind<ttl::Tensor<4, 2, >> double> const&, std::__1::tuple<ttl::Index<(char)4>, ttl::Index<(char)3>, >> ttl::Index<(char)2>, ttl::Index<(char)1> > >, >> ttl::expressions::Bind<ttl::Tensor<2, 2, double> const&, >> std::__1::tuple<ttl::Index<(char)2>, ttl::Index<(char)1> > >, >> 4>::op(ttl::expressions::Bind<ttl::Tensor<4, 2, double> const&, >> std::__1::tuple<ttl::Index<(char)4>, ttl::Index<(char)3>, >> ttl::Index<(char)2>, ttl::Index<(char)1> > >, >> ttl::expressions::Bind<ttl::Tensor<2, 2, double> const&, >> std::__1::tuple<ttl::Index<(char)2>, ttl::Index<(char)1> > >) in >> step-18.cc.o >> >> "_LAPACKE_dgetrf", referenced from: >> >> int ttl::lib::inverse_impl<ttl::expressions::Bind<ttl::Tensor<4, 2, >> double> const&, std::__1::tuple<ttl::Index<(char)4>, ttl::Index<(char)3>, >> ttl::Index<(char)2>, ttl::Index<(char)1> > >, 4>::op<ttl::Tensor<4, 2, >> double> >(ttl::expressions::Bind<ttl::Tensor<4, 2, double> const&, >> std::__1::tuple<ttl::Index<(char)4>, ttl::Index<(char)3>, >> ttl::Index<(char)2>, ttl::Index<(char)1> > >, ttl::Tensor<4, 2, double>&) >> in step-18.cc.o >> >> "_LAPACKE_dgetri", referenced from: >> >> int ttl::lib::inverse_impl<ttl::expressions::Bind<ttl::Tensor<4, 2, >> double> const&, std::__1::tuple<ttl::Index<(char)4>, ttl::Index<(char)3>, >> ttl::Index<(char)2>, ttl::Index<(char)1> > >, 4>::op<ttl::Tensor<4, 2, >> double> >(ttl::expressions::Bind<ttl::Tensor<4, 2, double> const&, >> std::__1::tuple<ttl::Index<(char)4>, ttl::Index<(char)3>, >> ttl::Index<(char)2>, ttl::Index<(char)1> > >, ttl::Tensor<4, 2, double>&) >> in step-18.cc.o >> >> ld: symbol(s) not found for architecture x86_64 >> >> clang: *error: *linker command failed with exit code 1 (use -v to see >> invocation) >> >> make[6]: *** [step-18] Error 1 >> >> make[5]: *** [CMakeFiles/step-18.dir/all] Error 2 >> >> make[4]: *** [all] Error 2 >> >> make[3]: *** [CMakeFiles/release] Error 2 >> >> make[2]: *** [CMakeFiles/release.dir/all] Error 2 >> >> make[1]: *** [CMakeFiles/release.dir/rule] Error 2 >> >> make: *** [release] Error 2 >> >> after slight modifications of the cmakelist.txt file (adding the new >> source files, basically). >> >> >> By the way, I was able to link libraries to deal.II within Xcode and it >> worked out well. >> >> >> Thanks >> >> Alberto >> > -- Informativa sulla Privacy: http://www.unibs.it/node/8155 -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.