Parcourir la source

set bandwidth variables to zero when they start

Lucas Schnorr il y a 8 ans
Parent
commit
39c46dc93a
2 fichiers modifiés avec 7 ajouts et 11 suppressions
  1. 6 0
      src/debug/traces/starpu_fxt.c
  2. 1 11
      src/debug/traces/starpu_fxt_mpi.c

+ 6 - 0
src/debug/traces/starpu_fxt.c

@@ -2582,8 +2582,14 @@ static void handle_mpi_start(struct fxt_ev_64 *ev, struct starpu_fxt_options *op
 		mpicommthread_container_alias(new_mpicommthread_container_alias, STARPU_POTI_STR_LEN, prefix);
 		snprintf(new_mpicommthread_container_alias, STARPU_POTI_STR_LEN, "%smpict", prefix);
 		poti_CreateContainer(date, new_mpicommthread_container_alias, "MPICt", program_container, new_mpicommthread_container_alias);
+		//set bandwidth variables to zero when they start
+		poti_SetVariable(date, new_mpicommthread_container_alias, "bwi_mpi", 0.);
+		poti_SetVariable(date, new_mpicommthread_container_alias, "bwo_mpi", 0.);
 #else
 		fprintf(out_paje_file, "7	%.9f	%smpict		MPICt	%sp	%smpict\n", date, prefix, prefix, prefix);
+		//set bandwidth variables to zero when they start
+		fprintf(out_paje_file, "13	%.9f	%smpict	bwi_mpi	0.0\n", date, prefix);
+		fprintf(out_paje_file, "13	%.9f	%smpict	bwo_mpi	0.0\n", date, prefix);
 #endif
 		mpicommthread_set_state(date, prefix, "Sl");
 	}

+ 1 - 11
src/debug/traces/starpu_fxt_mpi.c

@@ -228,17 +228,7 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, unsigned n)
 	char mpi_container[STARPU_POTI_STR_LEN];
 #endif
 
-	for (node = 0; node < n ; node++)
-	{
-#ifdef STARPU_HAVE_POTI
-		snprintf(mpi_container, sizeof(mpi_container), "%u_mpict", node);
-		poti_SetVariable(0., mpi_container, "bwi_mpi", 0.);
-		poti_SetVariable(0., mpi_container, "bwo_mpi", 0.);
-#else
-		fprintf(out_paje_file, "13	0.0	%u_mpict	bwi_mpi	0.0\n", node);
-		fprintf(out_paje_file, "13	0.0	%u_mpict	bwo_mpi	0.0\n", node);
-#endif
-	}
+	//bwi_mpi and bwo_mpi are set to zero when MPI thread containers are created
 
 	mpi_transfer_list_init(&pending_receives);