Cmake 看不到 OpenCL
Cmake does not see OpenCL
我正在尝试为 BEAGLE. First, I have downloaded intel_sdk_for_opencl_applications_2020.3.494.tar.gz from here 安装 OpenCL。然后我解压了它&运行install.sh。安装成功。我安装了 BEAGLE,所以我决定按顺序转到 beagle-lib & 运行 cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME ..
中的 build 文件夹继续 运行 make install
但我收到下一条消息:
-- JAVA_HOME=
-- JNI_INCLUDE_DIRS=/usr/lib/jvm/java/include;/usr/lib/jvm/java/include/linux;/usr/lib/jvm/java/include
-- JNI_LIBRARIES=/usr/lib/jvm/java/lib/libjawt.so;/usr/lib/jvm/java/lib/server/libjvm.so
-- Not using libtools for plugins
-- Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Configuring done
-- Generating done
-- Build files have been written to: /export/home/rinkman/beagle-lib/build
我尝试将环境变量和 shell 设置为
OpenCL_LIBRARY=~/intel/system_studio_2020/opencl/SDK/include/CL/cl.h
OpenCL_INCLUDE_DIR=True
但是运行ning cmake的结果是一样的。我已经验证变量设置正确。所以我不明白哪里出了问题。当我 运行ning BEAST 2 软件时,我想在 BEAGLE 中使用 OpenCL 框架。拜托,有人可以帮忙吗?
P.S。我是 Linux.
的见习生
我运行宁beast -beagle-info
的结果:
BEAST v2.6.6, 2002-2021
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@ucla.edu
Downloads, Help & Resources:
http://beast2.org/
Source code distributed under the GNU Lesser General Public License:
http://github.com/CompEvol/beast2
BEAST developers:
Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
Oliver Pybus, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
0 : CPU
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU
我电脑上的一个与 Windows 进行比较:
BEAST v2.6.6, 2002-2021
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@ucla.edu
Downloads, Help & Resources:
http://beast2.org/
Source code distributed under the GNU Lesser General Public License:
http://github.com/CompEvol/beast2
BEAST developers:
Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
Oliver Pybus, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
0 : CPU
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU
1 : NVIDIA GeForce 940MX
Global memory (MB): 2048
Clock speed (Ghz): 1.19
Number of cores: 384
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_CUDA
2 : Intel(R) HD Graphics 620 (OpenCL 2.1 )
Global memory (MB): 3219
Clock speed (Ghz): 1.00
Number of compute units: 24
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_OPENCL
3 : Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (OpenCL 2.1 (Build 10))
Global memory (MB): 8067
Clock speed (Ghz): 2.50
Number of compute units: 4
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_OPENCL
Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
这意味着 CMake 变量 OpenCL_LIBRARY
和 OpenCL_INCLUDE_DIR
丢失了,因为 OpenCL 无法找到了。
将这两个设置为环境变量没有任何改变。
如果它们没有安装在标准目录中(您的 OpenCL 安装似乎就是这种情况),您需要告诉 CMake 东西在哪里。
尝试将 -DOCL_ROOT=path/to/base/of/your/OpenCL
添加到您对 CMake 的调用以获得 package-specific 提示,或 -DCMAKE_LIBRARY_PATH=path/to/...
使 CMake 在该路径(除了标准路径)中搜索 any 它可能正在寻找的包。确保您事先清除了所有缓存文件,以便 CMake 运行干净并且不使用缓存值。
解决方法是通过-D
in cmake
设置变量为cmake -DOpenCL_INCLUDE_DIR=~/intel/system_studio_2020/opencl/SDK/include/ -DOpenCL_LIBRARY=~/intel/system_studio_2020/opencl/SDK/lib64/libOpenCL.so.1.2 -DCMAKE_INSTALL_PREFIX:PATH=$HOME ..
。
之后编译成功。 make test
执行没有任何问题。我在 ~/lib 文件夹中检测到文件 libhmsbeagle-opencl.so.40.0.0。
我正在尝试为 BEAGLE. First, I have downloaded intel_sdk_for_opencl_applications_2020.3.494.tar.gz from here 安装 OpenCL。然后我解压了它&运行install.sh。安装成功。我安装了 BEAGLE,所以我决定按顺序转到 beagle-lib & 运行 cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME ..
中的 build 文件夹继续 运行 make install
但我收到下一条消息:
-- JAVA_HOME=
-- JNI_INCLUDE_DIRS=/usr/lib/jvm/java/include;/usr/lib/jvm/java/include/linux;/usr/lib/jvm/java/include
-- JNI_LIBRARIES=/usr/lib/jvm/java/lib/libjawt.so;/usr/lib/jvm/java/lib/server/libjvm.so
-- Not using libtools for plugins
-- Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Configuring done
-- Generating done
-- Build files have been written to: /export/home/rinkman/beagle-lib/build
我尝试将环境变量和 shell 设置为
OpenCL_LIBRARY=~/intel/system_studio_2020/opencl/SDK/include/CL/cl.h
OpenCL_INCLUDE_DIR=True
但是运行ning cmake的结果是一样的。我已经验证变量设置正确。所以我不明白哪里出了问题。当我 运行ning BEAST 2 软件时,我想在 BEAGLE 中使用 OpenCL 框架。拜托,有人可以帮忙吗?
P.S。我是 Linux.
的见习生我运行宁beast -beagle-info
的结果:
BEAST v2.6.6, 2002-2021
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@ucla.edu
Downloads, Help & Resources:
http://beast2.org/
Source code distributed under the GNU Lesser General Public License:
http://github.com/CompEvol/beast2
BEAST developers:
Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
Oliver Pybus, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
0 : CPU
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU
我电脑上的一个与 Windows 进行比较:
BEAST v2.6.6, 2002-2021
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@ucla.edu
Downloads, Help & Resources:
http://beast2.org/
Source code distributed under the GNU Lesser General Public License:
http://github.com/CompEvol/beast2
BEAST developers:
Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
Oliver Pybus, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
0 : CPU
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU
1 : NVIDIA GeForce 940MX
Global memory (MB): 2048
Clock speed (Ghz): 1.19
Number of cores: 384
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_CUDA
2 : Intel(R) HD Graphics 620 (OpenCL 2.1 )
Global memory (MB): 3219
Clock speed (Ghz): 1.00
Number of compute units: 24
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_OPENCL
3 : Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (OpenCL 2.1 (Build 10))
Global memory (MB): 8067
Clock speed (Ghz): 2.50
Number of compute units: 4
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_OPENCL
Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
这意味着 CMake 变量 OpenCL_LIBRARY
和 OpenCL_INCLUDE_DIR
丢失了,因为 OpenCL 无法找到了。
将这两个设置为环境变量没有任何改变。
如果它们没有安装在标准目录中(您的 OpenCL 安装似乎就是这种情况),您需要告诉 CMake 东西在哪里。
尝试将 -DOCL_ROOT=path/to/base/of/your/OpenCL
添加到您对 CMake 的调用以获得 package-specific 提示,或 -DCMAKE_LIBRARY_PATH=path/to/...
使 CMake 在该路径(除了标准路径)中搜索 any 它可能正在寻找的包。确保您事先清除了所有缓存文件,以便 CMake 运行干净并且不使用缓存值。
解决方法是通过-D
in cmake
设置变量为cmake -DOpenCL_INCLUDE_DIR=~/intel/system_studio_2020/opencl/SDK/include/ -DOpenCL_LIBRARY=~/intel/system_studio_2020/opencl/SDK/lib64/libOpenCL.so.1.2 -DCMAKE_INSTALL_PREFIX:PATH=$HOME ..
。
之后编译成功。 make test
执行没有任何问题。我在 ~/lib 文件夹中检测到文件 libhmsbeagle-opencl.so.40.0.0。