Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Split another xml file (memory leaks in the parser).
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 11 Mar 2014 09:24:54 +0000 (10:24 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 11 Mar 2014 09:30:04 +0000 (10:30 +0100)
teshsuite/msg/CMakeLists.txt
teshsuite/msg/process.c
teshsuite/msg/process.tesh
teshsuite/msg/process_d.xml [moved from teshsuite/msg/process.xml with 75% similarity]
teshsuite/msg/process_p.xml [new file with mode: 0644]

index 983748b..670d9dc 100644 (file)
@@ -23,32 +23,33 @@ endif()
 set(tesh_files
   ${tesh_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/get_sender.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/pid.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.tesh
+  ${CMAKE_CURRENT_SOURCE_DIR}/pid.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/process.tesh
+  ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.tesh
   PARENT_SCOPE
   )
 set(xml_files
   ${xml_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/get_sender_d.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/get_sender_p.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/pid_d.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/pid_p.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_p.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/pid_d.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/pid_p.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/process_d.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/process_p.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel_d.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel_p.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/process.xml
   PARENT_SCOPE
   )
 set(teshsuite_src
   ${teshsuite_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/get_sender.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/pid.c
   ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/pid.c
   ${CMAKE_CURRENT_SOURCE_DIR}/process.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.c
   PARENT_SCOPE
   )
 set(bin_files
index 7691a52..e999b4b 100644 (file)
@@ -78,13 +78,13 @@ int main(int argc, char *argv[])
   const char *application_file;
 
   MSG_init(&argc, argv);
-  if (argc < 2) {
+  if (argc != 3) {
     printf("Usage: %s platform_file deployment_file\n", argv[0]);
     printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
     exit(1);
   }
   platform_file = argv[1];
-  application_file = argv[1];
+  application_file = argv[2];
 
   /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
index e4a0fdb..728b65c 100644 (file)
@@ -1,5 +1,5 @@
 
-$ msg/process ${srcdir:=.}/msg/process.xml
+$ msg/process ${srcdir:=.}/msg/process_p.xml ${srcdir:=.}/msg/process_d.xml
 > [Tremblay:slave:(2) 0.500000] [msg_test/INFO] Slave started (PID:2, PPID:0)
 > [Tremblay:slave:(2) 0.500000] [msg_test/INFO] Plop i am not suspended
 > [Tremblay:master:(1) 1.000000] [msg_test/INFO] Process(pid=1, ppid=0, name=master)
similarity index 75%
rename from teshsuite/msg/process.xml
rename to teshsuite/msg/process_d.xml
index f0c3dae..ee058c5 100644 (file)
@@ -1,16 +1,11 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 <platform version="3">
-  <!-- The hosts -->
-  <AS  id="AS0"  routing="Full">
-   <host id="Tremblay" power="98.095Mf"/>
-  </AS>
-
   <!-- The master process (with some arguments) -->
   <process host="Tremblay" function="master">
   </process>
-  
+
   <!-- The slave processes (with mailbox to listen on as argument) -->
   <process host="Tremblay" function="slave">
   </process>
- </platform>
\ No newline at end of file
+</platform>
\ No newline at end of file
diff --git a/teshsuite/msg/process_p.xml b/teshsuite/msg/process_p.xml
new file mode 100644 (file)
index 0000000..90e976a
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+  <!-- The hosts -->
+  <AS  id="AS0"  routing="Full">
+   <host id="Tremblay" power="98.095Mf"/>
+  </AS>
+</platform>
\ No newline at end of file