From c20b20602a3b551b39aa7910874cca47c45430ab Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 24 Mar 2016 10:53:06 +0100 Subject: [PATCH 1/1] factor dht-pastry --- .gitignore | 6 +++--- examples/msg/CMakeLists.txt | 4 +++- examples/msg/dht-pastry/CMakeLists.txt | 8 -------- examples/msg/dht-pastry/{pastry.c => dht-pastry.c} | 0 examples/msg/dht-pastry/dht-pastry.tesh | 6 ++++++ examples/msg/dht-pastry/pastry.tesh | 6 ------ tools/cmake/DefinePackages.cmake | 1 - 7 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 examples/msg/dht-pastry/CMakeLists.txt rename examples/msg/dht-pastry/{pastry.c => dht-pastry.c} (100%) create mode 100644 examples/msg/dht-pastry/dht-pastry.tesh delete mode 100644 examples/msg/dht-pastry/pastry.tesh diff --git a/.gitignore b/.gitignore index c3266db2ce..c659083077 100644 --- a/.gitignore +++ b/.gitignore @@ -123,7 +123,6 @@ examples/msg/bittorrent/bittorrent examples/msg/bittorrent/bittorrent_platfgen examples/msg/categories.trace examples/msg/chainsend/chainsend -examples/msg/dht-chord/dht-chord examples/msg/cloud/bound examples/msg/cloud/master_worker_vm examples/msg/cloud/migrate_vm @@ -131,6 +130,9 @@ examples/msg/cloud/multicore examples/msg/cloud/scale examples/msg/cloud/simple_vm examples/msg/cloud/two_tasks_vm +examples/msg/dht-chord/dht-chord +examples/msg/dht-kademlia/kademlia +examples/msg/dht-pastry/dht-pastry examples/msg/energy-consumption/energy-consumption examples/msg/energy-onoff/energy-onoff examples/msg/energy-pstate/energy-pstate @@ -148,7 +150,6 @@ examples/msg/io/remote examples/msg/io/storage examples/msg/irc_isend/peer examples/msg/irc_isend/toto.txt -examples/msg/dht-kademlia/kademlia examples/msg/masterslave/masterslave_arg examples/msg/masterslave/masterslave_cluster examples/msg/masterslave/masterslave_failure @@ -174,7 +175,6 @@ examples/msg/mc/test/snapshot_comparison5 examples/msg/migration/migration examples/msg/ms.trace examples/msg/ns3/ns3 -examples/msg/dht-pastry/pastry examples/msg/pmm/pmm examples/msg/priority/priority examples/msg/procmig.trace diff --git a/examples/msg/CMakeLists.txt b/examples/msg/CMakeLists.txt index e1baea3334..d2ad44acb0 100644 --- a/examples/msg/CMakeLists.txt +++ b/examples/msg/CMakeLists.txt @@ -1,4 +1,4 @@ -foreach(x dht-chord exception energy-consumption energy-onoff energy-pstate energy-ptask energy-vm +foreach(x dht-chord dht-pastry exception energy-consumption energy-onoff energy-pstate energy-ptask energy-vm migration pmm priority properties suspend synchro token_ring) add_executable (${x} ${x}/${x}.c) target_link_libraries(${x} simgrid) @@ -17,6 +17,7 @@ set(examples_src ${examples_src} set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/dht-chord_crosstraffic.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}/dht-pastry/pastry10.xml ${CMAKE_CURRENT_SOURCE_DIR}/energy-onoff/platform_onoff.xml ${CMAKE_CURRENT_SOURCE_DIR}/priority/priority_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/properties/properties_d.xml PARENT_SCOPE) @@ -32,6 +33,7 @@ endforeach() 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-dht-pastry "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/dht-pastry --cd ${CMAKE_BINARY_DIR}/examples/msg/dht-pastry dht-pastry.tesh) ADD_TESH_FACTORIES(msg-energy-pstate-ptask "thread;ucontext;raw;boost" --cfg host/model:ptask_L07 --log xbt_cfg.threshold:critical --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-pstate/energy-pstate.tesh) ADD_TESH_FACTORIES(msg-energy-consumption-ptask "thread;ucontext;raw;boost" --cfg host/model:ptask_L07 --log xbt_cfg.threshold:critical --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-consumption/energy-consumption.tesh) ADD_TESH_FACTORIES(msg-energy-ptask "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-ptask/energy-ptask.tesh) diff --git a/examples/msg/dht-pastry/CMakeLists.txt b/examples/msg/dht-pastry/CMakeLists.txt deleted file mode 100644 index e0194d18f2..0000000000 --- a/examples/msg/dht-pastry/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_executable (pastry pastry.c) -target_link_libraries(pastry simgrid) - -# 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) -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/pastry.c PARENT_SCOPE) diff --git a/examples/msg/dht-pastry/pastry.c b/examples/msg/dht-pastry/dht-pastry.c similarity index 100% rename from examples/msg/dht-pastry/pastry.c rename to examples/msg/dht-pastry/dht-pastry.c diff --git a/examples/msg/dht-pastry/dht-pastry.tesh b/examples/msg/dht-pastry/dht-pastry.tesh new file mode 100644 index 0000000000..9b3d87cc5d --- /dev/null +++ b/examples/msg/dht-pastry/dht-pastry.tesh @@ -0,0 +1,6 @@ +#! ./tesh + +p Testing the Chord implementation with MSG + +! output sort 19 +$ $SG_TEST_EXENV ${bindir:=.}/dht-pastry$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platforms/platform.xml ${srcdir:=.}/pastry10.xml --cfg=network/crosstraffic:0 --log=msg_pastry.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" diff --git a/examples/msg/dht-pastry/pastry.tesh b/examples/msg/dht-pastry/pastry.tesh deleted file mode 100644 index 8b1ea145ce..0000000000 --- a/examples/msg/dht-pastry/pastry.tesh +++ /dev/null @@ -1,6 +0,0 @@ -#! ./tesh - -p Testing the Chord implementation with MSG - -! output sort 19 -$ $SG_TEST_EXENV ${bindir:=.}/pastry$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platforms/platform.xml ${srcdir:=.}/pastry10.xml --cfg=network/crosstraffic:0 --log=msg_pastry.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 53c94997ce..8c0195d0a2 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -953,7 +953,6 @@ set(CMAKEFILES_TXT examples/msg/chainsend/CMakeLists.txt examples/msg/cloud/CMakeLists.txt examples/msg/dht-kademlia/CMakeLists.txt - examples/msg/dht-pastry/CMakeLists.txt examples/msg/gtnets/CMakeLists.txt examples/msg/icomms/CMakeLists.txt examples/msg/io/CMakeLists.txt -- 2.20.1