在编译gDel3D(使用GPU进行3D Delaunay三角剖分时,推力没有成员device_malloc错误)

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

我尝试了几种不同的方法来构建此库,并且所有方法都导致“推力”没有成员“ device_malloc”。

以下是gDel3D的git repo的链接:https://github.com/ashwin/gDel3D

以下是我在键入时收到的错误:make

make
[ 7%] Building NVCC (Device) object CMakeFiles/gflip3d.dir/GDelFlipping/src/gDel3D/GPU/gflip3d_generated_ThrustWrapper.cu.o
/home/gDel3D/GDelFlipping/src/gDel3D/GPU/ThrustWrapper.cu(121): error: namespace "thrust" has no member "device_malloc"

/home/gDel3D/GDelFlipping/src/gDel3D/GPU/ThrustWrapper.cu(121): error: type name is not allowed

/home/gDel3D/GDelFlipping/src/gDel3D/GPU/ThrustWrapper.cu(121): error: expression must have class type

/home/gDel3D/GDelFlipping/src/gDel3D/GPU/GPUDecl.h(280): error: namespace "thrust" has no member "device_malloc"

/home/gDel3D/GDelFlipping/src/gDel3D/GPU/GPUDecl.h(280): error: type name is not allowed

5 errors detected in the compilation of "/tmp/tmpxft_00000a74_00000000-7_ThrustWrapper.compute_30.cpp1.ii".
CMake Error at gflip3d_generated_ThrustWrapper.cu.o.Release.cmake:279 (message):
Error generating file
/home/gDel3D/build/CMakeFiles/gflip3d.dir/GDelFlipping/src/gDel3D/GPU/./gflip3d_generated_ThrustWrapper.cu.o

CMakeFiles/gflip3d.dir/build.make:84: recipe for target 'CMakeFiles/gflip3d.dir/GDelFlipping/src/gDel3D/GPU/gflip3d_generated_ThrustWrapper.cu.o' failed
make[2]: *** [CMakeFiles/gflip3d.dir/GDelFlipping/src/gDel3D/GPU/gflip3d_generated_ThrustWrapper.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gflip3d.dir/all' failed
make[1]: *** [CMakeFiles/gflip3d.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

我曾尝试在gDel3D论坛的问题标签上问我的问题,但认为在这里可能是适当的,因为这似乎与配置推力库有关。感谢您的帮助!

linux cmake nvidia thrust delaunay
1个回答
0
投票

我在GDel3D中遇到了类似的问题。此问题的快速解决方案是包括必要的推力文件。对于device_malloc include。我也可以从以下网站上获得GDel3D版本的运气更好:

https://www.comp.nus.edu.sg/~tants/gdel3d.html

更具体地从这里:

https://www.comp.nus.edu.sg/~tants/gdel3d_files/gDel3D-Release_271.zip

此外,您可能想尝试不同版本的CUDA Toolkit。另外,您还可以在“ -gencode arch = compute _ ##,code = sm _ ##”行中修改CMakeLists.txt文件。那应该允许您指定不同的CUDA计算功能等等。我本人对CUDA还是很陌生,所以在这里我可能是错的。

我设法运行了链接到的GDel3D版本,没有任何错误。它在Linux Mint上的GeForce GT 840m和CUDA 7.5.17上编译并运行(尽管不确定该版本)。我还添加了缺少推力功能的包含项,并用“ arch = compute_50,code = sm_50”修改了CMakeLists.txt。

希望以上任何帮助。

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