浏览代码

Solve configure parameters problems

Romain LION 4 年之前
父节点
当前提交
d87ecf8ef2
共有 3 个文件被更改,包括 30 次插入26 次删除
  1. 4 2
      configure.ac
  2. 10 10
      mpi/include/starpu_mpi_ft.h
  3. 16 14
      mpi/src/mpi_failure_tolerance/starpu_mpi_checkpoint_template.c

+ 4 - 2
configure.ac

@@ -591,9 +591,11 @@ if test x$enable_mpi_ft = xyes ; then
         AC_MSG_ERROR([Failure tolerance mechanisms only work with a particular MPI implementation: ULFM (OpenMPI based).])
     else
         AC_DEFINE(STARPU_USE_MPI_FT, [1], [whether the StarPU MPI failure tolerance mechanisms are requested])
-        AC_DEFINE(STARPU_USE_MPI_FT_STATS, [1], [whether the StarPU MPI failure tolerance mechanisms stats are watched])
         use_mpi_ft=yes;
-        use_mpi_ft_stats=$enable_mpi_ft_stats;
+        if test x$enable_mpi_ft_stats = xyes ; then
+            AC_DEFINE(STARPU_USE_MPI_FT_STATS, [1], [whether the StarPU MPI failure tolerance mechanisms stats are watched])
+            use_mpi_ft_stats=$enable_mpi_ft_stats;
+        fi
     fi
 fi
 

+ 10 - 10
mpi/include/starpu_mpi_ft.h

@@ -52,16 +52,16 @@ int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_te
 int starpu_mpi_ft_turn_on(void);
 int starpu_mpi_ft_turn_off(void);
 int _starpu_mpi_checkpoint_template_print(starpu_mpi_checkpoint_template_t cp_template);
-#else STARPU_USE_MPI_FT
-int starpu_mpi_checkpoint_template_register(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain, ...) {return 0;}
-int starpu_mpi_checkpoint_template_create(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain) {return 0;}
-int starpu_mpi_checkpoint_template_add_entry(starpu_mpi_checkpoint_template_t* cp_template, ...) {return 0;}
-int starpu_mpi_checkpoint_template_freeze(starpu_mpi_checkpoint_template_t* cp_template) {return 0;}
-int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_template) {return 0;}
-int starpu_mpi_ft_turn_on(void) {return 0;}
-int starpu_mpi_ft_turn_off(void) {return 0;}
-int _starpu_mpi_checkpoint_template_print(starpu_mpi_checkpoint_template_t cp_template) {return 0;}
-#endif
+#else //STARPU_USE_MPI_FT
+static int starpu_mpi_checkpoint_template_register(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain, ...) {return 0;}
+static int starpu_mpi_checkpoint_template_create(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain) {return 0;}
+static int starpu_mpi_checkpoint_template_add_entry(starpu_mpi_checkpoint_template_t* cp_template, ...) {return 0;}
+static int starpu_mpi_checkpoint_template_freeze(starpu_mpi_checkpoint_template_t* cp_template) {return 0;}
+static int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_template) {return 0;}
+static int starpu_mpi_ft_turn_on(void) {return 0;}
+static int starpu_mpi_ft_turn_off(void) {return 0;}
+static int _starpu_mpi_checkpoint_template_print(starpu_mpi_checkpoint_template_t cp_template) {return 0;}
+#endif //STARPU_USE_MPI_FT
 
 #ifdef __cplusplus
 }

+ 16 - 14
mpi/src/mpi_failure_tolerance/starpu_mpi_checkpoint_template.c

@@ -65,7 +65,9 @@ void checkpoint_template_lib_init(void) {
 	starpu_mpi_comm_rank(MPI_COMM_WORLD, &my_rank);
 	starpu_mpi_comm_size(MPI_COMM_WORLD, &comm_size);
 	current_instance = 0;
+#ifdef STARPU_MPI_VERBOSE
 	_starpu_mpi_set_debug_level_max(1000);
+#endif
 }
 
 void checkpoint_template_lib_quit(void) {
@@ -328,7 +330,7 @@ int _starpu_mpi_checkpoint_post_cp_discard_send(starpu_mpi_checkpoint_template_t
 
 int _starpu_mpi_checkpoint_template_freeze(starpu_mpi_checkpoint_template_t cp_template)
 {
-	char str[256];
+//	char str[256];
 	starpu_pthread_mutex_lock(&cp_template->mutex);
 	_STARPU_MPI_DEBUG(2, "Start freezing checkpoint id:%d\n", cp_template->cp_id);
 	cp_template->frozen                 = 1;
@@ -345,19 +347,19 @@ int _starpu_mpi_checkpoint_template_freeze(starpu_mpi_checkpoint_template_t cp_t
 		}
 		item = _starpu_mpi_checkpoint_template_get_next_data(cp_template, item);
 	}
-	sprintf(str, "backupped by Array maxsize:%d - currentsize:%d - ", cp_template->backupped_by_array_max_size, cp_template->backupped_by_array_used_size);
-	for (int i=0 ; i<cp_template->backupped_by_array_used_size ; i++)
-	{
-		sprintf(str,"%s%d ", str, cp_template->backupped_by_array[i]);
-	}
-	fprintf(stderr, "%s\n", str);
-
-	sprintf(str,"backup of Array maxsize:%d - currentsize:%d - ", cp_template->backup_of_array_max_size, cp_template->backup_of_array_used_size);
-	for (int i=0 ; i<cp_template->backup_of_array_used_size ; i++)
-	{
-		sprintf(str,"%s%d ", str, cp_template->backup_of_array[i]);
-	}
-	fprintf(stderr, "%s\n", str);
+//	sprintf(str, "backupped by Array maxsize:%d - currentsize:%d - ", cp_template->backupped_by_array_max_size, cp_template->backupped_by_array_used_size);
+//	for (int i=0 ; i<cp_template->backupped_by_array_used_size ; i++)
+//	{
+//		sprintf(str,"%s%d ", str, cp_template->backupped_by_array[i]);
+//	}
+//	fprintf(stderr, "%s\n", str);
+//
+//	sprintf(str,"backup of Array maxsize:%d - currentsize:%d - ", cp_template->backup_of_array_max_size, cp_template->backup_of_array_used_size);
+//	for (int i=0 ; i<cp_template->backup_of_array_used_size ; i++)
+//	{
+//		sprintf(str,"%s%d ", str, cp_template->backup_of_array[i]);
+//	}
+//	fprintf(stderr, "%s\n", str);
 
 	starpu_pthread_mutex_unlock(&cp_template->mutex);