lion03 / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

Better documentation about --device-debug being incompatible with thrust #486

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It'd be helpful if the thrust documentation made it more clear to the casual 
user that "nvcc --device-debug 0" and "nvcc -G" are incompatible with thrust at 
this time (e.g. in http://code.google.com/p/thrust/wiki/Debugging at a minimum).

Here's an example of some trivial code that fails to compile when 
--device-debug is enabled, but otherwise works fine.

    #include <thrust/device_ptr.h>
    #include <thrust/count.h>
    void warmup() {
        const double *raw_null = NULL;
        thrust::device_ptr<const double> null_ptr(raw_null);
        assert(0 == thrust::count_if(null_ptr, null_ptr, __finite));
    }

https://groups.google.com/forum/?fromgroups#!topic/thrust-users/4RFccFeaPzA

This issue exists for thrust 4.0, 4.1, and 4.2 (at least on RHEL Linux with g++ 
4.4.6).

Original issue reported on code.google.com by gerald.d...@gmail.com on 26 Apr 2012 at 2:14

GoogleCodeExporter commented 8 years ago
Thanks, Gerald. I've made a note on both the Github [1] and Google Code [2] 
wikis.

[1] https://github.com/thrust/thrust/wiki/Debugging
[2] http://code.google.com/p/thrust/wiki/Debugging

Original comment by jaredhoberock on 26 Apr 2012 at 6:27