From: alegrand Date: Tue, 21 Dec 2004 21:43:22 +0000 (+0000) Subject: debug debug debug X-Git-Tag: v3.3~4659 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/110275bdfe31a33027e51860ed41f199da963cef debug debug debug git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@691 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 8459660b7d..4a7ebcf6f6 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -10,6 +10,7 @@ #include "xbt/swag.h" #include "xbt/dynar.h" +#include "xbt/dict.h" /* Actions and resources are higly connected structures... */ typedef struct surf_action *surf_action_t; @@ -147,6 +148,7 @@ typedef struct surf_workstation_resource { extern surf_workstation_resource_t surf_workstation_resource; void surf_workstation_resource_init(const char *filename); +extern xbt_dict_t workstation_set; /*******************************************/ /*** SURF Globals **************************/ diff --git a/src/msg/deployment.c b/src/msg/deployment.c index 2e792b98e4..3cf1577e1d 100644 --- a/src/msg/deployment.c +++ b/src/msg/deployment.c @@ -65,7 +65,7 @@ void MSG_launch_application(const char *file) xbt_assert1(code, "Unknown function %s",argv[0]); host = MSG_get_host_by_name(host_name); - xbt_assert1(host_name, "Unknown host %s",host_name); + xbt_assert1(host, "Unknown host %s",host_name); process = MSG_process_create(argv[0], code, NULL, host); MSG_set_arguments(process, argc, argv); @@ -77,7 +77,7 @@ void MSG_launch_application(const char *file) } } - close_section("CPU"); + close_section("DEPLOYMENT"); } /** \ingroup msg_easier_life diff --git a/src/msg/environment.c b/src/msg/environment.c index e0644ec869..981db9713a 100644 --- a/src/msg/environment.c +++ b/src/msg/environment.c @@ -60,8 +60,16 @@ src_name dst_name (link_name link_name link_name ... ) * it looks like. */ void MSG_create_environment(const char *file) { + xbt_dict_cursor_t cursor = NULL; + char *name = NULL; + void *workstation = NULL; + surf_workstation_resource_init(file); + xbt_dict_foreach(workstation_set, cursor, name, workstation) { + __MSG_host_create(name, workstation, NULL); + } + return; } diff --git a/src/msg/global.c b/src/msg/global.c index 41ff1b2b44..fee4cb9039 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -24,9 +24,12 @@ MSG_Global_t msg_global = NULL; void MSG_global_init(void) { if (!msg_global) { + int argc=0; + char **argv=NULL; + msg_global = xbt_new0(s_MSG_Global_t,1); - surf_init(NULL, NULL); /* Initialize some common structures */ + surf_init(&argc, argv); /* Initialize some common structures */ msg_global->host = xbt_fifo_new(); msg_global->process_to_run = xbt_fifo_new(); msg_global->process_list = xbt_fifo_new(); @@ -41,7 +44,7 @@ void MSG_global_init(void) */ void MSG_set_verbosity(MSG_outputmode_t mode) { - CRITICAL0("Not implemented yet."); + CRITICAL0("MSG_set_verbosity : Not implemented yet."); } /** \ingroup m_channel_management @@ -80,7 +83,7 @@ MSG_error_t MSG_set_channel_number(int number) */ MSG_error_t MSG_set_sharing_policy(MSG_sharing_t mode, long double param) { - xbt_assert0(0,"This function is now deprecated and useless. Store and forward does not exist anymore. Please stop using it."); + CRITICAL0("MSG_set_sharing_policy: this function is now deprecated and useless. Store and forward does not exist anymore. Please stop using it."); return MSG_OK; } diff --git a/src/surf/workstation.c b/src/surf/workstation.c index f201e08072..50a294fe8f 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -15,7 +15,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(workstation, surf, surf_workstation_resource_t surf_workstation_resource = NULL; -static xbt_dict_t workstation_set = NULL; +xbt_dict_t workstation_set = NULL; static workstation_t workstation_new(const char *name, void *cpu, void *card)