   datafloat *h_partialsum;
 
   // number of thread-blocks to partial sum u
-  int B = (N+BDIM-1)/BDIM;
+  int GDIM = (N+BDIM-1)/BDIM;
 
   // allocate host array
-  h_partialsum = (datafloat*) calloc(B, sizeof(datafloat));
+  h_partialsum = (datafloat*) calloc(GDIM, sizeof(datafloat));
 
   // allocate device arrays
   cudaMalloc((void**) &c_u  , N*sizeof(datafloat));
-  cudaMalloc((void**) &c_partialsum , B*sizeof(datafloat));
+  cudaMalloc((void**) &c_partialsum , GDIM*sizeof(datafloat));
 
   // copy from h_u to c_u (HOST to DEVICE)
   cudaMemcpy(c_u ,  h_u ,  N*sizeof(datafloat), cudaMemcpyHostToDevice);

  float timeTaken;
  cudaEventElapsedTime(&timeTaken, startEvent, endEvent);

  const datafloat avgTimePerTest = timeTaken/((datafloat) Ntests);

  // free device arrays
  cudaFree(c_u);
  cudaFree(c_partialsum);

  datafloat *h_u   = (datafloat*) calloc(N, sizeof(datafloat));
  
  // initialize host array
  for(int n = 0;n < N; ++n){
    h_u[n] = 1;
  }

  // Solve discrete Laplacian
  sum(N, h_u);

  // Free the host array
  free(h_u);
