allendaicool / thrust

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

sort_by_key fails cuda-memcheck #241

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please post a short code sample which reproduces the problem:

#include <thrust/device_vector.h>
#include <thrust/sort.h>
#include <thrust/iterator/counting_iterator.h>

int main(void) {
    thrust::device_vector<float> keys(3);
    keys[0] = 0;
    keys[1] = 103;
    keys[2] = 101;

    thrust::device_vector<int> value1(thrust::make_counting_iterator(0), thrust::make_counting_iterator(3));

    thrust::sort_by_key(keys.begin(), keys.end(), value1.begin());

    return 0;
}

What is the expected output? What do you see instead?

When running with cuda-memcheck, it is expected that no errors would be 
reported.  However, cuda-memcheck does report an error.  (This is compiling 
with default sm10 and running on pre-fermi hardware (gtx295) ).

What version of Thrust are you using? Which version of nvcc?  Which host
compiler?  On what operating system?

Latest repository version of thrust. nvcc 3.1.  gcc 4.3.2 on suse 11.1 64 bit.

Please provide any additional information below.

This may be related to issue 213 - because there doesn't appear to be any 
failure unless you run with cuda-memcheck.

Original issue reported on code.google.com by ekel...@gmail.com on 5 Oct 2010 at 12:56

GoogleCodeExporter commented 9 years ago
Thanks for the report.

I can reproduce the cuda-memcheck error with CUDA 3.1 on a GTX 280 Ubuntu 9.04 
(64-bit).  However, I could not reproduce the error with CUDA 3.2rc, so it may 
have been fixed since 3.1.

Can you try again with CUDA 3.2rc?

Original comment by wnbell on 5 Oct 2010 at 1:36

GoogleCodeExporter commented 9 years ago
3.2rc seems to fix it, whatever the problem the was.

Original comment by ekel...@gmail.com on 6 Oct 2010 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by wnbell on 21 Oct 2010 at 7:19