【问题标题】:cray CC wrapper cmake find_package blascray CC 包装器 cmake find_package blas
【发布时间】:2019-10-05 21:17:43
【问题描述】:

我刚刚在一个没有文件的测试目录下创建了一个三行 CMakeLists.txt,如下所示。我尝试了导出库路径等,但没有一个基本技巧起作用。如何使这项工作?

cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(test CXX)
find_package(BLAS REQUIRED)

然后运行它并得到以下错误。

ramki@hostname:~/temp>CC=CC CXX=CC cmake ../nmflibrary/test/
-- The CXX compiler identification is GNU 6.3.0
-- Cray Programming Environment 2.5.13 CXX
-- Check for working CXX compiler: /opt/cray/craype/2.5.13/bin/CC
-- Check for working CXX compiler: /opt/cray/craype/2.5.13/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
CMake Error at /autofs/nccs-svm1_sw/titan/.swci/0-login/opt/spack/20170612/linux-suse_linux11-x86_64/gcc-4.3.4/cmake-3.9.0-owxiriblogovogl5zbrg45ulm3ln34cx/share/cmake-3.9/Modules/FindBLAS.cmake:699 (message):
  A required library with BLAS API not found.  Please specify library
  location.
Call Stack (most recent call first):
  CMakeLists.txt:6 (find_package)


-- Configuring incomplete, errors occurred!
See also "/ccs/home/ramki/temp/CMakeFiles/CMakeOutput.log".
See also "/ccs/home/ramki/temp/CMakeFiles/CMakeError.log".

如何使用 blas 制作 find_package 所需的工作在 cray 包装器上?

【问题讨论】:

    标签: cmake blas cray


    【解决方案1】:

    Cray 编译器隐式链接 BLAS 和 LAPACK 库,因此它们通常不在命令行中给出。对于 BLAS,检测这种情况的能力是 added 到 CMake 3.13.0,对于 LAPACK,检测到这种情况的能力是 added 到 CMake 3.16.0。

    因此,如果您只使用 BLAS,只需 download 更新的 CMake 二进制 tarball。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多