git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3151
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
* \see surf_workstation_resource_init_CLM03()
*/
void surf_workstation_resource_init_KCCFLN05(const char *filename);
* \see surf_workstation_resource_init_CLM03()
*/
void surf_workstation_resource_init_KCCFLN05(const char *filename);
+void surf_workstation_resource_init_KCCFLN05_proportionnal(const char *filename);
/** \brief The network links
* \ingroup SURF_resources
/** \brief The network links
* \ingroup SURF_resources
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
"Logging specific to SURF (kernel)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
"Logging specific to SURF (kernel)");
/* Additional declarations for Windows potability. */
/* Additional declarations for Windows potability. */
double value = -1;
#define VARIABLE(action) (*((lmm_variable_t*)(((char *) (action)) + (offset))))
double value = -1;
#define VARIABLE(action) (*((lmm_variable_t*)(((char *) (action)) + (offset))))
+ if(!use_sdp_solver)
+ lmm_solve(sys);
+ else {
+#ifdef HAVE_SDP
+ sdp_solve(sys);
+#else
+ xbt_assert0(0, "No CSDP found! You cannot use this model!");
+#endif
+ }
xbt_swag_foreach(action, running_actions) {
value = lmm_variable_getvalue(VARIABLE(action));
xbt_swag_foreach(action, running_actions) {
value = lmm_variable_getvalue(VARIABLE(action));
/* #define pub2priv(r) ((surf_resource_private_t) ((char *)(r) -(sizeof(struct surf_resource_private_part)))) */
/* #define priv2pub(r) ((void *) ((char *)(r) +(sizeof(struct surf_resource_private_part)))) */
/* #define pub2priv(r) ((surf_resource_private_t) ((char *)(r) -(sizeof(struct surf_resource_private_part)))) */
/* #define priv2pub(r) ((void *) ((char *)(r) +(sizeof(struct surf_resource_private_part)))) */
+extern int use_sdp_solver;
+
double generic_maxmin_share_resources(xbt_swag_t running_actions,
size_t offset);
double generic_maxmin_share_resources2(xbt_swag_t running_actions,
double generic_maxmin_share_resources(xbt_swag_t running_actions,
size_t offset);
double generic_maxmin_share_resources2(xbt_swag_t running_actions,
xbt_dynar_push(resource_list, &surf_workstation_resource);
}
xbt_dynar_push(resource_list, &surf_workstation_resource);
}
+
+void surf_workstation_resource_init_KCCFLN05_proportionnal(const char *filename)
+{
+ xbt_assert0(!surf_cpu_resource, "CPU resource type already defined");
+ xbt_assert0(!surf_network_resource, "network resource type already defined");
+ resource_init_internal();
+ parse_file(filename);
+
+ surf_workstation_resource->common_public->name = "Workstation KCCFLN05 (proportionnal)";
+ use_sdp_solver=1;
+ xbt_dynar_push(resource_list, &surf_workstation_resource);
+}