At 12:51 03/05/2012, you wrote:
Thanks for the reply.

When I modify the code it still fails with segmentation error.

You run it on different servers or runs in the same server?

If you are testing on one server, perhaps your gpu is out of memory. Check your cudaMalloc calls, perhaps memory isn't initialized and the cudaMemCopy fails. You can use something like this:

if (cudaSuccess != cudaMalloc((void **) &gpudata, sizeof(int) * nelements))
{
        printf("Error allocating memory on gpu %d ", __LINE__);
{

You need to include cutil.h, that i see you already has...


Best Regards,

ROHAN DESHPANDE

HTH


Reply via email to