Error creating CUDPPPlan after changing data structure

53 views
Skip to first unread message

Jilang Miao

unread,
Jul 31, 2014, 4:36:22 PM7/31/14
to cu...@googlegroups.com
Hi, 

My program could run normally and correctly. 
But after I change an array from array of structure (ea,rt,ra,rf; ea,rt,ra,rf; ea,rt,ra,rf; .....) to structure of array (ea,ea,......ea; rt,rt,....rt; ra,ra,ra,...ra; rf,rf,rf....rf), I got error "Error creating CUDPPPlan". 

Even in this case, "Error creating CUDPPPlan" doesn't come out every time. Sometimes the program runs normally, sometimes it gives the error. And if I make dimBlock and dimGrid very small, the error still occurs. 

Any idea?

Thanks!
Jilang

John Owens

unread,
Jul 31, 2014, 4:44:54 PM7/31/14
to cu...@googlegroups.com
What CUDPP primitive are you actually running?

JDO
> --
> You received this message because you are subscribed to the Google Groups "CUDPP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+un...@googlegroups.com.
> To post to this group, send email to cu...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cudpp.
> For more options, visit https://groups.google.com/d/optout.

Jilang Miao

unread,
Jul 31, 2014, 4:53:54 PM7/31/14
to cu...@googlegroups.com
Radix sort

John Owens

unread,
Jul 31, 2014, 4:58:13 PM7/31/14
to cu...@googlegroups.com
We don’t support sorts of arbitrary datatypes. CUDPP currently just calls thrust sort anyway; you might just want to call it directly (I think it supports a wider range of datatypes than CUDPP allows).

JDO

Jilang Miao

unread,
Jul 31, 2014, 5:15:22 PM7/31/14
to cu...@googlegroups.com
    CUDPPHandle theCudpp;
    cudppCreate
(&theCudpp);
   
CUDPPConfiguration config;
    config
.datatype = CUDPP_DOUBLE;

    config
.algorithm = CUDPP_SORT_RADIX;


   
CUDPPHandle sortplan = 0;
   
CUDPPResult res = cudppPlan(theCudpp, &sortplan, config, gridsize, 1, 0);


   
if (CUDPP_SUCCESS != res)
   
{
        printf
("Error creating CUDPPPlan\n");
       
exit(-1);
   
}


    res
= cudppRadixSort(sortplan, DeviceMem.nInfo.energy, DeviceMem.nInfo.id, gridsize);
                                                 
//double keys                   //unsigned int values
   
if (CUDPP_SUCCESS != res)
   
{
        printf
("Error in cudppSort()\n");
       
exit(-1);
   
}


  res
= cudppDestroyPlan(sortplan);
 
if (CUDPP_SUCCESS != res)
 
{
      printf
("Error destroying CUDPPPlan\n");
     
exit(-1);
 
}
  cudppDestroy
(theCudpp);

I sort double keys, that are supported by CUDPP2.1. 
My problem is for the same program accepting same input cudppsort() runs sometimes normally sometimes fails at cudppPlan(). 
I'm asking for your ideas what could happen in cudppPlan() that causes the error. 

Thanks!

John Owens

unread,
Jul 31, 2014, 5:22:36 PM7/31/14
to cu...@googlegroups.com
It would help a lot if you could get a stack trace of where it’s having the error …

Alternatively, if you could add a test (say, a radix sort of doubles of the size that’s calling the error) to the tests in app/cudpp_testrig/test_radixsort.cpp, that would be equally helpful.

JDO
Reply all
Reply to author
Forward
0 new messages