+ int is_tracing = 0;
+ int i;
+
+ for (i = 0; i < argc; i++){
+ if (!strcmp (argv[i], "--trace")){
+ is_tracing = 1;
+ }
+ }
+
+ if (is_tracing) {
+ //if TRACE_start is not called, all other tracing
+ //functions will be disabled
+ TRACE_start ("simulation.trace");
+ }
+ TRACE_host_variable_declare ("is_slave");
+ TRACE_host_variable_declare ("is_master");
+ TRACE_host_variable_declare ("task_creation");
+ TRACE_host_variable_declare ("task_computation");
+ TRACE_category ("compute");
+ TRACE_category ("finalize");