From: Arnaud Giersch Date: Tue, 26 Feb 2019 16:44:17 +0000 (+0100) Subject: Kill unused constants. X-Git-Tag: v3_22~230 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d1a8de6d608e6a2dbfc60cf4e453832421a2fd4c Kill unused constants. --- diff --git a/examples/deprecated/msg/dht-kademlia/common.h b/examples/deprecated/msg/dht-kademlia/common.h index bb101f67d1..101f1092a9 100644 --- a/examples/deprecated/msg/dht-kademlia/common.h +++ b/examples/deprecated/msg/dht-kademlia/common.h @@ -8,8 +8,6 @@ #define _KADEMLIA_EXAMPLES_COMMON #define max_join_trials 4 -#define RECEIVE_TIMEOUT 1 - #define find_node_timeout 10 #define find_node_global_timeout 50 @@ -17,7 +15,6 @@ #define bucket_size 20 #define identifier_size 32 -#define max_answers_to_ask 20 #define random_lookup_interval 100 diff --git a/examples/s4u/app-bittorrent/s4u-bittorrent.hpp b/examples/s4u/app-bittorrent/s4u-bittorrent.hpp index 56222d145d..d61f301dab 100644 --- a/examples/s4u/app-bittorrent/s4u-bittorrent.hpp +++ b/examples/s4u/app-bittorrent/s4u-bittorrent.hpp @@ -10,7 +10,6 @@ #include #include -#define MAILBOX_SIZE 40 #define TRACKER_MAILBOX "tracker_mailbox" /** Max number of peers sent by the tracker to clients */ #define MAXIMUM_PEERS 50 @@ -19,14 +18,10 @@ /** Communication size for a task to the tracker */ #define TRACKER_COMM_SIZE 1 #define GET_PEERS_TIMEOUT 10000 -#define TIMEOUT_MESSAGE 10 -#define TRACKER_RECEIVE_TIMEOUT 10 /** Number of peers that can be unchocked at a given time */ #define MAX_UNCHOKED_PEERS 4 /** Interval between each update of the choked peers */ #define UPDATE_CHOKED_INTERVAL 30 -/** Number of pieces the peer asks for simultaneously */ -#define MAX_PIECES 1 /** Message sizes * Sizes based on report by A. Legout et al, Understanding BitTorrent: An Experimental Perspective diff --git a/examples/s4u/cloud-capping/s4u-cloud-capping.cpp b/examples/s4u/cloud-capping/s4u-cloud-capping.cpp index dd3c6acb80..69f3323aa7 100644 --- a/examples/s4u/cloud-capping/s4u-cloud-capping.cpp +++ b/examples/s4u/cloud-capping/s4u-cloud-capping.cpp @@ -32,11 +32,10 @@ static void worker(double computation_amount, bool use_bound, double bound) XBT_INFO("not bound => duration %f (%f flops/s)", duration, flops_per_sec); } -#define DOUBLE_MAX 1e11 static void worker_busy_loop(const char* name, double speed) { - simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_async(DOUBLE_MAX); - double exec_remain_prev = DOUBLE_MAX; + double exec_remain_prev = 1e11; + simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_async(exec_remain_prev); for (int i = 0; i < 10; i++) { if (speed > 0) { double new_bound = (speed / 10) * i; diff --git a/examples/s4u/dht-kademlia/s4u-dht-kademlia.hpp b/examples/s4u/dht-kademlia/s4u-dht-kademlia.hpp index e1fedb717d..a66c4a91e4 100644 --- a/examples/s4u/dht-kademlia/s4u-dht-kademlia.hpp +++ b/examples/s4u/dht-kademlia/s4u-dht-kademlia.hpp @@ -14,10 +14,6 @@ class Answer; class Message; } -#define max_join_trials 4 - -#define RECEIVE_TIMEOUT 1 - #define find_node_timeout 10 #define find_node_global_timeout 50 @@ -25,7 +21,6 @@ class Message; #define BUCKET_SIZE 20 #define identifier_size 32 -#define max_answers_to_ask 20 #define random_lookup_interval 100 diff --git a/src/plugins/vm/VirtualMachineImpl.cpp b/src/plugins/vm/VirtualMachineImpl.cpp index 727bc34691..6d3f9f15ce 100644 --- a/src/plugins/vm/VirtualMachineImpl.cpp +++ b/src/plugins/vm/VirtualMachineImpl.cpp @@ -145,7 +145,10 @@ VirtualMachineImpl::VirtualMachineImpl(simgrid::s4u::VirtualMachine* piface, sim allVms_.push_back(piface); /* We create cpu_action corresponding to a VM process on the host operating system. */ - /* TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */ + /* TODO: we have to periodically input GUESTOS_NOISE to the system? how ? + * The value for GUESTOS_NOISE corresponds to the cost of the global action associated to the VM. It corresponds to + * the cost of a VM running no tasks. + */ action_ = host_PM->pimpl_cpu->execution_start(0, core_amount); // It's empty for now, so it should not request resources in the PM diff --git a/src/plugins/vm/VirtualMachineImpl.hpp b/src/plugins/vm/VirtualMachineImpl.hpp index 5d735021ed..f50b41380e 100644 --- a/src/plugins/vm/VirtualMachineImpl.hpp +++ b/src/plugins/vm/VirtualMachineImpl.hpp @@ -13,9 +13,6 @@ #ifndef VM_INTERFACE_HPP_ #define VM_INTERFACE_HPP_ -#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM - // It corresponds to the cost of a VM running no tasks. - namespace simgrid { namespace vm { diff --git a/teshsuite/msg/app-bittorrent/bittorrent.h b/teshsuite/msg/app-bittorrent/bittorrent.h index 95ec74af45..816cf1f308 100644 --- a/teshsuite/msg/app-bittorrent/bittorrent.h +++ b/teshsuite/msg/app-bittorrent/bittorrent.h @@ -16,13 +16,9 @@ /** Communication size for a task to the tracker */ #define TRACKER_COMM_SIZE 1 #define GET_PEERS_TIMEOUT 10000 -#define TIMEOUT_MESSAGE 10 -#define TRACKER_RECEIVE_TIMEOUT 10 /** Number of peers that can be unchocked at a given time */ #define MAX_UNCHOKED_PEERS 4 /** Interval between each update of the choked peers */ #define UPDATE_CHOKED_INTERVAL 30 -/** Number of pieces the peer asks for simultaneously */ -#define MAX_PIECES 1 #endif /* BITTORRENT_BITTORRENT_H_ */