-1

I'm working on CUDA as a beginner and am trying to execute a pre written code the compile gives error for every usage of CUDPPHandle... for example

void HPGMST()
{
    //Reinitialize the ranking arrays, must be orig but this also works

    CUDA_SAFE_CALL( cudaMemcpy( d_vertex_split_rank, h_vertex_split_rank_test, sizeof(unsigned long long int)*no_of_vertices, cudaMemcpyHostToDevice));

    CUDA_SAFE_CALL( cudaMemcpy( d_edge_rank, h_edge_rank_test, sizeof(unsigned long long int)*no_of_edges, cudaMemcpyHostToDevice));





    //Make both grids needed for execution, no_of_vertices and no_of_edges length sizes

    int num_of_blocks, num_of_threads_per_block;

    SetGridThreadLen(no_of_edges, &num_of_blocks, &num_of_threads_per_block);

    dim3 grid_edgelen(num_of_blocks, 1, 1);

    dim3 threads_edgelen(num_of_threads_per_block, 1, 1);

    SetGridThreadLen(no_of_vertices, &num_of_blocks, &num_of_threads_per_block);

    dim3 grid_vertexlen(num_of_blocks, 1, 1);

    dim3 threads_vertexlen(num_of_threads_per_block, 1, 1);





    //Append the Weight and Outgoing vertex into a single array, 8-10 bits for weight and 20-22 bits for vertex ID

    //Append in Parallel on the Device itself, call the append kernel

    AppendKernel_1<<< grid_edgelen, threads_edgelen, 0>>>(d_segmented_min_scan_input, d_weight, d_edge, no_of_edges);



    //Create the Flag needed for segmented min scan operation, similar operation will also be used at other places

    ClearArray<<< grid_edgelen, threads_edgelen, 0>>>( d_edge_flag, no_of_edges );



    //Mark the segments for the segmented min scan using scan

    MakeFlag_3<<< grid_vertexlen, threads_vertexlen, 0>>>( d_edge_flag, d_vertex, no_of_vertices);



    //Perfom the Segmented Min Scan on resulting array using d_edge_flag as segments

    cudppPlan(&segmentedScanPlan_min, config_segmented_min, no_of_edges, 1, 0 ); //Make the segmented min scan plan

Gives the follwing errors on the last line:

  1. argument of type "CUDPPHandle *" is incompatible with parameter of type "CUDPPHandle"
  2. no suitable conversion function from "CUDPPConfiguration" to "CUDPPHandle *" exists
  3. no suitable constructor exists to convert from "int" to "CUDPPConfiguration"
  4. too few arguments in function call

i'm using 'nvcc -arch sm_20' to compile on tesla C2075 kindly help....

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
soodankit
  • 81
  • 8

1 Answers1

1

The problem is right there in the error text you posted:

too few arguments in function call

Your code is only provided 5 arguments. As can be seen here, the cudppPlan function required 6 arguments. It looks like you are missing the first argument to the call.

talonmies
  • 70,661
  • 34
  • 192
  • 269
  • if you look at this [link](http://cudpp.github.io/cudpp/1.1.1/group__public_interface.html#ga0d39e7c3e14963c7cc3df3b879362c25) cudppPlan has 5 arguments...i suppose there's a difference in versions..can you please help me make it compatible with the previous version – soodankit Mar 15 '14 at 06:23
  • the code was written using cudpp 1.1.1 but currently i'm using cudpp 2.0 – soodankit Mar 15 '14 at 07:16