- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要将 Armadillo (当前版本为 5.100.1)作为 $HOME 中的本地库(集群应用程序,不能安装在每个计算节点上,但 $HOME 是共享文件夹)。我正在使用 cmake 来管理应用程序,并且已经能够让 cmake 链接到 $HOME 中的本地库(例如,boost)而不是其他地方就好了。 Armadillo 需要 BLAS 和 LAPACK,尽管它可以为两者使用 OpenBLAS(实际上也建议如此)。但是,我不明白如何强制 Armadillo 使用 OpenBLAS,即使它自己的 cmake .configure 确认它已经找到了 OpenBLAS。这是在原始 Armadillo 文件夹上运行 ./configure 的输出:
$ ./configure
-- Configuring Armadillo 5.100.1
-- CMAKE_SYSTEM_NAME = Linux
-- CMAKE_CXX_COMPILER_ID = GNU
-- CMAKE_CXX_COMPILER_VERSION = 4.9.1
-- CMAKE_COMPILER_IS_GNUCXX = 1
-- Found MKL libraries: /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_rt.so
-- Found OpenBLAS: /home/rolf/lib/libopenblas.so
-- Found BLAS: /usr/lib64/libblas.so
-- Found LAPACK: /usr/lib64/liblapack.so
-- MKL_FOUND = YES
-- ACMLMP_FOUND = NO
-- ACML_FOUND = NO
-- OpenBLAS_FOUND = YES
-- ATLAS_FOUND = NO
-- BLAS_FOUND = YES
-- LAPACK_FOUND = YES
--
-- *** If the MKL or ACML libraries are installed in non-standard locations such as
-- *** /opt/intel/mkl, /opt/intel/composerxe/, /usr/local/intel/mkl
-- *** make sure the run-time linker can find them.
-- *** On Linux systems this can be done by editing /etc/ld.so.conf
-- *** or modifying the LD_LIBRARY_PATH environment variable.
--
-- *** On systems with SELinux enabled (eg. Fedora, RHEL),
-- *** you may need to change the SELinux type of all MKL/ACML libraries
-- *** to fix permission problems that may occur during run-time.
-- *** See README.txt for more information
--
-- Found ARPACK: /usr/lib64/libarpack.so
-- ARPACK_FOUND = YES
-- Could not find SuperLU
-- SuperLU_FOUND = NO
--
-- *** Armadillo wrapper library will use the following libraries:
-- *** ARMA_LIBS = /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_rt.so;/usr/lib64/libarpack.so
--
-- Detected gcc 4.8.3 or later. Added '-std=c++11' to compiler flags
-- Copying /home/rolf/work/pdefect/armadillo/include/ to /home/rolf/work/pdefect/armadillo/tmp/include/
-- Generating /home/rolf/work/pdefect/armadillo/tmp/include/config.hpp
-- Generating /home/rolf/work/pdefect/armadillo/examples/Makefile
-- CMAKE_CXX_FLAGS = -std=c++11 -O2
-- CMAKE_SHARED_LINKER_FLAGS = -Wl,--no-as-needed
-- CMAKE_REQUIRED_INCLUDES =
-- *** CMAKE_INSTALL_PREFIX was initalised by cmake to the default value of /usr/local
-- *** CMAKE_INSTALL_PREFIX changed to /usr
-- *** Detected 64 bit system
-- *** /usr/lib64/ exists, so destination directory for the run-time library changed to /usr/lib64/
-- *** Your system and/or compiler must search /usr/lib64/ during linking
-- CMAKE_INSTALL_PREFIX = /usr
-- INSTALL_LIB_DIR = /usr/lib64
-- INSTALL_INCLUDE_DIR = /usr/include
-- INSTALL_DATA_DIR = /usr/share
-- INSTALL_BIN_DIR = /usr/bin
-- Generating '/home/rolf/work/pdefect/armadillo/ArmadilloConfig.cmake'
-- Generating '/home/rolf/work/pdefect/armadillo/ArmadilloConfigVersion.cmake'
-- Generating '/home/rolf/work/pdefect/armadillo/InstallFiles/ArmadilloConfig.cmake'
-- Generating '/home/rolf/work/pdefect/armadillo/InstallFiles/ArmadilloConfigVersion.cmake'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rolf/work/pdefect/armadillo
$ cmake .
$ make
$ ldd libarmadillo.so.5.100.1
linux-vdso.so.1 => (0x00007fff05b9b000)
libmkl_rt.so => /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_rt.so (0x00007f14d2558000)
libarpack.so.2 => /home/rolf/lib/libarpack.so.2 (0x00007f14d230a000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f14d1fe9000)
libm.so.6 => /lib64/libm.so.6 (0x00007f14d1d64000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f14d1b4e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f14d17ba000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d83400000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f14d15b5000)
libblas.so.3 => /usr/lib64/libblas.so.3 (0x00007f14d135e000)
liblapack.so.3 => /usr/lib64/atlas/liblapack.so.3 (0x00007f14d0b3d000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007f14d084a000)
libf77blas.so.3 => /usr/lib64/atlas/libf77blas.so.3 (0x00007f14d062d000)
libcblas.so.3 => /usr/lib64/atlas/libcblas.so.3 (0x00007f14d040c000)
libatlas.so.3 => /usr/lib64/atlas/libatlas.so.3 (0x00007f14cfcfe000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f14cfae1000)
$ ssh node01 'ldd /home/rolf/work/pdefect/armadillo/libarmadillo.so.5.100.1 | grep "not found" '
libblas.so.3 => not found
liblapack.so.3 => not found
* For Linux-based systems the automatic installer can figure out that
OpenBLAS, MKL, ACML or ATLAS are installed, and will use them instead of
the standard LAPACK and BLAS libraries. See README.txt within the Armadillo
archive for more information.
最佳答案
您可以告诉 Armadillo 直接使用您想要的任何 BLAS 和 LAPACK,以及它们的位置。您需要定义 ARMA_DONT_USE_WRAPPER
在包含 Armadillo header 之前,然后链接到您拥有的任何 BLAS 和 LAPACK。
例如:
g++ code.cpp -o code -O3 -DARMA_DONT_USE_WRAPPER -L/home/abc/libs -lmyblas -lmylapack
/home/abc/libs
使用包含您的库的目录。更改
-lmyblas -lmylapack
到任何实现 BLAS 和 LAPACK 函数的库/库(例如:
-lopenblas
)
LD_LIBRARY_PATH
环境变量。例如:
export LD_LIBRARY_PATH=/home/abc/libs:${LD_LIBRARY_PATH}
-static
开关)
关于armadillo - 如何在编译期间强制 Armadillo 库链接到本地 OpenBLAS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30058504/
我从 C++ atm 开始,希望使用矩阵并加快总体速度。之前使用过 Python+Numpy+OpenBLAS。认为 c++ + Eigen + MKL 可能更快或至少不慢。 我的 C++ 代码: #
是否可以像 sudo apt-get install openblas-dev 这样通过 apt-get 安装 openblas? 似乎在 ubuntu 14.04 上找不到它。 sudo apt-g
在 C++17 中,我想使用多个 OpenBLAS 子程序,每个子程序具有不同的线程数。有什么办法可以做到这一点? 过去,我使用过 openblas_set_num_threads();为我的 Ope
存在实现矩阵类型和计算的 C++ 库,例如 Eigen 或 Boost::uBlas。 还有一些库,例如 LAPACK、Goto-BLAS、OpenBLAS 和 ATLAS,可在浮点类型上实现高度优化
我能够在 MinGW64 下编译 Armadillo + OpenBLAS,但是链接是通过“libopenblas”,我认为它是 dll。在 Ubuntu 下,我可以通过我认为是静态的“openbla
我在 Ubuntu 14.04 64 位的硕士论文中成功使用了 Armadillo 和 OpenBLAS(安装了 Armadillo 和没有安装)。性能非常出色——我的代码主要由基本矩阵运算组成。所有
我编译了 OpenBLAS 并将其安装在/usr/lib/libopenblas现在我想在运行的替代系统中安装库 #!/bin/bash update-alternatives --install
我已经在 TX1 中安装了 OpenBlas,并且 time_dgemm 示例使用 gcc 编译得很好。但是,我需要能够使用 g++ 将其余代码与 OpenBlas 链接起来。当我尝试使用 g++ 编
我正在使用 numpy,我的模型涉及密集的矩阵-矩阵乘法。为了加快速度,我使用 OpenBLAS 多线程库来并行化 numpy.dot 函数。 我的设置如下, 操作系统:CentOS 6.2 服务器
我需要将 Armadillo (当前版本为 5.100.1)作为 $HOME 中的本地库(集群应用程序,不能安装在每个计算节点上,但 $HOME 是共享文件夹)。我正在使用 cmake 来管理应用程序
我需要用 Fortran 制作一个点积。我可以使用内在函数 dot_product来自 Fortran 或使用 ddot来自 OpenBLAS。问题是 ddot 速度较慢。这是我的代码: 使用BLAS
我最近下载并构建了 Spark 2.3.1。我使用这些命令下载并选择版本 2.3.1 git clone https://github.com/apache/spark.git cd spark
我有一台 Windows 7-64 位计算机,我正在尝试通过 Msys2 构建 OpenBlas 库。 gcc 似乎存在一些问题,因为在安装 minGW 和解压缩的 OpenBlas 文件夹后,我打开
我的标题中某处有此声明: typedef float real; typedef int integer; extern "C" { extern int sgemm_(char *transa, c
我安装了 OpenBlas 并且可以通过使用编译链接到 OpenBlas 的 C 程序 gcc testOpenBlas.c -I /opt/OpenBLAS/include/ -L/opt/Op
我想知道是否可以在(Python)运行时更改 OpenBLAS 在 numpy 后面使用的最大线程数? 我知道可以在通过环境变量 OMP_NUM_THREADS 运行解释器之前设置它,但我想在运行时更
我正在尝试使用 OpenBLAS 安装 numpy ,但是我不知道如何编写 site.cfg 文件. 当installation procedure随后安装完成且没有错误,但是将 OpenBLAS 使
我正在尝试在 OSX Mavericks 上构建 OpenBLAS ( http://www.openblas.net/ ) 只需键入“make”,它就会在 make 过程的几分钟内遇到错误。 我已经
为了演示,我使用 3 行 CMakeLists.txt: cmake_minimum_required(VERSION 2.8) find_package( BLAS REQUIRED ) messa
我正在使用OpenBLAS我的 BLAS和 LAPACK例行通话。我不想要我的 C++ 的用户群库必须在他们的机器上安装依赖项。所以我想提供OpenBLAS我的图书馆 third_party并有 CM
我是一名优秀的程序员,十分优秀!