Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make it possible to start this example without parameters
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 27 Aug 2016 13:01:35 +0000 (15:01 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 28 Aug 2016 13:18:47 +0000 (15:18 +0200)
examples/msg/cloud-simple/cloud-simple.c

index 3af0a8c..7129ee5 100644 (file)
@@ -270,8 +270,10 @@ int main(int argc, char *argv[])
   MSG_init(&argc, argv);
 
   /* load the platform file */
   MSG_init(&argc, argv);
 
   /* load the platform file */
-  xbt_assert(argc == 2);
-  MSG_create_environment(argv[1]);
+  const char* platform = "../../platforms/small_platform.xml";
+  if (argc == 2)
+     platform = argv[1];
+  MSG_create_environment(platform);
 
   msg_host_t pm0 = MSG_host_by_name("Fafard");
   launch_master(pm0);
 
   msg_host_t pm0 = MSG_host_by_name("Fafard");
   launch_master(pm0);