thrust::system::system_error?

Hi,

I have two Titan cards and my application runs on one of them (CUDA device 1) and crashes on the other (device 0) with Microsoft C++ exception:thrust::system::system_error at memory location…
Crashing on a push_back to a thrust::device_vector

I SetDeviceCuda(0) and swap with SetDeviceCuda(1) to test.

Is there a problem with running thrust on the same card as the one attached to the screen (presumably device 0)?

I’ve also replaced thrust’s allocator with my own that just reads off a large cudaMalloc memory block and I get the same problem. I then cudaMallocHost and chose pinned memory (address 0x0001000000 or something similar). Same result, works fine on CUDA device 1 but not on CUDA device 0.

I am using Windows 7 x64 with CUDA/thrust 5.5, NVIDIA driver 320.0. Also tried with CUDA/thrust 5.0 and NVIDIA driver 314.xx same issue.

Any ideas what could be wrong?

Kind regards,
Jules

Ah, solved this.

Due to an atomic exchange of a null pointer in my CUDA code. I guess with the other graphics card it just kept on going.

Jules