ashwin / gDel3D

gDel3D is the fastest 3D Delaunay triangulation algorithm. It uses the GPU for massive parallelism.

Home Page:https://github.com/ashwin/gDel3D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

namespace thrust has no member "device_malloc"

Codeguyross opened this issue · comments

Hello, I am getting the error thrust has no member device_malloc. Any ideas on how to correct this issue?

/home/gFlip3D-Release_271/GDelFlipping/src/gDel3D/GPU/ThrustWrapper.cu(121): error: namespace "thrust" has no member "device_malloc"

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

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

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

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

I have had this issue in the past but surely there is a better way then having to use out-dated cuda 9 to fix this issue1.9

More details:

I am using thrust version 1.9

Checking thrust version can be done with the following code

#include <thrust/version.h>
#include <iostream>

    int main(void)
    {
      int major = THRUST_MAJOR_VERSION;
      int minor = THRUST_MINOR_VERSION;
    
      std::cout << "Thrust v" << major << "." << minor << std::endl;
    
      return 0;
    }

and compiled with
nvcc version.cu -o version

and run with
./version

I went ahead and added the following line to the two files complaining and that fixed the issue. I am not sure what changed to require direct reference to the library and would appreciate any input as to why this header is now required.

The two files you need to modify with the new reference

/home/gFlip3D-Release_271/GDelFlipping/src/gDel3D/GPU/ThrustWrapper.cu
/home/gFlip3D-Release_271/GDelFlipping/src/gDel3D/GPU/GPUDecl.h

The magical line to add
#include <thrust/device_malloc.h>

Hello, I had a different kind of error that namespace thrust has no member "minmax_element", "max_element" and "transform_reduce" in "GpuDelaunay.cu" file. Do you have any ideas on these problems?