Преглед изворни кода

Fix computing total flops at the end of the trace

Samuel Thibault пре 7 година
родитељ
комит
eeea06d756
1 измењених фајлова са 16 додато и 0 уклоњено
  1. 16 0
      src/debug/traces/starpu_fxt.c

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

@@ -3724,6 +3724,22 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 			_starpu_fxt_process_computations(options);
 	}
 
+	if (!options->no_flops)
+	{
+		/* computations are supposed to be over, drop any pending comp */
+		unsigned i;
+		for (i = 0; i < STARPU_NMAXWORKERS; i++)
+		{
+			struct _starpu_computation *comp = ongoing_computation[i];
+			if (comp) {
+				STARPU_ASSERT(!comp->peer);
+				_starpu_computation_list_erase(&computation_list, comp);
+			}
+		}
+		/* And flush completed computations */
+		_starpu_fxt_process_computations(options);
+	}
+
 	if (out_paje_file && !options->no_flops)
 	{
 		unsigned i;