Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
requests the flatifier to display the amount of core if not equal to 1
[simgrid.git] / teshsuite / simdag / platforms / flatifier.c
index e2bd77c..e0762b0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2008-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -104,7 +104,12 @@ int main(int argc, char **argv)
   const SD_link_t *links;
   xbt_os_timer_t parse_time = xbt_os_timer_new();
 
+#ifdef _XBT_WIN32
+  setbuf(stderr, NULL);
+  setbuf(stdout, NULL);
+#else
   setvbuf(stdout, NULL, _IOLBF, 0);
+#endif
 
   SD_init(&argc, argv);
 
@@ -142,6 +147,9 @@ int main(int argc, char **argv)
           SD_workstation_get_name(hosts[i]),
           SD_workstation_get_power(hosts[i]));
       props = SD_workstation_get_properties(hosts[i]);
+      if (SD_workstation_get_cores(hosts[i])>1) {
+        printf(" cores=\"%d\"", SD_workstation_get_cores(hosts[i]));
+      }
       if (props && !xbt_dict_is_empty(props)) {
         printf(">\n");
         xbt_dict_foreach(props, cursor, key, data) {