问题描述
我正在尝试使用在python中运行并使用pyopencl的程序。
我将Windows与Anaconda和GeForce GTX 1080配合使用。我按照所有步骤安装和运行pyopencl,这是很多工作。
但是,当我运行完整的代码时,似乎缺少某些库,但是我不知道从何处获取缺少的库或如何链接它。这是运行时错误:
Traceback (most recent call last):
File "D:\Deep_Physics\Protein\Mi3-GPU-master\mi3gpu\Mi3.py",line 1236,in <module>
main(sys.argv[1:])
File "D:\Deep_Physics\Protein\Mi3-GPU-master\mi3gpu\Mi3.py",line 1232,in main
actions[kNown_args.action](args,remaining_args,print)
File "D:\Deep_Physics\Protein\Mi3-GPU-master\mi3gpu\Mi3.py",line 411,in inverseIsing
gpus = setup_GPUs(p,log)
File "D:\Deep_Physics\Protein\Mi3-GPU-master\mi3gpu\Mi3.py",line 312,in setup_GPUs
clinfo,gpudevs,cllog = setup_GPU_context(scriptPath,scriptfile,p,log)
File "D:\Deep_Physics\Protein\Mi3-GPU-master\mi3gpu\mcmcGPU.py",line 903,in setup_GPU_context
cl_prg = cl.Program(cl_ctx,src).build(optstr + extraopt)
File "C:\ProgramData\Anaconda3\envs\mi3\lib\site-packages\pyopencl\__init__.py",line 513,in build
self._build_and_catch_errors(
File "C:\ProgramData\Anaconda3\envs\mi3\lib\site-packages\pyopencl\__init__.py",line 569,in _build_and_catch_errors
raise err
RuntimeError: clBuildProgram Failed: BUILD_PROGRAM_FAILURE - clBuildProgram Failed: BUILD_PROGRAM_FAILURE - clBuildProgram Failed: BUILD_PROGRAM_FAILURE
Build on <pyopencl.Device 'GeForce GTX 1080' on 'NVIDIA CUDA' at 0x1bcb431db20>:
<kernel>:18:10: Fatal error: 'mwc64x/cl/mwc64x/mwc64xvec2_rng.cl' file not found
#include <mwc64x/cl/mwc64x/mwc64xvec2_rng.cl>
^
(options: -D q=4 -D L=93 -D NHIST=256 -D HISTWS=512 -D WGSIZE=512 -cl-nv-verbose -Werror -I D:Deep_PhysicsProteinMi3-GPU-mastermi3gpu -I C:\ProgramData\Anaconda3\envs\mi3\lib\site-packages\pyopencl\cl)
作为参考,这是导入pyopencl后运行命令printGPUS(print)
时的输出:
Platform 0 'NVIDIA CUDA':
vendor: NVIDIA Corporation
Version: OpenCL 1.2 CUDA 10.1.152
Extensions: cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics cl_khr_fp64
cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing
cl_nv_compiler_options cl_nv_device_attribute_query
cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing
cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer
Device 'GeForce GTX 1080':
vendor: NVIDIA Corporation
Version: OpenCL 1.2 CUDA
Driver Version: 425.25
Max Clock Frequency: 1733
Max Compute Units: 20
Max Work Group Size: 1024
Global Mem Size: 8589934592
Global Mem Cache Size: 327680
Local Mem Size: 49152
Max Constant Buffer Size: 65536
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)