From: suter Date: Tue, 25 Jun 2013 10:44:40 +0000 (+0200) Subject: These "properties" are actually bandwidths: allow users to declare units X-Git-Tag: v3_9_90~231 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2ce25930bd88498435aac99343b2333169d2e4bb?hp=fcab8998bd31ed922e4c88406c5fe85eb6c87aef These "properties" are actually bandwidths: allow users to declare units in the XML file --- diff --git a/src/surf/storage.c b/src/surf/storage.c index 227c71776d..4684a82189 100644 --- a/src/surf/storage.c +++ b/src/surf/storage.c @@ -208,9 +208,13 @@ static void* storage_create_resource(const char* id, const char* model,const cha storage->write_actions = xbt_dynar_new(sizeof(char *),NULL); storage_type_t storage_type = xbt_lib_get_or_null(storage_type_lib, type_id,ROUTING_STORAGE_TYPE_LEVEL); - double Bread = atof(xbt_dict_get(storage_type->properties,"Bread")); - double Bwrite = atof(xbt_dict_get(storage_type->properties,"Bwrite")); - double Bconnection = atof(xbt_dict_get(storage_type->properties,"Bconnection")); + double Bread = + surf_parse_get_bandwidth(xbt_dict_get(storage_type->properties,"Bread")); + double Bwrite = + surf_parse_get_bandwidth(xbt_dict_get(storage_type->properties,"Bwrite")); + double Bconnection = + surf_parse_get_bandwidth(xbt_dict_get(storage_type->properties, + "Bconnection")); XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%lu'",Bconnection,Bread,Bwrite,(unsigned long)storage_type->size); storage->constraint = lmm_constraint_new(storage_maxmin_system, storage, Bconnection); storage->constraint_read = lmm_constraint_new(storage_maxmin_system, storage, Bread);