ninjaneer
ninjaneer

Reputation: 7031

Thrust Error: libc++abi.dylib: terminate called throwing an exception. Abort trap: 6

Trying to do a simple copy data from Host to Device using thrust. It's outputting:

libc++abi.dylib: terminate called throwing an exception
Abort trap: 6

Code:

#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
void test()
{
    thrust::host_vector<int> H(4);
    H[0] = 14;
    H[1] = 20;
    H[2] = 38;
    H[3] = 46;
    thrust::device_vector<int> D = H; // causing error
}
int main()
{
    test(); 
    return 0;
}

Here's how I compiled and ran it in OS X:

$ nvcc test.cu -o test
$ ./test

I have CUDA 5.5 installed which I believe installed Thrust 1.6.0 automatically.

Upvotes: 1

Views: 379

Answers (1)

ninjaneer
ninjaneer

Reputation: 7031

Turns out to be a bug in 5.5 production release. I uninstalled and reinstalled 5.0, everything works fine.

Upvotes: 1

Related Questions