Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
load disk model
[simgrid.git] / src / simgrid / sg_config.cpp
index 1bf0f9f..2acb020 100644 (file)
@@ -171,8 +171,20 @@ static void _sg_cfg_cb__optimization_mode(const std::string& value)
   find_model_description(surf_optimization_mode_description, value);
 }
 
+static void _sg_cfg_cb__disk_model(const std::string& value)
+{
+  xbt_assert(_sg_cfg_init_status < 2, "Cannot change the model after the initialization");
+
+  if (value == "help") {
+    model_help("disk", surf_disk_model_description);
+    exit(0);
+  }
+
+  find_model_description(surf_disk_model_description, value);
+}
+
 /* callback of the cpu/model variable */
-static void _sg_cfg_cb__storage_mode(const std::string& value)
+static void _sg_cfg_cb__storage_model(const std::string& value)
 {
   xbt_assert(_sg_cfg_init_status < 2, "Cannot change the model after the initialization");
 
@@ -243,7 +255,10 @@ void sg_config_init(int *argc, char **argv)
   declare_model_flag("cpu/model", "Cas01", &_sg_cfg_cb__cpu_model, surf_cpu_model_description, "model",
                      "The model to use for the CPU");
 
-  declare_model_flag("storage/model", "default", &_sg_cfg_cb__storage_mode, surf_storage_model_description, "model",
+  declare_model_flag("disk/model", "default", &_sg_cfg_cb__disk_model, surf_disk_model_description, "model",
+                     "The model to use for the disk");
+
+  declare_model_flag("storage/model", "default", &_sg_cfg_cb__storage_model, surf_storage_model_description, "model",
                      "The model to use for the storage");
 
   declare_model_flag("network/model", "LV08", &_sg_cfg_cb__network_model, surf_network_model_description, "model",