- INFO0("Initialize GRAS");
- xbt_assert0(gras_if_RL(),"Work in progress. Forget about GRAS simulation for now.");
- xbt_init_defaultlog(argc,argv,defaultlog);
- gras_process_init(); /* calls procdata_init, which calls dynar_new */
- /** init other submodules */
+ gras_procdata_t *pd;
+ gras_msg_procdata_t msg_pd;
+ VERB0("Initialize GRAS");
+
+ xbt_getpid = gras_os_getpid;
+ /* First initialize the XBT */
+ xbt_init(argc,argv);
+
+ /* module registrations:
+ * - declare process specific data we need (without creating them)
+ */
+ if (gras_running_process == 0) {
+ /* Connect our log channels: that must be done manually under windows */
+ XBT_LOG_CONNECT(gras_ddt, gras);
+ XBT_LOG_CONNECT(gras_ddt_cbps, gras_ddt);
+ XBT_LOG_CONNECT(gras_ddt_convert, gras_ddt);
+ XBT_LOG_CONNECT(gras_ddt_create, gras_ddt);
+ XBT_LOG_CONNECT(gras_ddt_exchange, gras_ddt);
+ XBT_LOG_CONNECT(gras_ddt_lexer, gras_ddt_parse);
+ XBT_LOG_CONNECT(gras_ddt_parse, gras_ddt);
+
+ XBT_LOG_CONNECT(gras_modules, gras);
+
+ XBT_LOG_CONNECT(gras_msg, gras);
+ XBT_LOG_CONNECT(gras_msg_read, gras_msg);
+ XBT_LOG_CONNECT(gras_msg_rpc, gras_msg);
+
+ XBT_LOG_CONNECT(gras_timer, gras);
+
+ XBT_LOG_CONNECT(gras_trp, gras);
+ XBT_LOG_CONNECT(gras_trp_file, gras_trp);
+ XBT_LOG_CONNECT(gras_trp_meas, gras_trp);
+ XBT_LOG_CONNECT(gras_trp_sg, gras_trp);
+ XBT_LOG_CONNECT(gras_trp_tcp, gras_trp);
+
+ XBT_LOG_CONNECT(gras_virtu, gras);
+ XBT_LOG_CONNECT(gras_virtu_emul, gras_virtu);
+ XBT_LOG_CONNECT(gras_virtu_process, gras_virtu);
+
+ gras_trp_register();
+ gras_msg_register();
+ }
+
+ /*
+ * Initialize the process specific stuff
+ */
+ gras_process_init(); /* calls procdata_init, which creates process specific data for each module */
+
+ /*
+ * Initialize the global stuff if it's not the first process created
+ */