surf_cpu_resource_extension_public_t extension_public;
} s_surf_cpu_resource_t, *surf_cpu_resource_t;
extern surf_cpu_resource_t surf_cpu_resource;
-void surf_cpu_resource_init(const char *filename);
+void surf_cpu_resource_init_Cas01(const char *filename);
/* Network resource */
typedef struct surf_network_resource_extension_private
} s_surf_network_resource_t, *surf_network_resource_t;
extern surf_network_resource_t surf_network_resource;
-void surf_network_resource_init(const char *filename);
+void surf_network_resource_init_CM02(const char *filename);
/* Workstation resource */
typedef struct surf_workstation_resource_extension_private
} s_surf_workstation_resource_t, *surf_workstation_resource_t;
extern surf_workstation_resource_t surf_workstation_resource;
-void surf_workstation_resource_init(const char *filename);
+void surf_workstation_resource_init_CLM03(const char *filename);
+void surf_workstation_resource_init_resource_init_KCCFLN05(const char *filename);
extern xbt_dict_t workstation_set;
/*******************************************/
ETag_argument_fun = parse_argument;
ETag_process_fun = parse_process_finalize;
surf_parse_open(file);
- xbt_assert1((!surf_parse_lex()),"Parse error in %s",file);
+ xbt_assert1((!surf_parse()),"Parse error in %s",file);
surf_parse_close();
}
char *name = NULL;
void *workstation = NULL;
- surf_workstation_resource_init(file);
+ surf_workstation_resource_init_CLM03(file);
xbt_dict_foreach(workstation_set, cursor, name, workstation) {
__MSG_host_create(name, workstation, NULL);
surf_parse_reset_parser();
ETag_cpu_fun=parse_cpu;
surf_parse_open(file);
- xbt_assert1((!surf_parse_lex()),"Parse error in %s",file);
+ xbt_assert1((!surf_parse()),"Parse error in %s",file);
surf_parse_close();
}
xbt_assert0(maxmin_system, "surf_init has to be called first!");
}
-void surf_cpu_resource_init(const char *filename)
+/*********************************************************************/
+/* Basic sharing model for CPU: that is all this started... ;) */
+/*********************************************************************/
+/* @InProceedings{casanova01simgrid, */
+/* author = "H. Casanova", */
+/* booktitle = "Proceedings of the IEEE Symposium on Cluster Computing */
+/* and the Grid (CCGrid'01)", */
+/* publisher = "IEEE Computer Society", */
+/* title = "Simgrid: {A} Toolkit for the Simulation of Application */
+/* Scheduling", */
+/* year = "2001", */
+/* month = may, */
+/* note = "Available at */
+/* \url{http://grail.sdsc.edu/papers/simgrid_ccgrid01.ps.gz}." */
+/* } */
+void surf_cpu_resource_init_Cas01(const char *filename)
{
if (surf_cpu_resource)
return;
surf_parse_reset_parser();
ETag_network_link_fun=parse_network_link;
surf_parse_open(file);
- xbt_assert1((!surf_parse_lex()),"Parse error in %s",file);
+ xbt_assert1((!surf_parse()),"Parse error in %s",file);
surf_parse_close();
/* Figuring out the network cards used */
surf_parse_reset_parser();
STag_route_fun=parse_route_set_endpoints;
surf_parse_open(file);
- xbt_assert1((!surf_parse_lex()),"Parse error in %s",file);
+ xbt_assert1((!surf_parse()),"Parse error in %s",file);
surf_parse_close();
create_routing_table();
ETag_route_element_fun=parse_route_elem;
ETag_route_fun=parse_route_set_route;
surf_parse_open(file);
- xbt_assert1((!surf_parse_lex()),"Parse error in %s",file);
+ xbt_assert1((!surf_parse()),"Parse error in %s",file);
surf_parse_close();
}
if (action->generic_action.max_duration != NO_MAX_DURATION)
action->generic_action.max_duration -= delta;
-/* if(action->generic_action.remains<.00001) action->generic_action.remains=0; */
+ /* if(action->generic_action.remains<.00001) action->generic_action.remains=0; */
if (action->generic_action.remains <= 0) {
action->generic_action.finish = surf_get_clock();
double value)
{
network_link_t nw_link = id;
-
-/* printf("[" "%lg" "] Asking to update network card \"%s\" with value " */
-/* "%lg" " for event %p\n", surf_get_clock(), nw_link->name, */
-/* value, event_type); */
+ /* printf("[" "%lg" "] Asking to update network card \"%s\" with value " */
+ /* "%lg" " for event %p\n", surf_get_clock(), nw_link->name, */
+ /* value, event_type); */
if (event_type == nw_link->bw_event) {
nw_link->bw_current = value;
xbt_new0(s_surf_resource_private_t, 1);
surf_network_resource->common_public =
xbt_new0(s_surf_resource_public_t, 1);
-/* surf_network_resource->extension_private = xbt_new0(s_surf_network_resource_extension_private_t,1); */
surf_network_resource->extension_public =
xbt_new0(s_surf_network_resource_extension_public_t, 1);
xbt_assert0(maxmin_system, "surf_init has to be called first!");
}
-void surf_network_resource_init(const char *filename)
+/***************************************************************************/
+/* The nice TCP sharing model designed by Loris Marchal and Henri Casanova */
+/***************************************************************************/
+/* @TechReport{ rr-lip2002-40, */
+/* author = {Henri Casanova and Loris Marchal}, */
+/* institution = {LIP}, */
+/* title = {A Network Model for Simulation of Grid Application}, */
+/* number = {2002-40}, */
+/* month = {oct}, */
+/* year = {2002} */
+/* } */
+void surf_network_resource_init_CM02(const char *filename)
{
if (surf_network_resource)
return;
xbt_assert0(maxmin_system, "surf_init has to be called first!");
}
-void surf_workstation_resource_init(const char *filename)
+/********************************************************************/
+/* The model used in MSG and presented at CCGrid03 */
+/********************************************************************/
+/* @InProceedings{Casanova.CLM_03, */
+/* author = {Henri Casanova and Arnaud Legrand and Loris Marchal}, */
+/* title = {Scheduling Distributed Applications: the SimGrid Simulation Framework}, */
+/* booktitle = {Proceedings of the third IEEE International Symposium on Cluster Computing and the Grid (CCGrid'03)}, */
+/* publisher = {"IEEE Computer Society Press"}, */
+/* month = {may}, */
+/* year = {2003} */
+/* } */
+void surf_workstation_resource_init_CLM03(const char *filename)
{
/* int i ; */
/* surf_resource_t resource = NULL; */
surf_workstation_resource_init_internal();
- surf_cpu_resource_init(filename);
- surf_network_resource_init(filename);
+ surf_cpu_resource_init_Cas01(filename);
+ surf_network_resource_init_CM02(filename);
create_workstations();
xbt_dynar_push(resource_list, &surf_workstation_resource);
/* xbt_dynar_foreach(resource_list, i, resource) { */
e_surf_action_state_t stateActionC;
double now = -1.0;
- surf_cpu_resource_init(platform); /* Now it is possible to use CPUs */
- surf_network_resource_init(platform); /* Now it is possible to use eth0 */
+ surf_cpu_resource_init_Cas01(platform); /* Now it is possible to use CPUs */
+ surf_network_resource_init_CM02(platform); /* Now it is possible to use eth0 */
/*********************** CPU ***********************************/
printf("%p \n", surf_cpu_resource);
e_surf_action_state_t stateActionC;
double now = -1.0;
- surf_workstation_resource_init(platform);
+ surf_workstation_resource_init_CLM03(platform);
/*********************** WORKSTATION ***********************************/
workstationA =