     checkCuda(cudaMalloc(&deviceClusters, numClusters*numCoords*sizeof(float)));
     checkCuda(cudaMalloc(&deviceMembership, numObjs*sizeof(int)));
     checkCuda(cudaMalloc(&deviceIntermediates, numReductionThreads*sizeof(unsigned int)));
-//  checkCuda(cudaMalloc(&deviceNewClusterSize, numClusters*sizeof(int)));
 
     checkCuda(cudaMemcpy(deviceObjects, dimObjects[0],
               numObjs*numCoords*sizeof(float), cudaMemcpyHostToDevice));
     checkCuda(cudaMemcpy(deviceMembership, membership,
               numObjs*sizeof(int), cudaMemcpyHostToDevice));
-//  checkCuda(cudaMemcpy(deviceNewClusterSize, newClusterSize,
-//            numClusters*sizeof(int), cudaMemcpyHostToDevice));
 
     do {
         checkCuda(cudaMemcpy(deviceClusters, clusters[0],
                   numClusters*numCoords*sizeof(float), cudaMemcpyHostToDevice));
 
-//      msg("--- CUDA time! ---\n")
         find_nearest_cluster
             <<< numClusterBlocks, numThreadsPerClusterBlock, clusterBlockSharedDataSize >>>
             (numCoords, numObjs, numClusters,

        checkCuda(cudaMemcpy(&d, deviceIntermediates,
                  sizeof(int), cudaMemcpyDeviceToHost));
        delta = (float)d;
//      msg("%2d: delta = %d\n", loop, d)

//      checkCuda(cudaMemcpy(clusters[0], deviceClusters,
//            numClusters*numCoords*sizeof(float), cudaMemcpyDeviceToHost));
        checkCuda(cudaMemcpy(membership, deviceMembership,
                  numObjs*sizeof(int), cudaMemcpyDeviceToHost));
//      checkCuda(cudaMemcpy(newClusterSize, deviceNewClusterSize,
//                numClusters*sizeof(int), cudaMemcpyDeviceToHost));

        for (i=0; i<numObjs; i++) {
            /* find the array index of nestest cluster center */
            index = membership[i];
//          msg("membership[%d] = %d\n", i, membership[i])

            /* update new cluster centers : sum of objects located within */
            newClusterSize[index]++;

    checkCuda(cudaFree(deviceClusters));
    checkCuda(cudaFree(deviceMembership));
    checkCuda(cudaFree(deviceIntermediates));

    free(dimObjects[0]);
    free(dimObjects);
