Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix another example after the recent change in msg_hosts_as_dynar
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 28 Oct 2016 16:53:47 +0000 (18:53 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 28 Oct 2016 16:53:47 +0000 (18:53 +0200)
examples/msg/io-file/io-file.c
examples/msg/io-file/io-file.tesh

index 0e91b06..3e9d272 100644 (file)
@@ -3,11 +3,6 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#define FILENAME1 "/home/doc/simgrid/examples/platforms/g5k.xml"
-#define FILENAME2 "c:\\Windows\\setupact.log"
-#define FILENAME3 "/home/doc/simgrid/examples/platforms/g5k_cabinets.xml"
-#define FILENAME4 "/home/doc/simgrid/examples/platforms/nancy.xml"
-
 #include "simgrid/msg.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(io_file, "Messages specific for this io example");
 #include "simgrid/msg.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(io_file, "Messages specific for this io example");
@@ -22,21 +17,21 @@ static int host(int argc, char *argv[])
 
   switch(MSG_process_self_PID()){
   case 1:
 
   switch(MSG_process_self_PID()){
   case 1:
-    file = MSG_file_open(FILENAME1, NULL);
-    MSG_file_dump(file);
-    st_name = "Disk4";
-    break;
-  case 2 :
-    file = MSG_file_open(FILENAME2, NULL);
+    file    = MSG_file_open("c:\\Windows\\setupact.log", NULL);
     st_name = "Disk2";
     break;
     st_name = "Disk2";
     break;
-  case 3 :
-    file = MSG_file_open(FILENAME3, NULL);
+  case 2:
+    file    = MSG_file_open("/home/doc/simgrid/examples/platforms/nancy.xml", NULL);
+    st_name = "Disk1";
+    break;
+  case 3:
+    file    = MSG_file_open("/home/doc/simgrid/examples/platforms/g5k_cabinets.xml", NULL);
     st_name = "Disk3";
     break;
   case 4:
     st_name = "Disk3";
     break;
   case 4:
-    file = MSG_file_open(FILENAME4, NULL);
-    st_name = "Disk1";
+    file = MSG_file_open("/home/doc/simgrid/examples/platforms/g5k.xml", NULL);
+    MSG_file_dump(file);
+    st_name = "Disk4";
     break;
   default:
     xbt_die("FILENAME NOT DEFINED %s",MSG_process_get_name(MSG_process_self()));
     break;
   default:
     xbt_die("FILENAME NOT DEFINED %s",MSG_process_get_name(MSG_process_self()));
index c0ee4dd..95f41b1 100644 (file)
@@ -2,10 +2,13 @@
 
 $ ${bindir:=.}/io-file ${srcdir:=.}/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Number of host '4'
 
 $ ${bindir:=.}/io-file ${srcdir:=.}/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Number of host '4'
-> [  0.000000] (2:host@alice)  Open file 'c:\Windows\setupact.log'
+> [  0.000000] (1:host@alice)  Open file 'c:\Windows\setupact.log'
+> [  0.000000] (2:host@bob)    Open file '/home/doc/simgrid/examples/platforms/nancy.xml'
 > [  0.000000] (3:host@carl)   Open file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
 > [  0.000000] (3:host@carl)   Open file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
-> [  0.000000] (4:host@bob)    Open file '/home/doc/simgrid/examples/platforms/nancy.xml'
-> [  0.000000] (1:host@denise) File Descriptor information:
+> [  0.000000] (1:host@alice)  Capacity of the storage element 'c:\Windows\setupact.log' is stored on: 2391537133 / 536870912000
+> [  0.000000] (2:host@bob)    Capacity of the storage element '/home/doc/simgrid/examples/platforms/nancy.xml' is stored on: 36933331 / 536870912000
+> [  0.000000] (3:host@carl)   Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' is stored on: 36933331 / 536870912000
+> [  0.000000] (4:host@denise) File Descriptor information:
 >              Full path: '/home/doc/simgrid/examples/platforms/g5k.xml'
 >              Size: 17028
 >              Mount point: '/home'
 >              Full path: '/home/doc/simgrid/examples/platforms/g5k.xml'
 >              Size: 17028
 >              Mount point: '/home'
@@ -13,44 +16,41 @@ $ ${bindir:=.}/io-file ${srcdir:=.}/storage/storage.xml "--log=root.fmt:[%10.6r]
 >              Storage Type: 'single_SSD'
 >              Content Type: 'txt_unix'
 >              File Descriptor Id: 0
 >              Storage Type: 'single_SSD'
 >              Content Type: 'txt_unix'
 >              File Descriptor Id: 0
-> [  0.000000] (1:host@denise)         Open file '/home/doc/simgrid/examples/platforms/g5k.xml'
-> [  0.000000] (2:host@alice)  Capacity of the storage element 'c:\Windows\setupact.log' is stored on: 2391537133 / 536870912000
-> [  0.000000] (3:host@carl)   Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' is stored on: 36933331 / 536870912000
-> [  0.000000] (4:host@bob)    Capacity of the storage element '/home/doc/simgrid/examples/platforms/nancy.xml' is stored on: 36933331 / 536870912000
-> [  0.000000] (1:host@denise)         Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k.xml' is stored on: 13221994 / 536870912000
-> [  0.000040] (4:host@bob)    Have read 4028 from '/home/doc/simgrid/examples/platforms/nancy.xml'
-> [  0.000085] (1:host@denise)         Have read 17028 from '/home/doc/simgrid/examples/platforms/g5k.xml'
+> [  0.000000] (4:host@denise)         Open file '/home/doc/simgrid/examples/platforms/g5k.xml'
+> [  0.000000] (4:host@denise)         Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k.xml' is stored on: 13221994 / 536870912000
+> [  0.000040] (2:host@bob)    Have read 4028 from '/home/doc/simgrid/examples/platforms/nancy.xml'
+> [  0.000085] (4:host@denise)         Have read 17028 from '/home/doc/simgrid/examples/platforms/g5k.xml'
 > [  0.000226] (3:host@carl)   Have read 22645 from '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
 > [  0.000226] (3:host@carl)   Have read 22645 from '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
-> [  0.000508] (2:host@alice)  Have read 101663 from 'c:\Windows\setupact.log'
-> [  0.001752] (1:host@denise)         Have written 100000 in '/home/doc/simgrid/examples/platforms/g5k.xml'. Size now is: 117028
-> [  0.001752] (1:host@denise)         Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k.xml' is stored on: 13321994 / 536870912000
-> [  0.001752] (1:host@denise)         Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k.xml'
-> [  0.002175] (2:host@alice)  Have written 100000 in 'c:\Windows\setupact.log'. Size now is: 201663
-> [  0.002175] (2:host@alice)  Capacity of the storage element 'c:\Windows\setupact.log' is stored on: 2391637133 / 536870912000
-> [  0.002175] (2:host@alice)  Coming back to the beginning of the stream for file 'c:\Windows\setupact.log'
-> [  0.002302] (1:host@denise)         Have read 110000 from '/home/doc/simgrid/examples/platforms/g5k.xml' (of size 117028)
-> [  0.002302] (1:host@denise)         Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k.xml'
-> [  0.002725] (2:host@alice)  Have read 110000 from 'c:\Windows\setupact.log' (of size 201663)
-> [  0.002725] (2:host@alice)  Coming back to the beginning of the stream for file 'c:\Windows\setupact.log'
-> [  0.003374] (4:host@bob)    Have written 100000 in '/home/doc/simgrid/examples/platforms/nancy.xml'. Size now is: 104028
-> [  0.003374] (4:host@bob)    Capacity of the storage element '/home/doc/simgrid/examples/platforms/nancy.xml' is stored on: 37033331 / 536870912000
-> [  0.003374] (4:host@bob)    Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/nancy.xml'
+> [  0.000508] (1:host@alice)  Have read 101663 from 'c:\Windows\setupact.log'
+> [  0.001752] (4:host@denise)         Have written 100000 in '/home/doc/simgrid/examples/platforms/g5k.xml'. Size now is: 117028
+> [  0.001752] (4:host@denise)         Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k.xml' is stored on: 13321994 / 536870912000
+> [  0.001752] (4:host@denise)         Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k.xml'
+> [  0.002175] (1:host@alice)  Have written 100000 in 'c:\Windows\setupact.log'. Size now is: 201663
+> [  0.002175] (1:host@alice)  Capacity of the storage element 'c:\Windows\setupact.log' is stored on: 2391637133 / 536870912000
+> [  0.002175] (1:host@alice)  Coming back to the beginning of the stream for file 'c:\Windows\setupact.log'
+> [  0.002302] (4:host@denise)         Have read 110000 from '/home/doc/simgrid/examples/platforms/g5k.xml' (of size 117028)
+> [  0.002302] (4:host@denise)         Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k.xml'
+> [  0.002725] (1:host@alice)  Have read 110000 from 'c:\Windows\setupact.log' (of size 201663)
+> [  0.002725] (1:host@alice)  Coming back to the beginning of the stream for file 'c:\Windows\setupact.log'
+> [  0.003374] (2:host@bob)    Have written 100000 in '/home/doc/simgrid/examples/platforms/nancy.xml'. Size now is: 104028
+> [  0.003374] (2:host@bob)    Capacity of the storage element '/home/doc/simgrid/examples/platforms/nancy.xml' is stored on: 37033331 / 536870912000
+> [  0.003374] (2:host@bob)    Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/nancy.xml'
 > [  0.003560] (3:host@carl)   Have written 100000 in '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'. Size now is: 122645
 > [  0.003560] (3:host@carl)   Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' is stored on: 37033331 / 536870912000
 > [  0.003560] (3:host@carl)   Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
 > [  0.003560] (3:host@carl)   Have written 100000 in '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'. Size now is: 122645
 > [  0.003560] (3:host@carl)   Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' is stored on: 37033331 / 536870912000
 > [  0.003560] (3:host@carl)   Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
-> [  0.004135] (1:host@denise)         Have written 110000 in '/home/doc/simgrid/examples/platforms/g5k.xml'. Size now is: 110000
-> [  0.004135] (1:host@denise)         Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k.xml' is stored on: 13314966 / 536870912000
-> [  0.004135] (1:host@denise)         Unlink file '/home/doc/simgrid/examples/platforms/g5k.xml'
-> [  0.004414] (4:host@bob)    Have read 104028 from '/home/doc/simgrid/examples/platforms/nancy.xml' (of size 104028)
-> [  0.004414] (4:host@bob)    Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/nancy.xml'
-> [  0.004558] (2:host@alice)  Have written 110000 in 'c:\Windows\setupact.log'. Size now is: 110000
-> [  0.004558] (2:host@alice)  Capacity of the storage element 'c:\Windows\setupact.log' is stored on: 2391545470 / 536870912000
-> [  0.004558] (2:host@alice)  Close file 'c:\Windows\setupact.log'
+> [  0.004135] (4:host@denise)         Have written 110000 in '/home/doc/simgrid/examples/platforms/g5k.xml'. Size now is: 110000
+> [  0.004135] (4:host@denise)         Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k.xml' is stored on: 13314966 / 536870912000
+> [  0.004135] (4:host@denise)         Close file '/home/doc/simgrid/examples/platforms/g5k.xml'
+> [  0.004414] (2:host@bob)    Have read 104028 from '/home/doc/simgrid/examples/platforms/nancy.xml' (of size 104028)
+> [  0.004414] (2:host@bob)    Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/nancy.xml'
+> [  0.004558] (1:host@alice)  Have written 110000 in 'c:\Windows\setupact.log'. Size now is: 110000
+> [  0.004558] (1:host@alice)  Capacity of the storage element 'c:\Windows\setupact.log' is stored on: 2391545470 / 536870912000
+> [  0.004558] (1:host@alice)  Unlink file 'c:\Windows\setupact.log'
 > [  0.004660] (3:host@carl)   Have read 110000 from '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' (of size 122645)
 > [  0.004660] (3:host@carl)   Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
 > [  0.004660] (3:host@carl)   Have read 110000 from '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' (of size 122645)
 > [  0.004660] (3:host@carl)   Coming back to the beginning of the stream for file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
-> [  0.008081] (4:host@bob)    Have written 110000 in '/home/doc/simgrid/examples/platforms/nancy.xml'. Size now is: 110000
-> [  0.008081] (4:host@bob)    Capacity of the storage element '/home/doc/simgrid/examples/platforms/nancy.xml' is stored on: 37039303 / 536870912000
-> [  0.008081] (4:host@bob)    Close file '/home/doc/simgrid/examples/platforms/nancy.xml'
+> [  0.008081] (2:host@bob)    Have written 110000 in '/home/doc/simgrid/examples/platforms/nancy.xml'. Size now is: 110000
+> [  0.008081] (2:host@bob)    Capacity of the storage element '/home/doc/simgrid/examples/platforms/nancy.xml' is stored on: 37039303 / 536870912000
+> [  0.008081] (2:host@bob)    Close file '/home/doc/simgrid/examples/platforms/nancy.xml'
 > [  0.008326] (3:host@carl)   Have written 110000 in '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'. Size now is: 110000
 > [  0.008326] (3:host@carl)   Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' is stored on: 37020686 / 536870912000
 > [  0.008326] (3:host@carl)   Close file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'
 > [  0.008326] (3:host@carl)   Have written 110000 in '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'. Size now is: 110000
 > [  0.008326] (3:host@carl)   Capacity of the storage element '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml' is stored on: 37020686 / 536870912000
 > [  0.008326] (3:host@carl)   Close file '/home/doc/simgrid/examples/platforms/g5k_cabinets.xml'