ソースを参照

mpi: minor fixes

Nathalie Furmento 12 年 前
コミット
c83ad0af19
共有5 個のファイルを変更した8 個の追加7 個の削除を含む
  1. 3 3
      mpi/examples/cholesky/mpi_cholesky.c
  2. 1 1
      mpi/examples/stencil/stencil5.c
  3. 0 1
      mpi/src/starpu_mpi_datatype.c
  4. 3 1
      mpi/src/starpu_mpi_insert_task.c
  5. 1 1
      mpi/tests/insert_task.c

+ 3 - 3
mpi/examples/cholesky/mpi_cholesky.c

@@ -246,7 +246,7 @@ int main(int argc, char **argv)
 		{
 			for(x=0 ; x<nblocks ; x++)
 			{
-				printf("Block %d,%d :\n", x, y);
+				printf("Block %u,%u :\n", x, y);
 				for (j = 0; j < BLOCKSIZE; j++)
 				{
 					for (i = 0; i < BLOCKSIZE; i++)
@@ -277,7 +277,7 @@ int main(int argc, char **argv)
 		{
 			for(x=0 ; x<nblocks ; x++)
 			{
-				printf("Block %d,%d :\n", x, y);
+				printf("Block %u,%u :\n", x, y);
 				for (j = 0; j < BLOCKSIZE; j++)
 				{
 					for (i = 0; i < BLOCKSIZE; i++)
@@ -367,7 +367,7 @@ int main(int argc, char **argv)
 							float err = abs(test_mat[j +i*size] - orig);
 							if (err > 0.00001)
 							{
-								fprintf(stderr, "[%d] Error[%d, %d] --> %2.2f != %2.2f (err %2.2f)\n", rank, i, j, test_mat[j +i*size], orig, err);
+								fprintf(stderr, "[%d] Error[%u, %u] --> %2.2f != %2.2f (err %2.2f)\n", rank, i, j, test_mat[j +i*size], orig, err);
 								correctness = 0;
 								break;
 							}

+ 1 - 1
mpi/examples/stencil/stencil5.c

@@ -149,7 +149,7 @@ int main(int argc, char **argv)
                         fprintf(stdout, "[%d] ", my_rank);
                         for (y = 0; y < Y; y++)
 			{
-                                fprintf(stdout, "%3d ", matrix[x][y]);
+                                fprintf(stdout, "%3u ", matrix[x][y]);
                         }
                         fprintf(stdout, "\n");
                 }

+ 0 - 1
mpi/src/starpu_mpi_datatype.c

@@ -146,5 +146,4 @@ int starpu_mpi_handle_to_datatype(starpu_data_handle_t data_handle, MPI_Datatype
 		*datatype = MPI_BYTE;
 		return 1;
 	}
-	return 0;
 }

+ 3 - 1
mpi/src/starpu_mpi_insert_task.c

@@ -106,6 +106,7 @@ int _starpu_mpi_find_executee_node(starpu_data_handle_t data, enum starpu_access
 	return 0;
 }
 
+static
 void _starpu_mpi_exchange_data_before_execution(starpu_data_handle_t data, enum starpu_access_mode mode, int me, int dest, int do_execute, MPI_Comm comm)
 {
 	if (data && mode & STARPU_R) {
@@ -164,6 +165,7 @@ void _starpu_mpi_exchange_data_before_execution(starpu_data_handle_t data, enum
 	}
 }
 
+static
 void _starpu_mpi_exchange_data_after_execution(starpu_data_handle_t data, enum starpu_access_mode mode, int me, int xrank, int dest, int do_execute, MPI_Comm comm)
 {
 	if (mode & STARPU_W) {
@@ -347,7 +349,7 @@ int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...)
 		}
 	}
 
-	STARPU_ASSERT(do_execute != -1 && "StarPU needs to see a W or a REDUX data which will tell it where to execute the task");
+	STARPU_ASSERT_MSG(do_execute != -1, "StarPU needs to see a W or a REDUX data which will tell it where to execute the task");
 
 	if (inconsistent_execute == 1) {
 		if (xrank == -1) {

+ 1 - 1
mpi/tests/insert_task.c

@@ -23,7 +23,7 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 	unsigned *x = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);
 	unsigned *y = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[1]);
 
-        FPRINTF(stdout, "VALUES: %d %d\n", *x, *y);
+        FPRINTF(stdout, "VALUES: %u %u\n", *x, *y);
         *x = (*x + *y) / 2;
 }