From 2746a7207d4568667122f7670f73ee1acee024a4 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 22 Mar 2012 11:25:16 +0100 Subject: [PATCH] Fix gras initialization messages. Write them *after* initialization of the XBT layer. Also use XBT_WARN for the warning about experimental status of GRAS, and add the possibility to disable it by setting the environment variable GRAS_NO_WARN_EXPERIMENTAL. --- src/gras/gras.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gras/gras.c b/src/gras/gras.c index 2b8f882f12..f94430d947 100644 --- a/src/gras/gras.c +++ b/src/gras/gras.c @@ -70,13 +70,13 @@ void gras_init(int *argc, char **argv) int first = 0; gras_procdata_t *pd; gras_msg_procdata_t msg_pd; - XBT_INFO("GRAS is not well maintained anymore. We consider it to be experimental (and not stable anymore) since SimGrid 3.6. Sorry about it, please consider contributing to improve this situation"); - XBT_VERB("Initialize GRAS"); xbt_getpid = gras_os_getpid; /* First initialize the XBT */ xbt_init(argc, argv); + XBT_VERB("Initialize GRAS"); + /* module registrations: * - declare process specific data we need (without creating them) */ @@ -96,6 +96,9 @@ void gras_init(int *argc, char **argv) XBT_LOG_CONNECT(gras_virtu_emul, gras_virtu); XBT_LOG_CONNECT(gras_virtu_process, gras_virtu); + if (!getenv("GRAS_NO_WARN_EXPERIMENTAL")) + XBT_WARN("GRAS is not well maintained anymore. We consider it to be experimental (and not stable anymore) since SimGrid 3.6. Sorry about it, please consider contributing to improve this situation"); + gras_trp_register(); gras_msg_register(); -- 2.20.1