/* * @brief Initialize MRSG msg_error. * @param platform_file The path/name of the platform file. * @param deploy_file The path/name of the deploy file. * @param bighybrid_config_file The path/name of the configuration file. */ static msg_error_t run_hybrid_simulation (const char* platform_file, const char* deploy_file, const char* bighybrid_config_file, const char* vc_file_name) { msg_error_t res_bighybrid = MSG_OK; read_bighybrid_config_file (bighybrid_config_file); init_mra_vc (vc_file_name); MSG_create_environment (platform_file); // for tracing purposes.. TRACE_category_with_color ("MRA_MAP", "1 0 0"); TRACE_category_with_color ("MRA_REDUCE", "0 0 1"); TRACE_category_with_color ("MRSG_MAP", "1 0 0"); TRACE_category_with_color ("MRSG_REDUCE", "0 0 1"); TRACE_category ("finalize"); MSG_function_register ("master_mra", master_mra); MSG_function_register ("master_mrsg", master_mrsg); MSG_function_register ("worker_mra", worker_mra); MSG_function_register ("worker_mrsg", worker_mrsg); MSG_launch_application (deploy_file); init_mr_mrsg_config (bighybrid_config_file); init_mr_mra_config (bighybrid_config_file); res_bighybrid = MSG_main (); free_mra_global_mem (); free_mrsg_global_mem (); return res_bighybrid; }
/** * @param platform_file The path/name of the platform file. * @param deploy_file The path/name of the deploy file. * @param mr_config_file The path/name of the configuration file. */ static msg_error_t run_mrsg_simulation (const char* platform_file, const char* deploy_file, const char* mr_config_file) { msg_error_t res_mrsg = MSG_OK; read_mrsg_config_file (mr_config_file); MSG_create_environment (platform_file); // for tracing purposes.. TRACE_category_with_color ("MRSG_MAP", "1 0 0"); TRACE_category_with_color ("MRSG_REDUCE", "0 0 1"); MSG_function_register ("master_mrsg", master_mrsg); MSG_function_register ("worker_mrsg", worker_mrsg); MSG_launch_application (deploy_file); init_mr_mrsg_config (mr_config_file); res_mrsg = MSG_main (); free_mrsg_global_mem (); return res_mrsg; }