From: Frederic Suter Date: Wed, 23 Mar 2016 09:58:36 +0000 (+0100) Subject: couple more simplifications X-Git-Tag: v3_13~331 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c67fa2b51e1d608113457720eb9292cd75c0941c?ds=sidebyside couple more simplifications --- diff --git a/.gitignore b/.gitignore index 0bd61c544d..7e3c0adde0 100644 --- a/.gitignore +++ b/.gitignore @@ -210,7 +210,7 @@ examples/msg/z_gtnets.trace examples/msg/zmsg_test.trace examples/s4u/basic/s4u_basic examples/s4u/io/s4u_io -examples/simdag/dax/dax_test +examples/simdag/dax/sd_dax examples/simdag/dot/dot_test examples/simdag/dot/dot_test2 examples/simdag/dot/simulate_dot diff --git a/examples/simdag/CMakeLists.txt b/examples/simdag/CMakeLists.txt index 0c5e10e202..f470387892 100644 --- a/examples/simdag/CMakeLists.txt +++ b/examples/simdag/CMakeLists.txt @@ -1,4 +1,4 @@ -foreach(x availability fail typed_tasks io properties comm_throttling scheduling test) +foreach(x availability dax fail typed_tasks io properties comm_throttling scheduling test) add_executable (sd_${x} ${x}/sd_${x}.c) target_link_libraries(sd_${x} simgrid) set_target_properties(sd_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) @@ -6,11 +6,19 @@ foreach(x availability fail typed_tasks io properties comm_throttling scheduling set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.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}/scheduling/Montage_25.xml PARENT_SCOPE) -set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua PARENT_SCOPE) +add_executable (goal_test goal/goal_test.c) +target_link_libraries(goal_test simgrid) +set_target_properties(goal_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/goal) -foreach(x availability fail typed_tasks io properties comm_throttling scheduling test) +set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/goal/goal_test.c PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/dax/simple_dax_with_cycle.tesh PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/Montage_25.xml + ${CMAKE_CURRENT_SOURCE_DIR}/dax/simple_dax_with_cycle.xml + ${CMAKE_CURRENT_SOURCE_DIR}/dax/smalldax.xml PARENT_SCOPE) +set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua PARENT_SCOPE) + +foreach(x availability dax fail typed_tasks io properties comm_throttling scheduling test) ADD_TESH(simdag-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/${x}/sd_${x}.tesh) endforeach() + +ADD_TESH(simdag-dax-cycle --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax simple_dax_with_cycle.tesh) diff --git a/examples/simdag/dax/CMakeLists.txt b/examples/simdag/dax/CMakeLists.txt deleted file mode 100644 index 85786458c6..0000000000 --- a/examples/simdag/dax/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -add_executable (dax_test dax_test.c) -target_link_libraries(dax_test simgrid) - -ADD_TESH(simdag-dax --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax smalldax.tesh) -ADD_TESH(simdag-dax-cycle --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax simple_dax_with_cycle.tesh) - -set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/simple_dax_with_cycle.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/smalldax.tesh PARENT_SCOPE) -set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/simple_dax_with_cycle.xml - ${CMAKE_CURRENT_SOURCE_DIR}/smalldax.xml PARENT_SCOPE) -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/dax_test.c PARENT_SCOPE) diff --git a/examples/simdag/dax/dax_test.c b/examples/simdag/dax/sd_dax.c similarity index 97% rename from examples/simdag/dax/dax_test.c rename to examples/simdag/dax/sd_dax.c index 4bd470c1fd..17349494ed 100644 --- a/examples/simdag/dax/dax_test.c +++ b/examples/simdag/dax/sd_dax.c @@ -7,6 +7,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/simdag.h" +#include "xbt/file.h" #include #include @@ -79,7 +80,7 @@ int main(int argc, char **argv) XBT_INFO("------------------- Run the schedule ---------------------------"); SD_simulate(-1); XBT_INFO("------------------- Produce the trace file---------------------------"); - XBT_INFO("Producing the trace of the run into %s", tracefilename); + XBT_INFO("Producing the trace of the run into %s", xbt_basename(tracefilename)); FILE *out = fopen(tracefilename, "w"); xbt_assert(out, "Cannot write to %s", tracefilename); free(tracefilename); diff --git a/examples/simdag/dax/smalldax.tesh b/examples/simdag/dax/sd_dax.tesh similarity index 95% rename from examples/simdag/dax/smalldax.tesh rename to examples/simdag/dax/sd_dax.tesh index 95f8fca3d6..7e33671be4 100644 --- a/examples/simdag/dax/smalldax.tesh +++ b/examples/simdag/dax/sd_dax.tesh @@ -1,7 +1,7 @@ #! ./tesh p Test the DAX loader on a small DAX instance -$ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ${srcdir:=.}/../../platforms/2clusters.xml ./smalldax.xml +$ $SG_TEST_EXENV ${bindir:=.}/dax/sd_dax --log=no_loc ${srcdir:=.}/../platforms/2clusters.xml ${srcdir:=.}/dax/smalldax.xml > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks. > [0.000000] [sd_daxparse/WARNING] Ignore file o1 size redefinition from 1000000 to 304 > [0.000000] [sd_daxparse/WARNING] Ignore file o2 size redefinition from 1000000 to 304 @@ -101,9 +101,9 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ${srcdir:=.}/../../platforms > [0.000000] [test/INFO] ------------------- Schedule tasks --------------------------- > [0.000000] [test/INFO] ------------------- Run the schedule --------------------------- > [84.066238] [test/INFO] ------------------- Produce the trace file--------------------------- -> [84.066238] [test/INFO] Producing the trace of the run into ./smalldax.trace +> [84.066238] [test/INFO] Producing the trace of the run into smalldax.trace -$ cat ./smalldax.trace +$ cat ${srcdir:=.}/dax/smalldax.trace > [0.000000] C1-00 compute 0.000000 # root > [0.016300] C1-01 compute 42000000000.000000 # 1@task1 > [0.016300] C1-02 compute 42000000000.000000 # 2@task2 @@ -120,4 +120,4 @@ $ cat ./smalldax.trace > [0.016300] C1-01 recv C1-00 1000000.000000 # root_i1_1@task1 > [84.066238] C1-00 compute 0.000000 # end -$ cmake -E remove -f ./dax.dot ./smalldax.trace +$ cmake -E remove -f ${srcdir:=.}/dax.dot ${srcdir:=.}/dax/smalldax.trace diff --git a/examples/simdag/dax/simple_dax_with_cycle.tesh b/examples/simdag/dax/simple_dax_with_cycle.tesh index 3962062dc5..59cf02be65 100644 --- a/examples/simdag/dax/simple_dax_with_cycle.tesh +++ b/examples/simdag/dax/simple_dax_with_cycle.tesh @@ -2,7 +2,7 @@ p Test the DAX loader with a DAX comprising a cycle. ! expect return 255 -$ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ${srcdir:=.}/../../platforms/2clusters.xml ./simple_dax_with_cycle.xml +$ $SG_TEST_EXENV ${bindir:=.}/sd_dax --log=no_loc ${srcdir:=.}/../../platforms/2clusters.xml ./simple_dax_with_cycle.xml > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks. > [0.000000] [sd_daxparse/WARNING] the task root is not marked > [0.000000] [sd_daxparse/WARNING] the task 1@task1 is in a cycle diff --git a/examples/simdag/dax/simple_dax_with_cycle.xml b/examples/simdag/dax/simple_dax_with_cycle.xml index eb8ff13da1..6a42ed9362 100644 --- a/examples/simdag/dax/simple_dax_with_cycle.xml +++ b/examples/simdag/dax/simple_dax_with_cycle.xml @@ -1,29 +1,18 @@ - - - + - - + + - + - - + + - diff --git a/examples/simdag/dax/smalldax.xml b/examples/simdag/dax/smalldax.xml index 3829b9165d..1432fca94f 100644 --- a/examples/simdag/dax/smalldax.xml +++ b/examples/simdag/dax/smalldax.xml @@ -1,29 +1,22 @@ - - - + - - - diff --git a/examples/simdag/goal/CMakeLists.txt b/examples/simdag/goal/CMakeLists.txt deleted file mode 100644 index 59fdfc6f7c..0000000000 --- a/examples/simdag/goal/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable (goal_test goal_test.c) -target_link_libraries(goal_test simgrid) -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/goal_test.c PARENT_SCOPE) diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 53139cf325..3e41773ce9 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -963,9 +963,7 @@ set(CMAKEFILES_TXT examples/msg/tracing/CMakeLists.txt examples/s4u/CMakeLists.txt examples/simdag/CMakeLists.txt - examples/simdag/dax/CMakeLists.txt examples/simdag/dot/CMakeLists.txt - examples/simdag/goal/CMakeLists.txt examples/smpi/CMakeLists.txt examples/smpi/NAS/CMakeLists.txt examples/smpi/smpi_msg_masterslave/CMakeLists.txt