git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@691
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#include "xbt/swag.h"
#include "xbt/dynar.h"
#include "xbt/swag.h"
#include "xbt/dynar.h"
/* Actions and resources are higly connected structures... */
typedef struct surf_action *surf_action_t;
/* Actions and resources are higly connected structures... */
typedef struct surf_action *surf_action_t;
extern surf_workstation_resource_t surf_workstation_resource;
void surf_workstation_resource_init(const char *filename);
extern surf_workstation_resource_t surf_workstation_resource;
void surf_workstation_resource_init(const char *filename);
+extern xbt_dict_t workstation_set;
/*******************************************/
/*** SURF Globals **************************/
/*******************************************/
/*** SURF Globals **************************/
xbt_assert1(code, "Unknown function %s",argv[0]);
host = MSG_get_host_by_name(host_name);
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);
process = MSG_process_create(argv[0], code, NULL, host);
MSG_set_arguments(process, argc, argv);
+ close_section("DEPLOYMENT");
}
/** \ingroup msg_easier_life
}
/** \ingroup msg_easier_life
* it looks like.
*/
void MSG_create_environment(const char *file) {
* 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);
surf_workstation_resource_init(file);
+ xbt_dict_foreach(workstation_set, cursor, name, workstation) {
+ __MSG_host_create(name, workstation, NULL);
+ }
+
void MSG_global_init(void)
{
if (!msg_global) {
void MSG_global_init(void)
{
if (!msg_global) {
+ int argc=0;
+ char **argv=NULL;
+
msg_global = xbt_new0(s_MSG_Global_t,1);
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();
msg_global->host = xbt_fifo_new();
msg_global->process_to_run = xbt_fifo_new();
msg_global->process_list = xbt_fifo_new();
*/
void MSG_set_verbosity(MSG_outputmode_t mode)
{
*/
void MSG_set_verbosity(MSG_outputmode_t mode)
{
- CRITICAL0("Not implemented yet.");
+ CRITICAL0("MSG_set_verbosity : Not implemented yet.");
}
/** \ingroup m_channel_management
}
/** \ingroup m_channel_management
*/
MSG_error_t MSG_set_sharing_policy(MSG_sharing_t mode, long double param)
{
*/
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.");
surf_workstation_resource_t surf_workstation_resource = NULL;
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)
static workstation_t workstation_new(const char *name,
void *cpu, void *card)