- if (!strcmp(optim, "TI")) {
- surf_cpu_model_init_ti();
- return;
- }
+ if (strcmp(optim, "TI") == 0) {
+ /* FIXME: do we have to supprot TI? for VM */
+ surf_cpu_model_pm = surf_cpu_model_init_ti();
+ XBT_INFO("TI model is used (it will crashed since this is the hypervisor branch)");
+ } else {
+ surf_cpu_model_pm = surf_cpu_model_init_cas01();
+ surf_cpu_model_vm = surf_cpu_model_init_cas01();
+
+ /* cpu_model is registered only to model_list, and not to
+ * model_list_invoke. The shared_resource callback function will be called
+ * from that of the workstation model. */
+ xbt_dynar_push(model_list, &surf_cpu_model_pm);
+ xbt_dynar_push(model_list, &surf_cpu_model_vm);