 	i = blockIdx.x;
 	for(count=0; count<k; count++)
 	{
-		out[i*k+count] = findMin(m, n, k, count, D, out, R);
+		out[i*k+count] = findMin(m, n, k, count, D, out);
+		__syncthreads();
 	}
 }
 

	int *V, *out;				//host copies
	int *d_V, *d_out;			//device copies
	int *D;						
	int *R;						
//	int *dim_D;					//be replaced with shared memory
	FILE *fp;
	if(argc != 2)

		{
			printf("%d", out[i*k+j]);
			if(j == k-1)
			{
				printf("\n");
			}
			else
			{
				printf(" ");
			}
		}
	} 
} 
void showD(int m, int *D)
{
	int i,j;
	printf("D:\n");
	for(i=0; i<m; i++)
	{
		for(j=0; j<m; j++)
		{
			printf("%d", D[i*m+j]);
			if(j == m-1)
			{
				printf("\n");
			}
