Prechádzať zdrojové kódy

When generating the FxT trace, use the maximum number of workers indicated by
autoconf rather than hardcoding it.

Cédric Augonnet 14 rokov pred
rodič
commit
310df96a51
3 zmenil súbory, kde vykonal 14 pridanie a 14 odobranie
  1. 8 8
      tools/fxt_tool.c
  2. 1 1
      tools/fxt_tool.h
  3. 5 5
      tools/fxt_tool_common.c

+ 8 - 8
tools/fxt_tool.c

@@ -44,16 +44,16 @@ static int nworkers = 0;
 unsigned ninputfiles = 0;
 static char *filenames[64];
 
-static uint64_t last_codelet_hash[MAXWORKERS];
-static double last_codelet_start[MAXWORKERS];
-static char last_codelet_symbol[128][MAXWORKERS];
+static uint64_t last_codelet_hash[STARPU_NMAXWORKERS];
+static double last_codelet_start[STARPU_NMAXWORKERS];
+static char last_codelet_symbol[128][STARPU_NMAXWORKERS];
 
 /* If more than a period of time has elapsed, we flush the profiling info,
  * otherwise they are accumulated everytime there is a new relevant event. */
 #define ACTIVITY_PERIOD	75.0
-static double last_activity_flush_timestamp[MAXWORKERS];
-static double accumulated_sleep_time[MAXWORKERS];
-static double accumulated_exec_time[MAXWORKERS];
+static double last_activity_flush_timestamp[STARPU_NMAXWORKERS];
+static double accumulated_sleep_time[STARPU_NMAXWORKERS];
+static double accumulated_exec_time[STARPU_NMAXWORKERS];
 
 
 
@@ -413,7 +413,7 @@ static void handle_worker_status(const char *newstatus)
 	end_time = STARPU_MAX(end_time, ev.time);
 }
 
-static double last_sleep_start[MAXWORKERS];
+static double last_sleep_start[STARPU_NMAXWORKERS];
 
 static void handle_start_sleep(void)
 {
@@ -778,7 +778,7 @@ void parse_new_file(char *filename_in, char *file_prefix, uint64_t file_offset)
 	block = fxt_blockev_enter(fut);
 
 	/* create a htable to identify each worker(tid) */
-	hcreate(MAXWORKERS);
+	hcreate(STARPU_NMAXWORKERS);
 
 	symbol_list = symbol_name_list_new(); 
 	communication_list = communication_list_new();

+ 1 - 1
tools/fxt_tool.h

@@ -29,10 +29,10 @@
 #include <common/fxt.h>
 #include <common/list.h>
 #include <starpu_mpi_fxt.h>
+#include <starpu.h>
 
 #include "histo_paje.h"
 
-#define MAXWORKERS      32
 #define FACTOR  100
 
 extern void init_dag_dot(void);

+ 5 - 5
tools/fxt_tool_common.c

@@ -16,11 +16,11 @@
 
 #include "fxt_tool.h"
 
-static char *cpus_worker_colors[MAXWORKERS] = {"/greens9/7", "/greens9/6", "/greens9/5", "/greens9/4",  "/greens9/9", "/greens9/3",  "/greens9/2",  "/greens9/1"  };
-static char *cuda_worker_colors[MAXWORKERS] = {"/ylorrd9/9", "/ylorrd9/6", "/ylorrd9/3", "/ylorrd9/1", "/ylorrd9/8", "/ylorrd9/7", "/ylorrd9/4", "/ylorrd9/2",  "/ylorrd9/1"};
-static char *opencl_worker_colors[MAXWORKERS] = {"/blues9/9", "/blues9/6", "/blues9/3", "/blues9/1", "/blues9/8", "/blues9/7", "/blues9/4", "/blues9/2",  "/blues9/1"};
-static char *other_worker_colors[MAXWORKERS] = {"/greys9/9", "/greys9/8", "/greys9/7", "/greys9/6"};
-static char *worker_colors[MAXWORKERS];
+static char *cpus_worker_colors[STARPU_NMAXWORKERS] = {"/greens9/7", "/greens9/6", "/greens9/5", "/greens9/4",  "/greens9/9", "/greens9/3",  "/greens9/2",  "/greens9/1"  };
+static char *cuda_worker_colors[STARPU_NMAXWORKERS] = {"/ylorrd9/9", "/ylorrd9/6", "/ylorrd9/3", "/ylorrd9/1", "/ylorrd9/8", "/ylorrd9/7", "/ylorrd9/4", "/ylorrd9/2",  "/ylorrd9/1"};
+static char *opencl_worker_colors[STARPU_NMAXWORKERS] = {"/blues9/9", "/blues9/6", "/blues9/3", "/blues9/1", "/blues9/8", "/blues9/7", "/blues9/4", "/blues9/2",  "/blues9/1"};
+static char *other_worker_colors[STARPU_NMAXWORKERS] = {"/greys9/9", "/greys9/8", "/greys9/7", "/greys9/6"};
+static char *worker_colors[STARPU_NMAXWORKERS];
 
 static unsigned opencl_index = 0;
 static unsigned cuda_index = 0;