Browse Source

mpi: move the warning to the comm_stats init function

Nathalie Furmento 13 years ago
parent
commit
a19b7037d2
2 changed files with 2 additions and 4 deletions
  1. 0 4
      mpi/starpu_mpi.c
  2. 2 0
      mpi/starpu_mpi_stats.c

+ 0 - 4
mpi/starpu_mpi.c

@@ -768,10 +768,6 @@ static void _starpu_mpi_add_sync_point_in_fxt(void)
 static
 int _starpu_mpi_initialize(int initialize_mpi, int *rank, int *world_size)
 {
-#ifdef STARPU_COMM_STATS
-	if (!getenv("STARPU_SILENT")) fprintf(stderr,"Warning: StarPU was configured with --enable-comm-stats, which slows down a bit\n");
-#endif
-
 	_STARPU_PTHREAD_MUTEX_INIT(&mutex, NULL);
 	_STARPU_PTHREAD_COND_INIT(&cond_progression, NULL);
 	_STARPU_PTHREAD_COND_INIT(&cond_finished, NULL);

+ 2 - 0
mpi/starpu_mpi_stats.c

@@ -31,6 +31,8 @@ void _starpu_mpi_comm_amounts_init()
 #ifdef STARPU_COMM_STATS
 	int i;
 
+	if (!getenv("STARPU_SILENT")) fprintf(stderr,"Warning: StarPU was configured with --enable-comm-stats, which slows down a bit\n");
+
 	MPI_Comm_size(MPI_COMM_WORLD, &world_size);
 	_STARPU_MPI_DEBUG("allocating for %d nodes\n", world_size);