From: Martin Quinson Date: Tue, 2 Oct 2012 08:37:15 +0000 (+0200) Subject: Deprecate MSG_clean X-Git-Tag: v3_8~149 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/830b5c4bc694ade087c43f39015faa9065795630 Deprecate MSG_clean --- diff --git a/ChangeLog b/ChangeLog index 0e7780040a..97393aa2cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,7 +25,8 @@ SimGrid (3.8) NOT RELEASED; urgency=low executing comes back (ON_FAILURE="RESTART" on deployment file, MSG_process_auto_restart_set). * Use the "msg_" prefix for all datatypes (instead of m_, msg_ and MSG_), - please stop using the old ones. + please stop using the old ones, they are DEPRECATED. + * Deprecate MSG_clean(). No need to call it anymore. Simix: * Bug fixes around the resource failures: don't let the processes diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 4866c340a1..22e5961ea6 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -589,7 +589,6 @@ int main(int argc, char *argv[]) res = MSG_action_trace_run(argv[3]); // it's ok to pass a NULL argument here XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/bittorrent/bittorrent.c b/examples/msg/bittorrent/bittorrent.c index 367933000c..e0e4c68689 100644 --- a/examples/msg/bittorrent/bittorrent.c +++ b/examples/msg/bittorrent/bittorrent.c @@ -32,7 +32,5 @@ int main(int argc, char *argv[]) MSG_main(); - MSG_clean(); - return 0; } diff --git a/examples/msg/bittorrent/bittorrent_platfgen.c b/examples/msg/bittorrent/bittorrent_platfgen.c index ff18530ff6..7147b5091b 100644 --- a/examples/msg/bittorrent/bittorrent_platfgen.c +++ b/examples/msg/bittorrent/bittorrent_platfgen.c @@ -138,7 +138,5 @@ int main(int argc, char *argv[]) MSG_main(); - MSG_clean(); - return 0; } diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index 129c79aead..5061abd7bd 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -924,7 +924,6 @@ int main(int argc, char *argv[]) XBT_CRITICAL("Messages created: %ld", smx_total_comms); XBT_INFO("Simulated time: %g", MSG_get_clock()); - MSG_clean(); chord_exit(); if (res == MSG_OK) diff --git a/examples/msg/cloud/masterslave_virtual_machines.c b/examples/msg/cloud/masterslave_virtual_machines.c index 8e11b09b74..b0a073a2fb 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.c +++ b/examples/msg/cloud/masterslave_virtual_machines.c @@ -212,7 +212,6 @@ int main(int argc, char *argv[]) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); free(hosts); free(hostnames); xbt_dynar_free(&hosts_dynar); diff --git a/examples/msg/gpu/test_MSG_gpu_task_create.c b/examples/msg/gpu/test_MSG_gpu_task_create.c index ad78f79191..29362af2b3 100644 --- a/examples/msg/gpu/test_MSG_gpu_task_create.c +++ b/examples/msg/gpu/test_MSG_gpu_task_create.c @@ -32,8 +32,6 @@ int main(int argc, char *argv[]) XBT_INFO("GPU task %p was created", mytask); - MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/gtnets/gtnets.c b/examples/msg/gtnets/gtnets.c index defbc80d0d..52369804af 100644 --- a/examples/msg/gtnets/gtnets.c +++ b/examples/msg/gtnets/gtnets.c @@ -239,8 +239,6 @@ int main(int argc, char *argv[]) res = test_all(argv[1], argv[2]); - MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/icomms/peer.c b/examples/msg/icomms/peer.c index cfcfa8dfb7..5ed53e09de 100644 --- a/examples/msg/icomms/peer.c +++ b/examples/msg/icomms/peer.c @@ -178,7 +178,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/icomms/peer2.c b/examples/msg/icomms/peer2.c index ee1111f9f8..01d03c6bf0 100644 --- a/examples/msg/icomms/peer2.c +++ b/examples/msg/icomms/peer2.c @@ -131,7 +131,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/icomms/peer3.c b/examples/msg/icomms/peer3.c index ae82a7c44b..a01f2c7b9c 100644 --- a/examples/msg/icomms/peer3.c +++ b/examples/msg/icomms/peer3.c @@ -165,7 +165,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/io/file.c b/examples/msg/io/file.c index 67696610e2..96b70b3559 100644 --- a/examples/msg/io/file.c +++ b/examples/msg/io/file.c @@ -89,7 +89,6 @@ int main(int argc, char **argv) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); if (res == MSG_OK) return 0; else diff --git a/examples/msg/io/file_unlink.c b/examples/msg/io/file_unlink.c index 8a36a78778..2d8c5eb381 100644 --- a/examples/msg/io/file_unlink.c +++ b/examples/msg/io/file_unlink.c @@ -121,7 +121,6 @@ int main(int argc, char **argv) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); if (res == MSG_OK) return 0; else diff --git a/examples/msg/kademlia/kademlia.c b/examples/msg/kademlia/kademlia.c index 1f5f732325..10c30ce0e9 100644 --- a/examples/msg/kademlia/kademlia.c +++ b/examples/msg/kademlia/kademlia.c @@ -489,7 +489,6 @@ int main(int argc, char *argv[]) XBT_CRITICAL("Messages created: %ld", smx_total_comms); XBT_INFO("Simulated time: %g", MSG_get_clock()); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_arg.c b/examples/msg/masterslave/masterslave_arg.c index ad3d593640..873fedbf90 100644 --- a/examples/msg/masterslave/masterslave_arg.c +++ b/examples/msg/masterslave/masterslave_arg.c @@ -138,8 +138,6 @@ int main(int argc, char *argv[]) XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/masterslave/masterslave_bypass.c b/examples/msg/masterslave/masterslave_bypass.c index 95bc507816..41cb1f8568 100644 --- a/examples/msg/masterslave/masterslave_bypass.c +++ b/examples/msg/masterslave/masterslave_bypass.c @@ -283,7 +283,6 @@ int main(int argc, char *argv[]) MSG_init(&argc, argv); res = test_all(); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_cluster.c b/examples/msg/masterslave/masterslave_cluster.c index 8c02de79d9..d05ec6aa2c 100644 --- a/examples/msg/masterslave/masterslave_cluster.c +++ b/examples/msg/masterslave/masterslave_cluster.c @@ -220,7 +220,6 @@ int main(int argc, char *argv[]) MSG_init(&argc, argv); res = test_all(argv[1]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_console.c b/examples/msg/masterslave/masterslave_console.c index ecefae12e5..d49df00eea 100644 --- a/examples/msg/masterslave/masterslave_console.c +++ b/examples/msg/masterslave/masterslave_console.c @@ -131,7 +131,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_failure.c b/examples/msg/masterslave/masterslave_failure.c index 7292997165..6a4f5e324a 100644 --- a/examples/msg/masterslave/masterslave_failure.c +++ b/examples/msg/masterslave/masterslave_failure.c @@ -210,7 +210,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_forwarder.c b/examples/msg/masterslave/masterslave_forwarder.c index 3817018ef1..20f68414a8 100644 --- a/examples/msg/masterslave/masterslave_forwarder.c +++ b/examples/msg/masterslave/masterslave_forwarder.c @@ -214,7 +214,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_kill.c b/examples/msg/masterslave/masterslave_kill.c index 85d50d6a48..bc0a2dc9a2 100644 --- a/examples/msg/masterslave/masterslave_kill.c +++ b/examples/msg/masterslave/masterslave_kill.c @@ -73,7 +73,6 @@ int main(int argc, char *argv[]) exit(1); } test_all(argv[1], argv[2]); - res = MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/masterslave/masterslave_mailbox.c b/examples/msg/masterslave/masterslave_mailbox.c index d69ed23a23..73dd03c896 100644 --- a/examples/msg/masterslave/masterslave_mailbox.c +++ b/examples/msg/masterslave/masterslave_mailbox.c @@ -125,7 +125,6 @@ int main(int argc, char *argv[]) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/mc/bugged1.c b/examples/msg/mc/bugged1.c index 3200fbd6c2..585a1f3cbc 100644 --- a/examples/msg/mc/bugged1.c +++ b/examples/msg/mc/bugged1.c @@ -66,8 +66,6 @@ int main(int argc, char *argv[]) MSG_main(); - MSG_clean(); - return 0; } diff --git a/examples/msg/migration/migration.c b/examples/msg/migration/migration.c index fc14097711..87df4982dc 100644 --- a/examples/msg/migration/migration.c +++ b/examples/msg/migration/migration.c @@ -98,9 +98,6 @@ int main(int argc, char *argv[]) xbt_cond_destroy(cond); xbt_mutex_destroy(mutex); - if (res == MSG_OK) - res = MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/ns3/ns3.c b/examples/msg/ns3/ns3.c index 44e213efc8..6db54f35cb 100644 --- a/examples/msg/ns3/ns3.c +++ b/examples/msg/ns3/ns3.c @@ -218,8 +218,6 @@ int main(int argc, char *argv[]) res = test_all(argv[1], argv[2]); - MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/parallel_task/parallel_task.c b/examples/msg/parallel_task/parallel_task.c index 7bd1811a3b..e70aa46e8a 100644 --- a/examples/msg/parallel_task/parallel_task.c +++ b/examples/msg/parallel_task/parallel_task.c @@ -101,7 +101,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/parallel_task/test_ptask.c b/examples/msg/parallel_task/test_ptask.c index 5cae52262d..efe1356ecd 100644 --- a/examples/msg/parallel_task/test_ptask.c +++ b/examples/msg/parallel_task/test_ptask.c @@ -164,7 +164,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/pmm/msg_pmm.c b/examples/msg/pmm/msg_pmm.c index 4e2157e950..f9b9c8d70d 100644 --- a/examples/msg/pmm/msg_pmm.c +++ b/examples/msg/pmm/msg_pmm.c @@ -280,8 +280,6 @@ int main(int argc, char *argv[]) #endif XBT_CRITICAL("Simulated time: %g", MSG_get_clock()); - MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/examples/msg/priority/priority.c b/examples/msg/priority/priority.c index 958ebfe0a7..f82d13207d 100644 --- a/examples/msg/priority/priority.c +++ b/examples/msg/priority/priority.c @@ -80,7 +80,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); #ifdef _MSC_VER _set_output_format(prev_exponent_format); diff --git a/examples/msg/properties/msg_prop.c b/examples/msg/properties/msg_prop.c index 7c05736efc..2347d0cd24 100644 --- a/examples/msg/properties/msg_prop.c +++ b/examples/msg/properties/msg_prop.c @@ -135,7 +135,6 @@ int main(int argc, char *argv[]) exit(1); } res = test_all(argv[1], argv[2]); - MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/sendrecv/sendrecv.c b/examples/msg/sendrecv/sendrecv.c index bfd7b3b323..038697c600 100644 --- a/examples/msg/sendrecv/sendrecv.c +++ b/examples/msg/sendrecv/sendrecv.c @@ -190,8 +190,6 @@ int main(int argc, char *argv[]) XBT_INFO("Total simulation time: %le", MSG_get_clock()); - MSG_clean(); - #ifdef _MSC_VER _set_output_format(prev_exponent_format); #endif diff --git a/examples/msg/start_kill_time/sk_time.c b/examples/msg/start_kill_time/sk_time.c index af61d3717d..03bb06b3ab 100644 --- a/examples/msg/start_kill_time/sk_time.c +++ b/examples/msg/start_kill_time/sk_time.c @@ -60,7 +60,6 @@ int main(int argc, char *argv[]) exit(1); } test_all(argv[1], argv[2]); - res = MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/suspend/suspend.c b/examples/msg/suspend/suspend.c index ea62f62368..bdc008558b 100644 --- a/examples/msg/suspend/suspend.c +++ b/examples/msg/suspend/suspend.c @@ -76,7 +76,6 @@ int main(int argc, char *argv[]) exit(1); } test_all(argv[1], argv[2]); - res = MSG_clean(); if (res == MSG_OK) return 0; diff --git a/examples/msg/token_ring/ring_call.c b/examples/msg/token_ring/ring_call.c index 94bd2ca104..fc6092508a 100644 --- a/examples/msg/token_ring/ring_call.c +++ b/examples/msg/token_ring/ring_call.c @@ -80,7 +80,6 @@ int main(int argc, char **argv) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); if (res == MSG_OK) return 0; else diff --git a/examples/msg/token_ring/token_bypass.c b/examples/msg/token_ring/token_bypass.c index 390200849a..a5690e7b2d 100644 --- a/examples/msg/token_ring/token_bypass.c +++ b/examples/msg/token_ring/token_bypass.c @@ -121,7 +121,7 @@ int main(int argc, char **argv) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); + if (res == MSG_OK) return 0; else diff --git a/examples/msg/tracing/categories.c b/examples/msg/tracing/categories.c index fd5221e73a..19d993ccde 100644 --- a/examples/msg/tracing/categories.c +++ b/examples/msg/tracing/categories.c @@ -109,6 +109,5 @@ int main(int argc, char *argv[]) MSG_launch_application(deployment_file); MSG_main(); - MSG_clean(); return 0; } diff --git a/examples/msg/tracing/link_srcdst_user_variables.c b/examples/msg/tracing/link_srcdst_user_variables.c index cf228cd36b..65c0e4c690 100644 --- a/examples/msg/tracing/link_srcdst_user_variables.c +++ b/examples/msg/tracing/link_srcdst_user_variables.c @@ -95,6 +95,5 @@ int main(int argc, char *argv[]) MSG_launch_application(deployment_file); MSG_main(); - MSG_clean(); return 0; } diff --git a/examples/msg/tracing/link_user_variables.c b/examples/msg/tracing/link_user_variables.c index 15db60efc1..46af714f96 100644 --- a/examples/msg/tracing/link_user_variables.c +++ b/examples/msg/tracing/link_user_variables.c @@ -87,6 +87,5 @@ int main(int argc, char *argv[]) MSG_launch_application(deployment_file); MSG_main(); - MSG_clean(); return 0; } diff --git a/examples/msg/tracing/ms.c b/examples/msg/tracing/ms.c index 532d6f6252..69fe71b72f 100644 --- a/examples/msg/tracing/ms.c +++ b/examples/msg/tracing/ms.c @@ -155,6 +155,5 @@ int main(int argc, char *argv[]) xbt_dynar_free (&marks); } - MSG_clean(); return 0; } /* end_of_main */ diff --git a/examples/msg/tracing/procmig.c b/examples/msg/tracing/procmig.c index 922495f53c..25ff1890b8 100644 --- a/examples/msg/tracing/procmig.c +++ b/examples/msg/tracing/procmig.c @@ -98,6 +98,5 @@ int main(int argc, char *argv[]) MSG_launch_application(deployment_file); MSG_main(); - MSG_clean(); return 0; } /* end_of_main */ diff --git a/examples/msg/tracing/simple.c b/examples/msg/tracing/simple.c index f6c852f176..25050e7b12 100644 --- a/examples/msg/tracing/simple.c +++ b/examples/msg/tracing/simple.c @@ -53,6 +53,5 @@ int main(int argc, char *argv[]) MSG_launch_application(deployment_file); MSG_main(); - MSG_clean(); return 0; } diff --git a/examples/msg/tracing/trace_platform.c b/examples/msg/tracing/trace_platform.c index 685a8bfd5c..427a891407 100644 --- a/examples/msg/tracing/trace_platform.c +++ b/examples/msg/tracing/trace_platform.c @@ -35,6 +35,5 @@ int main(int argc, char *argv[]) char *platform_file = argv[1]; MSG_create_environment(platform_file); MSG_main(); - MSG_clean(); return 0; } diff --git a/examples/msg/tracing/user_variables.c b/examples/msg/tracing/user_variables.c index 1a4e607e79..65697ff199 100644 --- a/examples/msg/tracing/user_variables.c +++ b/examples/msg/tracing/user_variables.c @@ -104,7 +104,6 @@ int main(int argc, char *argv[]) FILE *fp; fp = fopen ("triva_graph.plist", "w"); if (!fp){ - MSG_clean(); return 1; } fprintf (fp, "{\n node = ("); @@ -135,6 +134,5 @@ int main(int argc, char *argv[]) fprintf (fp, "}\n"); fclose (fp); - MSG_clean(); return 0; } diff --git a/include/msg/msg.h b/include/msg/msg.h index d11cec3faa..cfcffee8e3 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -56,7 +56,6 @@ XBT_PUBLIC(void) MSG_config(const char *name, ...); XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv); XBT_PUBLIC(msg_error_t) MSG_main(void); -XBT_PUBLIC(msg_error_t) MSG_clean(void); XBT_PUBLIC(void) MSG_function_register(const char *name, xbt_main_func_t code); XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code); @@ -294,6 +293,8 @@ XBT_PUBLIC(msg_host_t *) MSG_get_host_table(void); #define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h); XBT_PUBLIC(msg_error_t) MSG_get_errno(void); +XBT_PUBLIC(msg_error_t) MSG_clean(void); + XBT_PUBLIC(msg_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel); XBT_PUBLIC(msg_error_t) MSG_task_get_with_timeout(msg_task_t * task, m_channel_t channel, diff --git a/src/bindings/lua/simgrid_lua.c b/src/bindings/lua/simgrid_lua.c index 440c5629c1..6eb8d7ef21 100644 --- a/src/bindings/lua/simgrid_lua.c +++ b/src/bindings/lua/simgrid_lua.c @@ -185,9 +185,11 @@ static int get_clock(lua_State* L) { */ static int simgrid_gc(lua_State * L) { - if (sglua_is_maestro(L)) { - MSG_clean(); - } + // There is no need to cleanup the C world anymore, as it gets cleaned at system process closing automatically + // Maybe at some point we'll want to reintroduce this, for example when encapsulating the simulation properly + //if (sglua_is_maestro(L)) { + // MSG_clean(); + //} return 0; } diff --git a/src/msg/msg_global.c b/src/msg/msg_global.c index 5e10842147..e30aa38461 100644 --- a/src/msg/msg_global.c +++ b/src/msg/msg_global.c @@ -18,6 +18,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)"); MSG_Global_t msg_global = NULL; +static void MSG_exit(void); /********************************* MSG **************************************/ @@ -72,6 +73,8 @@ void MSG_init_nocheck(int *argc, char **argv) { XBT_DEBUG("ADD MSG LEVELS"); MSG_HOST_LEVEL = xbt_lib_add_level(host_lib, (void_f_pvoid_t) __MSG_host_destroy); + + atexit(MSG_exit); } #ifdef MSG_USE_DEPRECATED @@ -148,10 +151,13 @@ int MSG_process_killall(int reset_PIDs) } /** \ingroup msg_simulation - * \brief Clean the MSG simulation + * \brief Clean the MSG simulation. + * + * This function is called automatically when the system process stops, so I guess that calling it manually is useless nowadays. */ -msg_error_t MSG_clean(void) -{ +static void MSG_exit(void) { + if (msg_global==NULL) + return; XBT_DEBUG("Closing MSG"); #ifdef HAVE_TRACING @@ -170,8 +176,6 @@ msg_error_t MSG_clean(void) xbt_swag_free(msg_global->vms); free(msg_global); msg_global = NULL; - - return MSG_OK; } @@ -187,3 +191,9 @@ unsigned long int MSG_get_sent_msg() { return msg_global->sent_msg; } + +#ifdef MSG_USE_DEPRECATED +msg_error_t MSG_clean(void) { + return MSG_OK; +} +#endif diff --git a/teshsuite/msg/get_sender.c b/teshsuite/msg/get_sender.c index b9ffa48829..452fad617b 100644 --- a/teshsuite/msg/get_sender.c +++ b/teshsuite/msg/get_sender.c @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) MSG_create_environment(argv[1]); MSG_launch_application(argv[1]); res = MSG_main(); - MSG_clean(); + if (res == MSG_OK) return 0; else diff --git a/teshsuite/msg/trace/test_trace_integration.c b/teshsuite/msg/trace/test_trace_integration.c index 4ed7b370ec..135509bf5d 100644 --- a/teshsuite/msg/trace/test_trace_integration.c +++ b/teshsuite/msg/trace/test_trace_integration.c @@ -67,8 +67,6 @@ int main(int argc, char *argv[]) /* Run the example. */ res = MSG_main(); - MSG_clean(); - if (res == MSG_OK) return 0; else diff --git a/teshsuite/simdag/platforms/basic_tracing.c b/teshsuite/simdag/platforms/basic_tracing.c index cd2907c48b..73153efa47 100644 --- a/teshsuite/simdag/platforms/basic_tracing.c +++ b/teshsuite/simdag/platforms/basic_tracing.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock()); - MSG_clean(); + if (res == MSG_OK) return 0; else diff --git a/tools/graphicator/graphicator.c b/tools/graphicator/graphicator.c index ae54a73619..4f24150b3d 100644 --- a/tools/graphicator/graphicator.c +++ b/tools/graphicator/graphicator.c @@ -33,7 +33,6 @@ int main(int argc, char **argv) if (status == 0){ XBT_INFO ("%s expects --cfg=tracing:1 --cfg=tracing/platform:1", argv[0]); } - MSG_clean(); #else XBT_INFO ("works only if simgrid was compiled with tracing enabled."); #endif