 		cudaMalloc((void **)&d_out, m*k*sizeof(int));
 
 //		cudaMalloc((void **)&D, m*m*sizeof(int));
+		cudaMalloc((void **)&dim_D, m*m*n*sizeof(int));
 
 		for(i=0; i<m*n; i++)
 		{

	int *d_V, *d_out;			//device copies
	
//	int *D;						//will be replaced with shared memory

	FILE *fp;
	if(argc != 2)

		
		cudaMemcpy(d_V, V, m*n*sizeof(int), cudaMemcpyHostToDevice);

		dim3 blk(m, m, n);
		knn<<<1, blk, m*m*sizeof(int)>>>(m, n, k, d_V, d_out, dim_D);

		cudaMemcpy(out, d_out, m*k*sizeof(int), cudaMemcpyDeviceToHost);

