如何在 Fedora 20 上构建 GPUMlib?

How can I build GPUMlib on Fedora 20?

GPUMlib comes with a filed called CMakeLists.txt instead of Makefiles or configure scripts. I do not see any build instructions and I do not see a list of packages that need to be installed in order to build GPUMlib even in the sources.

此答案假定已安装 cmake 和 gcc 等。

第一次安装 the CULA tools. Their documentation doesn't seem mention it, but their installer (which is barely mentioned in their FAQ) 对我有用。

安装程序完成后,它会报告一些重要的 shell 变量,即 CULA_LIB_PATH_32CULA_LIB_PATH_64CULA_INC_PATH。记下它们的值。

使用 CULA 安装程序报告的 shell 变量调用 cmake。以我为例,我在 /home/john/projects/gpumlib/cula 安装了我的 CULA 工具,并将 gpumlib 代码克隆到一个名为 gpumlib-code 的目录中,所以我的 cmake 命令如下所示:

CULA_LIB_PATH_32=/home/john/projects/gpumlib/cula/lib CULA_LIB_PATH_64=/home/john/projects/gpumlib/cula/lib64 CULA_INC_PATH=/home/john/projects/gpumlib/cula/include cmake gpumlib-code
make -j 8

我写了一个 bash 脚本来为我做这件事,看起来像这样:

#!/bin/bash

export CULA_LIB_PATH_32=/home/john/projects/gpumlib/cula/lib
export CULA_LIB_PATH_64=/home/john/projects/gpumlib/cula/lib64
export CULA_INC_PATH=/home/john/projects/gpumlib/cula/include

cmake gpumlib-code

make -j 8

感谢 Noel de Jesus Mendonça Lopes(gpumlib 的作者)帮助我。