From: schnorr Date: Thu, 5 Aug 2010 11:06:14 +0000 (+0000) Subject: removing tracing functions from examples that are not in msg/tracing directory X-Git-Tag: v3_5~709 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fd92747951bee810d382edb735052a6b56db1c6d removing tracing functions from examples that are not in msg/tracing directory git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8112 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/msg/masterslave/masterslave_forwarder.c b/examples/msg/masterslave/masterslave_forwarder.c index b64aacd2a1..8abeffd793 100644 --- a/examples/msg/masterslave/masterslave_forwarder.c +++ b/examples/msg/masterslave/masterslave_forwarder.c @@ -36,8 +36,6 @@ int master(int argc, char *argv[]) double task_comp_size = 0; double task_comm_size = 0; - TRACE_host_variable_set ("is_master", 1); - int i; xbt_assert1(sscanf(argv[1], "%d", &number_of_tasks), @@ -56,8 +54,6 @@ int master(int argc, char *argv[]) sprintf(sprintf_buffer, "Task_%d", i); todo[i] = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL); - TRACE_host_variable_set ("task_creation", i); - TRACE_msg_set_task_category (todo[i], "compute"); } } @@ -92,7 +88,6 @@ int master(int argc, char *argv[]) ("All tasks have been dispatched. Let's tell everybody the computation is over."); for (i = 0; i < slaves_count; i++){ m_task_t finalize=MSG_task_create("finalize", 0, 0, FINALIZE); - TRACE_msg_set_task_category(finalize,"finalize"); MSG_task_put(finalize, slaves[i], PORT_22); } @@ -106,7 +101,6 @@ int master(int argc, char *argv[]) int slave(int argc, char *argv[]) { m_task_t task = NULL; - TRACE_host_variable_set ("is_slave", 1); int res; while (1) { res = MSG_task_get(&(task), PORT_22); @@ -119,7 +113,6 @@ int slave(int argc, char *argv[]) } INFO1("Processing \"%s\"", MSG_task_get_name(task)); - TRACE_host_variable_add ("task_computation", MSG_task_get_compute_duration(task)); MSG_task_execute(task); INFO1("\"%s\" done", MSG_task_get_name(task)); MSG_task_destroy(task); @@ -207,27 +200,8 @@ MSG_error_t test_all(const char *platform_file, const char *application_file) int main(int argc, char *argv[]) { MSG_error_t res = MSG_OK; - 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"); - MSG_global_init(&argc, argv); if (argc < 3) { printf("Usage: %s platform_file deployment_file\n", argv[0]); @@ -237,8 +211,6 @@ int main(int argc, char *argv[]) res = test_all(argv[1], argv[2]); MSG_clean(); - TRACE_end (); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/masterslave/masterslave_mailbox.c b/examples/msg/masterslave/masterslave_mailbox.c index f6ac5cb607..0b82cf4f64 100644 --- a/examples/msg/masterslave/masterslave_mailbox.c +++ b/examples/msg/masterslave/masterslave_mailbox.c @@ -26,8 +26,6 @@ int master(int argc, char *argv[]) double task_comm_size = atof(argv[3]); long slaves_count = atol(argv[4]); - TRACE_host_variable_set ("is_master", 1); - int i; INFO2("Got %ld slaves and %ld tasks to process", slaves_count,number_of_tasks); @@ -40,8 +38,6 @@ int master(int argc, char *argv[]) sprintf(mailbox,"slave-%ld",i % slaves_count); sprintf(sprintf_buffer, "Task_%d", i); task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL); - TRACE_host_variable_set ("task_creation", i); - TRACE_msg_set_task_category (task, "compute"); if (number_of_tasks<10000 || i%10000 == 0) INFO3("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name, number_of_tasks, mailbox); @@ -54,7 +50,6 @@ int master(int argc, char *argv[]) sprintf(mailbox,"slave-%ld",i % slaves_count); m_task_t finalize = MSG_task_create ("finalize", 0, 0, 0); - TRACE_msg_set_task_category(finalize, "finalize"); MSG_task_send(finalize, mailbox); } @@ -70,8 +65,6 @@ int slave(int argc, char *argv[]) int id = -1; char mailbox[80]; - TRACE_host_variable_set ("is_slave", 1); - xbt_assert1(sscanf(argv[1],"%d", &id), "Invalid argument %s\n",argv[1]); @@ -88,7 +81,6 @@ int slave(int argc, char *argv[]) } // INFO1("Processing \"%s\"", MSG_task_get_name(task)); - TRACE_host_variable_add ("task_computation", MSG_task_get_compute_duration(task)); MSG_task_execute(task); // INFO1("\"%s\" done", MSG_task_get_name(task)); MSG_task_destroy(task); @@ -125,27 +117,8 @@ MSG_error_t test_all(const char *platform_file, int main(int argc, char *argv[]) { MSG_error_t res = MSG_OK; - 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"); - MSG_global_init(&argc,argv); if (argc < 3) { printf ("Usage: %s platform_file deployment_file\n",argv[0]); @@ -156,10 +129,6 @@ int main(int argc, char *argv[]) SIMIX_message_sizes_output("toto.txt"); MSG_clean(); - if (is_tracing){ - TRACE_end(); - } - if(res==MSG_OK) return 0; else