X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea5d4ac6b57a3771a16f9a998179688088f8b96c..9d5492041a839402b7c142c08ebdc8df6e9d5c24:/src/instr/instr_config.c diff --git a/src/instr/instr_config.c b/src/instr/instr_config.c index e91a964db4..ce36bb4a28 100644 --- a/src/instr/instr_config.c +++ b/src/instr/instr_config.c @@ -73,7 +73,9 @@ int TRACE_start() TRACE_paje_start(); /* activate trace */ - xbt_assert (trace_active==0, "Tracing is already active."); + if (trace_active == 1){ + THROWF (tracing_error, 0, "Tracing is already active"); + } trace_active = 1; XBT_DEBUG ("Tracing is on"); @@ -148,9 +150,8 @@ int TRACE_is_configured(void) int TRACE_smpi_is_enabled(void) { - return (xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI) || - TRACE_smpi_is_grouped())&& - TRACE_is_enabled(); + return (trace_smpi_enabled || TRACE_smpi_is_grouped()) + && TRACE_is_enabled(); } int TRACE_smpi_is_grouped(void) @@ -395,9 +396,10 @@ void TRACE_generate_triva_uncat_conf (void) char *name, *value; FILE *file = fopen (output, "w"); - xbt_assert (file != NULL, - "Unable to open file (%s) for writing triva graph " - "configuration (uncategorized).", output); + if (file == NULL){ + THROWF (system_error, 1, "Unable to open file (%s) for writing triva graph " + "configuration (uncategorized).", output); + } //open fprintf (file, "{\n"); @@ -451,9 +453,10 @@ void TRACE_generate_triva_cat_conf (void) } FILE *file = fopen (output, "w"); - xbt_assert (file != NULL, - "Unable to open file (%s) for writing triva graph " - "configuration (categorized).", output); + if (file == NULL){ + THROWF (system_error, 1, "Unable to open file (%s) for writing triva graph " + "configuration (categorized).", output); + } //open fprintf (file, "{\n"); @@ -503,16 +506,6 @@ void TRACE_generate_triva_cat_conf (void) } } -void TRACE_set_network_update_mechanism (void) -{ - if (TRACE_is_enabled()){ - if (TRACE_categorized() || TRACE_uncategorized()){ - XBT_INFO ("Tracing resource utilization active, network/optim configuration now set to Full."); - xbt_cfg_set_string (_surf_cfg_set, "network/optim", "Full"); - } - } -} - #undef OPT_TRACING #undef OPT_TRACING_PLATFORM #undef OPT_TRACING_SMPI