Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a (simple) test for storage actions
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 14 Mar 2016 14:49:23 +0000 (15:49 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 14 Mar 2016 14:50:44 +0000 (15:50 +0100)
.gitignore
examples/msg/actions/CMakeLists.txt
examples/msg/actions/mpi_actions.c [moved from examples/msg/actions/actions.c with 100% similarity]
examples/msg/actions/mpi_actions.tesh [moved from examples/msg/actions/actions.tesh with 85% similarity]
examples/msg/actions/mpi_actions.txt [moved from examples/msg/actions/mpi_actions_shared.txt with 100% similarity]
examples/msg/actions/mpi_deployment.xml [moved from examples/msg/actions/deployment.xml with 100% similarity]
examples/msg/actions/mpi_deployment_split.xml [moved from examples/msg/actions/deployment_split.xml with 85% similarity]
examples/msg/actions/storage_actions.tesh [new file with mode: 0644]

index 450c460..2efbc5f 100644 (file)
@@ -117,7 +117,7 @@ tags
 callgrind.out.*
 ### Examples and traces
 *.exe
 callgrind.out.*
 ### Examples and traces
 *.exe
-examples/msg/actions/actions
+examples/msg/actions/mpi_actions
 examples/msg/actions/storage_actions
 examples/msg/bittorrent/bittorrent
 examples/msg/bittorrent/bittorrent_platfgen
 examples/msg/actions/storage_actions
 examples/msg/bittorrent/bittorrent
 examples/msg/bittorrent/bittorrent_platfgen
index 22e8d64..c92a963 100644 (file)
@@ -1,17 +1,17 @@
-add_executable       (actions         actions.c)
-target_link_libraries(actions         simgrid)
-add_executable       (storage_actions storage_actions.c)
-target_link_libraries(storage_actions simgrid)
+foreach (example mpi storage)
+  add_executable       (${example}_actions  ${example}_actions.c)
+  target_link_libraries(${example}_actions  simgrid)
 
 
-ADD_TESH_FACTORIES(msg-actions  "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
+  set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example}_actions.tesh)
+  set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}_actions.c)
+  set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${example}_actions.txt)
+  set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${example}_deployment.xml)
 
 
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions.tesh                PARENT_SCOPE)
-set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/deployment_split.xml
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/storage_deployment.xml      PARENT_SCOPE)
-set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/actions.c
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/storage_actions.c           PARENT_SCOPE)
-set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/mpi_actions_shared.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/mpi_actions_split_p0.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/mpi_actions_split_p1.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/storage_actions.txt         PARENT_SCOPE)
+  ADD_TESH_FACTORIES(msg-${example}-actions  "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions ${example}_actions.tesh)
+endforeach()
+
+set(examples_src  ${examples_src}                                                          PARENT_SCOPE)
+set(tesh_files    ${tesh_files}                                                            PARENT_SCOPE)
+set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/mpi_deployment_split.xml    PARENT_SCOPE)
+set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/mpi_actions_split_p0.txt
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/mpi_actions_split_p1.txt    PARENT_SCOPE)
similarity index 85%
rename from examples/msg/actions/actions.tesh
rename to examples/msg/actions/mpi_actions.tesh
index bce14de..001fee7 100644 (file)
@@ -1,7 +1,7 @@
 # A little tesh file testing most MPI-related actions
 
 ! output sort 19
 # A little tesh file testing most MPI-related actions
 
 ! output sort 19
-$ ${bindir:=.}/actions --log=actions.thres=verbose ${srcdir:=.}/../../platforms/small_platform_fatpipe.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${bindir:=.}/mpi_actions --log=actions.thres=verbose ${srcdir:=.}/../../platforms/small_platform_fatpipe.xml mpi_deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > WARNING: THIS BINARY IS KINDA DEPRECATED
 > This example is still relevant if you want to learn about MSG-based trace replay, but if you want to simulate MPI-like traces, you should use the newer version that is in the examples/smpi/replay directory instead.
 > [ 20.703314] (1:p0@Tremblay) p0 recv p1 20.703314
 > WARNING: THIS BINARY IS KINDA DEPRECATED
 > This example is still relevant if you want to learn about MSG-based trace replay, but if you want to simulate MPI-like traces, you should use the newer version that is in the examples/smpi/replay directory instead.
 > [ 20.703314] (1:p0@Tremblay) p0 recv p1 20.703314
@@ -11,7 +11,7 @@ $ ${bindir:=.}/actions --log=actions.thres=verbose ${srcdir:=.}/../../platforms/
 > [ 32.703314] (0:maestro@) Simulation time 32.7033
 
 ! output sort 19
 > [ 32.703314] (0:maestro@) Simulation time 32.7033
 
 ! output sort 19
-$ ${bindir:=.}/actions --log=actions.thres=verbose ${srcdir:=.}/../../platforms/small_platform_fatpipe.xml deployment.xml mpi_actions_shared.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${bindir:=.}/mpi_actions --log=actions.thres=verbose ${srcdir:=.}/../../platforms/small_platform_fatpipe.xml mpi_deployment.xml mpi_actions.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > WARNING: THIS BINARY IS KINDA DEPRECATED
 > This example is still relevant if you want to learn about MSG-based trace replay, but if you want to simulate MPI-like traces, you should use the newer version that is in the examples/smpi/replay directory instead.
 > [  0.000000] (1:p0@Tremblay) p0 comm_size 3 0.000000
 > WARNING: THIS BINARY IS KINDA DEPRECATED
 > This example is still relevant if you want to learn about MSG-based trace replay, but if you want to simulate MPI-like traces, you should use the newer version that is in the examples/smpi/replay directory instead.
 > [  0.000000] (1:p0@Tremblay) p0 comm_size 3 0.000000
similarity index 85%
rename from examples/msg/actions/deployment_split.xml
rename to examples/msg/actions/mpi_deployment_split.xml
index c73bd33..e0984f7 100644 (file)
@@ -3,7 +3,7 @@
 <platform version="4">
 <!-- Example file of how to use trace replay, with actions split in separate files, one per process.
      Launch it like this:
 <platform version="4">
 <!-- Example file of how to use trace replay, with actions split in separate files, one per process.
      Launch it like this:
-         ./actions homogeneous_3_hosts.xml deployment_split.xml  -->
+         ./mpi_actions homogeneous_3_hosts.xml mpi_deployment_split.xml  -->
 
   <process host="Tremblay" function="p0">
     <argument value="mpi_actions_split_p0.txt"/>
 
   <process host="Tremblay" function="p0">
     <argument value="mpi_actions_split_p0.txt"/>
diff --git a/examples/msg/actions/storage_actions.tesh b/examples/msg/actions/storage_actions.tesh
new file mode 100644 (file)
index 0000000..aab5150
--- /dev/null
@@ -0,0 +1,6 @@
+! output sort 19
+$ ${bindir:=.}/storage_actions --log=storage_actions.thres=verbose ${srcdir:=.}/../../platforms/storage/storage.xml storage_deployment.xml storage_actions.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (1:p0@denise) p0 open /home/lib/libsimgrid.so.3.6.2 0.000000
+> [  0.063552] (1:p0@denise) p0 read /home/lib/libsimgrid.so.3.6.2 12710497 0.063552
+> [  0.063552] (1:p0@denise) p0 close /home/lib/libsimgrid.so.3.6.2 0.000000
+> [  0.063552] (0:maestro@) Simulation time 0.0635525