From: Frederic Suter Date: Wed, 23 Mar 2016 12:09:30 +0000 (+0100) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_13~327 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5787a5c839c1f49fec942290449d18b72b036d98?hp=28e3d706d2b879fc7e84f569cd8cd72a86e0c550 Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/.gitignore b/.gitignore index 7e3c0adde0..ff4d9ff762 100644 --- a/.gitignore +++ b/.gitignore @@ -123,10 +123,7 @@ examples/msg/bittorrent/bittorrent examples/msg/bittorrent/bittorrent_platfgen examples/msg/categories.trace examples/msg/chainsend/chainsend -examples/msg/chord/chord -examples/msg/chord/chord_stateful -examples/msg/chord/deployments -examples/msg/chord/exp_* +examples/msg/dht-chord/dht-chord examples/msg/cloud/bound examples/msg/cloud/master_worker_vm examples/msg/cloud/migrate_vm @@ -151,7 +148,7 @@ examples/msg/io/remote examples/msg/io/storage examples/msg/irc_isend/peer examples/msg/irc_isend/toto.txt -examples/msg/kademlia/kademlia +examples/msg/dht-kademlia/kademlia examples/msg/masterslave/masterslave_arg examples/msg/masterslave/masterslave_cluster examples/msg/masterslave/masterslave_failure @@ -180,7 +177,7 @@ examples/msg/ns3/ns3 examples/msg/parallel_contexts/pcontexts examples/msg/parallel_contexts/pcontexts2 examples/msg/parallel_task/parallel_task -examples/msg/pastry/pastry +examples/msg/dht-pastry/pastry examples/msg/pmm/pmm examples/msg/priority/priority examples/msg/procmig.trace @@ -212,7 +209,6 @@ examples/s4u/basic/s4u_basic examples/s4u/io/s4u_io examples/simdag/dax/sd_dax examples/simdag/dot/dot_test -examples/simdag/dot/dot_test2 examples/simdag/dot/simulate_dot examples/simdag/goal/goal_test examples/simdag/io/sd_io diff --git a/examples/msg/CMakeLists.txt b/examples/msg/CMakeLists.txt index dd4296e85e..a76e30bd6d 100644 --- a/examples/msg/CMakeLists.txt +++ b/examples/msg/CMakeLists.txt @@ -1,4 +1,4 @@ -foreach(x exception migration parallel_task pmm priority properties suspend synchro token_ring) +foreach(x dht-chord exception migration parallel_task pmm priority properties suspend synchro token_ring) add_executable (${x} ${x}/${x}.c) target_link_libraries(${x} simgrid) set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) @@ -11,17 +11,25 @@ foreach(file bourassa fafard ginette jupiter link3 link4 link5) endforeach() set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README PARENT_SCOPE) +set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/generate.py PARENT_SCOPE) set(examples_src ${examples_src} PARENT_SCOPE) -set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/parallel_task/parallel_task_energy.tesh PARENT_SCOPE) -set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/priority/priority_d.xml +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/dht-chord_crosstraffic.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/parallel_task/parallel_task_energy.tesh PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/chord.xml + ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/chord10.xml + ${CMAKE_CURRENT_SOURCE_DIR}/priority/priority_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/properties/properties_d.xml PARENT_SCOPE) -foreach(x migration priority properties suspend synchro token_ring) +foreach(x dht-chord migration priority properties suspend synchro token_ring) ADD_TESH_FACTORIES(msg-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/${x} ${x}.tesh) endforeach() -ADD_TESH_FACTORIES(msg-ptask "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh) -ADD_TESH_FACTORIES(msg-ptask-energy "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task_energy.tesh) +ADD_TESH_FACTORIES(msg-dht-chord-crosstraffic "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-chord dht-chord_crosstraffic.tesh) +ADD_TESH_FACTORIES(msg-dht-chord-crosstraffic-parallel "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-chord dht-chord_crosstraffic.tesh) +ADD_TESH_FACTORIES(msg-dht-chord-parallel "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-chord --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-chord dht-chord.tesh) +ADD_TESH_FACTORIES(msg-ptask "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh) +ADD_TESH_FACTORIES(msg-ptask-energy "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task_energy.tesh) + ADD_TESH(msg-pmm --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/pmm/pmm.tesh) # This one is not usable: # ADD_TESH_FACTORIES(msg-exception "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/exception/exception.tesh) diff --git a/examples/msg/chord/CMakeLists.txt b/examples/msg/chord/CMakeLists.txt deleted file mode 100644 index 75a27a5110..0000000000 --- a/examples/msg/chord/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -add_executable (chord chord.c) -target_link_libraries(chord simgrid) - -ADD_TESH_FACTORIES(msg-chord "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord_crosstraffic.tesh) -ADD_TESH_FACTORIES(msg-chord-no-crosstraffic "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh) -ADD_TESH_FACTORIES(msg-chord-parallel "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord_crosstraffic.tesh) -ADD_TESH_FACTORIES(msg-chord-no-crosstraffic-parallel "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh) - -set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/chord.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/chord_crosstraffic.tesh PARENT_SCOPE) -set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/chord.xml - ${CMAKE_CURRENT_SOURCE_DIR}/chord10.xml PARENT_SCOPE) -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/chord.c PARENT_SCOPE) -set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/generate.py PARENT_SCOPE) diff --git a/examples/msg/chord/chord.xml b/examples/msg/dht-chord/chord.xml similarity index 100% rename from examples/msg/chord/chord.xml rename to examples/msg/dht-chord/chord.xml diff --git a/examples/msg/chord/chord10.xml b/examples/msg/dht-chord/chord10.xml similarity index 100% rename from examples/msg/chord/chord10.xml rename to examples/msg/dht-chord/chord10.xml diff --git a/examples/msg/chord/chord.c b/examples/msg/dht-chord/dht-chord.c similarity index 100% rename from examples/msg/chord/chord.c rename to examples/msg/dht-chord/dht-chord.c diff --git a/examples/msg/chord/chord.tesh b/examples/msg/dht-chord/dht-chord.tesh similarity index 99% rename from examples/msg/chord/chord.tesh rename to examples/msg/dht-chord/dht-chord.tesh index ec7d079252..c568c9d00c 100644 --- a/examples/msg/chord/chord.tesh +++ b/examples/msg/dht-chord/dht-chord.tesh @@ -3,7 +3,7 @@ p Testing the Chord implementation with MSG ! output sort 19 -$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platforms/platform.xml ${srcdir:=.}/chord.xml --cfg=network/crosstraffic:0 --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ $SG_TEST_EXENV ${bindir:=.}/dht-chord$EXEEXT -nb_bits=6 ${srcdir:=.}/platform.xml ${srcdir:=.}/../msg/dht-chord/chord.xml --cfg=network/crosstraffic:0 --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (0:maestro@) Configuration change: Set 'network/crosstraffic' to '0' > [ 0.000000] (1:node@Gatien) Joining the ring with id 48, knowing node 1 > [ 0.000000] (2:node@McGee) Joining the ring with id 42, knowing node 1 @@ -457,7 +457,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platfor > [804.364963] (0:maestro@) Simulated time: 804.365 ! output sort 19 -$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/routing_none.xml ${srcdir:=.}/chord10.xml --cfg=network/crosstraffic:0 --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant +$ $SG_TEST_EXENV ${bindir:=.}/dht-chord$EXEEXT ${srcdir:=.}/routing_none.xml ${srcdir:=.}/../msg/dht-chord/chord10.xml --cfg=network/crosstraffic:0 --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant > [ 0.000000] (0:maestro@) Configuration change: Set 'network/crosstraffic' to '0' > [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Constant' > [ 0.000000] (1:node@node-0.acme.org) My finger table: diff --git a/examples/msg/chord/chord_crosstraffic.tesh b/examples/msg/dht-chord/dht-chord_crosstraffic.tesh similarity index 99% rename from examples/msg/chord/chord_crosstraffic.tesh rename to examples/msg/dht-chord/dht-chord_crosstraffic.tesh index 209bb5d2aa..217a9e03f3 100644 --- a/examples/msg/chord/chord_crosstraffic.tesh +++ b/examples/msg/dht-chord/dht-chord_crosstraffic.tesh @@ -3,7 +3,7 @@ p> Testing the Chord implementation with MSG ! output sort 19 -$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platforms/platform.xml ${srcdir:=.}/chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ $SG_TEST_EXENV ${bindir:=.}/dht-chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platforms/platform.xml ${srcdir:=.}/chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:node@Gatien) Joining the ring with id 48, knowing node 1 > [ 0.000000] (2:node@McGee) Joining the ring with id 42, knowing node 1 > [ 0.000000] (3:node@iRMX) Joining the ring with id 38, knowing node 1 @@ -456,7 +456,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platfor > [804.365058] (0:maestro@) Simulated time: 804.365 ! output sort 19 -$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/routing_none.xml ${srcdir:=.}/chord10.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant +$ $SG_TEST_EXENV ${bindir:=.}/dht-chord$EXEEXT ${srcdir:=.}/../../platforms/routing_none.xml ${srcdir:=.}/chord10.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant > [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Constant' > [ 0.000000] (1:node@node-0.acme.org) My finger table: > [ 0.000000] (1:node@node-0.acme.org) Start | Succ diff --git a/examples/msg/chord/generate.py b/examples/msg/dht-chord/generate.py similarity index 100% rename from examples/msg/chord/generate.py rename to examples/msg/dht-chord/generate.py diff --git a/examples/msg/kademlia/CMakeLists.txt b/examples/msg/dht-kademlia/CMakeLists.txt similarity index 60% rename from examples/msg/kademlia/CMakeLists.txt rename to examples/msg/dht-kademlia/CMakeLists.txt index ffaf5a8547..063c8fab7e 100644 --- a/examples/msg/kademlia/CMakeLists.txt +++ b/examples/msg/dht-kademlia/CMakeLists.txt @@ -1,8 +1,8 @@ add_executable (kademlia kademlia.c node.c routing_table.c task.c answer.c) target_link_libraries(kademlia simgrid) -ADD_TESH_FACTORIES(msg-kademlia "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/kademlia --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/kademlia kademlia.tesh) -ADD_TESH(msg-kademlia-parallel --cfg contexts/nthreads:4 --cfg contexts/factory:thread ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/kademlia --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/kademlia kademlia.tesh) +ADD_TESH_FACTORIES(msg-dht-kademlia "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-kademlia --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-kademlia kademlia.tesh) +ADD_TESH(msg-dht-kademlia-parallel --cfg contexts/nthreads:4 --cfg contexts/factory:thread ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-kademlia --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-kademlia kademlia.tesh) foreach (file answer kademlia node routing_table task) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c ${CMAKE_CURRENT_SOURCE_DIR}/${file}.h) diff --git a/examples/msg/kademlia/answer.c b/examples/msg/dht-kademlia/answer.c similarity index 100% rename from examples/msg/kademlia/answer.c rename to examples/msg/dht-kademlia/answer.c diff --git a/examples/msg/kademlia/answer.h b/examples/msg/dht-kademlia/answer.h similarity index 100% rename from examples/msg/kademlia/answer.h rename to examples/msg/dht-kademlia/answer.h diff --git a/examples/msg/kademlia/common.h b/examples/msg/dht-kademlia/common.h similarity index 100% rename from examples/msg/kademlia/common.h rename to examples/msg/dht-kademlia/common.h diff --git a/examples/msg/kademlia/generate.py b/examples/msg/dht-kademlia/generate.py similarity index 100% rename from examples/msg/kademlia/generate.py rename to examples/msg/dht-kademlia/generate.py diff --git a/examples/msg/kademlia/kademlia.c b/examples/msg/dht-kademlia/kademlia.c similarity index 100% rename from examples/msg/kademlia/kademlia.c rename to examples/msg/dht-kademlia/kademlia.c diff --git a/examples/msg/kademlia/kademlia.h b/examples/msg/dht-kademlia/kademlia.h similarity index 100% rename from examples/msg/kademlia/kademlia.h rename to examples/msg/dht-kademlia/kademlia.h diff --git a/examples/msg/kademlia/kademlia.tesh b/examples/msg/dht-kademlia/kademlia.tesh similarity index 100% rename from examples/msg/kademlia/kademlia.tesh rename to examples/msg/dht-kademlia/kademlia.tesh diff --git a/examples/msg/kademlia/kademlia.xml b/examples/msg/dht-kademlia/kademlia.xml similarity index 100% rename from examples/msg/kademlia/kademlia.xml rename to examples/msg/dht-kademlia/kademlia.xml diff --git a/examples/msg/kademlia/node.c b/examples/msg/dht-kademlia/node.c similarity index 100% rename from examples/msg/kademlia/node.c rename to examples/msg/dht-kademlia/node.c diff --git a/examples/msg/kademlia/node.h b/examples/msg/dht-kademlia/node.h similarity index 100% rename from examples/msg/kademlia/node.h rename to examples/msg/dht-kademlia/node.h diff --git a/examples/msg/kademlia/routing_table.c b/examples/msg/dht-kademlia/routing_table.c similarity index 100% rename from examples/msg/kademlia/routing_table.c rename to examples/msg/dht-kademlia/routing_table.c diff --git a/examples/msg/kademlia/routing_table.h b/examples/msg/dht-kademlia/routing_table.h similarity index 100% rename from examples/msg/kademlia/routing_table.h rename to examples/msg/dht-kademlia/routing_table.h diff --git a/examples/msg/kademlia/task.c b/examples/msg/dht-kademlia/task.c similarity index 100% rename from examples/msg/kademlia/task.c rename to examples/msg/dht-kademlia/task.c diff --git a/examples/msg/kademlia/task.h b/examples/msg/dht-kademlia/task.h similarity index 100% rename from examples/msg/kademlia/task.h rename to examples/msg/dht-kademlia/task.h diff --git a/examples/msg/pastry/CMakeLists.txt b/examples/msg/dht-pastry/CMakeLists.txt similarity index 61% rename from examples/msg/pastry/CMakeLists.txt rename to examples/msg/dht-pastry/CMakeLists.txt index 5c6db6abb8..e0194d18f2 100644 --- a/examples/msg/pastry/CMakeLists.txt +++ b/examples/msg/dht-pastry/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable (pastry pastry.c) target_link_libraries(pastry simgrid) -# ADD_TESH_FACTORIES(msg-pastry "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/pastry --cd ${CMAKE_BINARY_DIR}/examples/msg/pastry ${CMAKE_HOME_DIRECTORY}/examples/msg/pastry/pastry.tesh) +# ADD_TESH_FACTORIES(msg-dht-pastry "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/dht-pastry --cd ${CMAKE_BINARY_DIR}/examples/msg/dht-pastry pastry.tesh) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/pastry.tesh PARENT_SCOPE) set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/pastry10.xml PARENT_SCOPE) diff --git a/examples/msg/pastry/pastry.c b/examples/msg/dht-pastry/pastry.c similarity index 100% rename from examples/msg/pastry/pastry.c rename to examples/msg/dht-pastry/pastry.c diff --git a/examples/msg/pastry/pastry.tesh b/examples/msg/dht-pastry/pastry.tesh similarity index 100% rename from examples/msg/pastry/pastry.tesh rename to examples/msg/dht-pastry/pastry.tesh diff --git a/examples/msg/pastry/pastry10.xml b/examples/msg/dht-pastry/pastry10.xml similarity index 100% rename from examples/msg/pastry/pastry10.xml rename to examples/msg/dht-pastry/pastry10.xml diff --git a/examples/msg/ns3/dogbone-d.xml b/examples/msg/ns3/dogbone-d.xml index 0b495258f9..0fd2359c25 100644 --- a/examples/msg/ns3/dogbone-d.xml +++ b/examples/msg/ns3/dogbone-d.xml @@ -1,19 +1,16 @@ - - - diff --git a/examples/msg/ns3/ns3.tesh b/examples/msg/ns3/ns3.tesh index d6da7fe259..c2bf59357c 100644 --- a/examples/msg/ns3/ns3.tesh +++ b/examples/msg/ns3/ns3.tesh @@ -1,7 +1,7 @@ #! ./tesh p In the NS3 tests, the timings are not shown because the exact values may vary with your NS3 version. -p We just want to check that the NS3 bindings of SimGrid are working correctly, we don't want to throughoutly test NS3. +p We just want to check that the NS3 bindings of SimGrid are working correctly, we don't want to thoroughly test NS3. p 3hosts 2links diff --git a/examples/simdag/dot/CMakeLists.txt b/examples/simdag/dot/CMakeLists.txt index c4fabb3d9b..5371f27070 100644 --- a/examples/simdag/dot/CMakeLists.txt +++ b/examples/simdag/dot/CMakeLists.txt @@ -1,5 +1,5 @@ if(HAVE_GRAPHVIZ) - foreach(x dot_test ptg_test simulate_dot dot_test2) + foreach(x dot_test ptg_test simulate_dot) add_executable (${x} ${x}.c) target_link_libraries(${x} simgrid) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c) diff --git a/examples/simdag/dot/dot_test2.c b/examples/simdag/dot/dot_test2.c deleted file mode 100644 index a9b9c68bb5..0000000000 --- a/examples/simdag/dot/dot_test2.c +++ /dev/null @@ -1,53 +0,0 @@ -/* simple test trying to load a DOT file. */ - -/* Copyright (c) 2010-2016. The SimGrid Team. - * All rights reserved. */ - -/* 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. */ - -#include "simgrid/simdag.h" -#include - -XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example"); - -int main(int argc, char **argv) -{ - xbt_dynar_t dot; - unsigned int cursor; - SD_task_t task, *dot_as_array=NULL; - - /* SD initialization */ - SD_init(&argc, argv); - - /* Check our arguments */ - xbt_assert(argc > 1, "Usage: %s dot_file", argv[0]); - - /* load the DOT file */ - dot = SD_dotload(argv[1]); - - /* Display all the tasks */ - XBT_INFO("------------------- Display all tasks of the loaded DAG ---------------------------"); - xbt_dynar_foreach(dot, cursor, task) { - SD_task_dump(task); - } - - XBT_INFO("--------------------- Transform the dynar into an array ---------------------------"); - cursor=0; - dot_as_array = (SD_task_t*) xbt_dynar_to_array(dot); - XBT_INFO("----------------------------- dump tasks again ------------------------------------"); - while ((task=dot_as_array[cursor++])){ - SD_task_dump(task); - } - - cursor=0; - while ((task=dot_as_array[cursor++])){ - SD_task_destroy(task); - } - - free(dot_as_array); - - /* exit */ - SD_exit(); - return 0; -} diff --git a/examples/simdag/dot/ptg_test.c b/examples/simdag/dot/ptg_test.c index aa0c2c4e95..8b30e0c522 100644 --- a/examples/simdag/dot/ptg_test.c +++ b/examples/simdag/dot/ptg_test.c @@ -38,21 +38,13 @@ int main(int argc, char **argv){ SD_task_dump(task); } - FILE *dotout = fopen("dot.dot", "w"); - fprintf(dotout, "digraph A {\n"); - xbt_dynar_foreach(dot, cursor, task) { - SD_task_dotty(task, dotout); - } - fprintf(dotout, "}\n"); - fclose(dotout); - - /* Schedule them all on all the first workstation */ + /* Schedule them all on all the first host*/ XBT_INFO("------------------- Schedule tasks ---------------------------"); - const sg_host_t *ws_list = sg_host_list(); + const sg_host_t *hosts = sg_host_list(); int count = sg_host_count(); xbt_dynar_foreach(dot, cursor, task) { if (SD_task_get_kind(task) == SD_TASK_COMP_PAR_AMDAHL) { - SD_task_schedulev(task, count, ws_list); + SD_task_schedulev(task, count, hosts); } } diff --git a/examples/simdag/dot/simulate_dot.c b/examples/simdag/dot/simulate_dot.c index 22cc2429ed..67a27934e9 100644 --- a/examples/simdag/dot/simulate_dot.c +++ b/examples/simdag/dot/simulate_dot.c @@ -32,7 +32,8 @@ int main(int argc, char **argv) /* load the DOT file and schedule tasks */ dot = SD_dotload_with_sched(argv[2]); if(!dot){ - XBT_CRITICAL("The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose"); + XBT_CRITICAL("The dot file with the provided scheduling is wrong," + " more information with the option : --log=sd_dotparse.thres:verbose"); SD_exit(); exit(2); } @@ -40,9 +41,8 @@ int main(int argc, char **argv) char *tracefilename; char *last = strrchr(argv[2], '.'); tracefilename = bprintf("%.*s.trace", (int) (last == NULL ? strlen(argv[2]) : last - argv[2]),argv[2]); - if (argc == 4) + if (argc == 4) tracefilename = xbt_strdup(argv[3]); - /* Display all the tasks */ XBT_INFO("------------------- Display all tasks of the loaded DAG ---------------------------"); @@ -50,14 +50,6 @@ int main(int argc, char **argv) SD_task_dump(task); } - FILE *dotout = fopen("dot.dot", "w"); - fprintf(dotout, "digraph A {\n"); - xbt_dynar_foreach(dot, cursor, task) { - SD_task_dotty(task, dotout); - } - fprintf(dotout, "}\n"); - fclose(dotout); - XBT_INFO("------------------- Run the schedule ---------------------------"); SD_simulate(-1); diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index b7f6cfbe75..bb79408e80 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -951,17 +951,16 @@ set(CMAKEFILES_TXT examples/msg/actions/CMakeLists.txt examples/msg/bittorrent/CMakeLists.txt examples/msg/chainsend/CMakeLists.txt - examples/msg/chord/CMakeLists.txt examples/msg/cloud/CMakeLists.txt + examples/msg/dht-kademlia/CMakeLists.txt + examples/msg/dht-pastry/CMakeLists.txt examples/msg/energy/CMakeLists.txt examples/msg/gtnets/CMakeLists.txt examples/msg/icomms/CMakeLists.txt examples/msg/io/CMakeLists.txt - examples/msg/kademlia/CMakeLists.txt examples/msg/masterslave/CMakeLists.txt examples/msg/mc/CMakeLists.txt examples/msg/ns3/CMakeLists.txt - examples/msg/pastry/CMakeLists.txt examples/msg/sendrecv/CMakeLists.txt examples/msg/set-maestro/CMakeLists.txt examples/msg/start_kill_time/CMakeLists.txt