 
 	if (cudaStat != cudaSuccess) {
 		printf("Error while allocation device space\n");
-		printf("for onesVec in rowSum function.\n");
-		exir(1);
+		printf("for onesVec in colSum function.\n");
+		exit(1);
 	}
 
 	dim3 onesBlock(blocksize,1);
 	int gridsize = (int) m/blocksize;
 	dim3 onesGrid(gridsize,1);
-	SetOnes<<<onesGrid, onesBlock>>>(onesVec);
+	SetOnes<<<onesGrid, onesBlock>>>(m,onesVec);
 
 	double a = 1.0;
 	double b = 0.0;

	double a = 1.0;
	double b = 0.0;

	culasStat = cublasDgemv(handle, CUBLAS_OP_N, m, n, 
							&a, mat, n, onesVec, 1, 
							&b, sum, 1);


	if (cudaStat != cudaSuccess) {
		printf("Error while allocation device space\n");
		printf("for onesVec in rowSum function.\n");
		exit(1);
	}
	
	dim3 onesBlock(blocksize,1);
