cray CC包装器cmake find_package blas

问题描述 投票:0回答:1

我刚刚在测试目录下创建了三行CMakeLists.txt,如下所示,该目录下没有文件。我尝试了导出lib路径等,但基本技巧都无效。如何使这项工作?

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个回答
0
投票

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

因此,如果您只适合使用BLAS,只需download一个较新的CMake二进制tarball。

© www.soinside.com 2019 - 2024. All rights reserved.