CMake is not able to find LAPACK sgemm on macOS

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-16 22:36:27

问题


I'm trying to compile this code, but when running cmake .. in the build folder I get the messages:

-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- Found BLAS: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Accelerate.framework  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.

showing that CMake was not able to find the sgemm LAPACK routine. This is strange because later, CMake says that it has found BLAS and LAPACK through Accelerate Framework.

My environment is:

  • CMake 3.17.0
  • macOS Catalina 10.15.4

and compilers are GNU GCC 9.3.0 installed via HomeBrew:

  • /usr/local/bin/gcc-9
  • /usr/local/bin/gfortran

I would appreciate it if you could help me know what is the problem and how I can solve it.

P.S. relevant discussion/code here, here, and here

来源:https://stackoverflow.com/questions/61020366/cmake-is-not-able-to-find-lapack-sgemm-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!