Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill unused constants.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 26 Feb 2019 16:44:17 +0000 (17:44 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Feb 2019 14:26:19 +0000 (15:26 +0100)
examples/deprecated/msg/dht-kademlia/common.h
examples/s4u/app-bittorrent/s4u-bittorrent.hpp
examples/s4u/cloud-capping/s4u-cloud-capping.cpp
examples/s4u/dht-kademlia/s4u-dht-kademlia.hpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/VirtualMachineImpl.hpp
teshsuite/msg/app-bittorrent/bittorrent.h

index bb101f6..101f109 100644 (file)
@@ -8,8 +8,6 @@
 #define _KADEMLIA_EXAMPLES_COMMON
 #define max_join_trials 4
 
 #define _KADEMLIA_EXAMPLES_COMMON
 #define max_join_trials 4
 
-#define RECEIVE_TIMEOUT 1
-
 #define find_node_timeout 10
 #define find_node_global_timeout 50
 
 #define find_node_timeout 10
 #define find_node_global_timeout 50
 
@@ -17,7 +15,6 @@
 #define bucket_size 20
 
 #define identifier_size 32
 #define bucket_size 20
 
 #define identifier_size 32
-#define max_answers_to_ask 20
 
 #define random_lookup_interval 100
 
 
 #define random_lookup_interval 100
 
index 56222d1..d61f301 100644 (file)
@@ -10,7 +10,6 @@
 #include <simgrid/s4u.hpp>
 #include <xbt/RngStream.h>
 
 #include <simgrid/s4u.hpp>
 #include <xbt/RngStream.h>
 
-#define MAILBOX_SIZE 40
 #define TRACKER_MAILBOX "tracker_mailbox"
 /** Max number of peers sent by the tracker to clients */
 #define MAXIMUM_PEERS 50
 #define TRACKER_MAILBOX "tracker_mailbox"
 /** Max number of peers sent by the tracker to clients */
 #define MAXIMUM_PEERS 50
 /** Communication size for a task to the tracker */
 #define TRACKER_COMM_SIZE 1
 #define GET_PEERS_TIMEOUT 10000
 /** 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 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
 
 /** Message sizes
  * Sizes based on report by A. Legout et al, Understanding BitTorrent: An Experimental Perspective
index dd3c6ac..69f3323 100644 (file)
@@ -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);
 }
 
     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)
 {
 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;
   for (int i = 0; i < 10; i++) {
     if (speed > 0) {
       double new_bound = (speed / 10) * i;
index e1fedb7..a66c4a9 100644 (file)
@@ -14,10 +14,6 @@ class Answer;
 class Message;
 }
 
 class Message;
 }
 
-#define max_join_trials 4
-
-#define RECEIVE_TIMEOUT 1
-
 #define find_node_timeout 10
 #define find_node_global_timeout 50
 
 #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 BUCKET_SIZE 20
 
 #define identifier_size 32
-#define max_answers_to_ask 20
 
 #define random_lookup_interval 100
 
 
 #define random_lookup_interval 100
 
index 727bc34..6d3f9f1 100644 (file)
@@ -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. */
   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
   action_ = host_PM->pimpl_cpu->execution_start(0, core_amount);
 
   // It's empty for now, so it should not request resources in the PM
index 5d73502..f50b413 100644 (file)
@@ -13,9 +13,6 @@
 #ifndef VM_INTERFACE_HPP_
 #define VM_INTERFACE_HPP_
 
 #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 {
 
 namespace simgrid {
 namespace vm {
 
index 95ec74a..816cf1f 100644 (file)
 /** Communication size for a task to the tracker */
 #define TRACKER_COMM_SIZE 1
 #define GET_PEERS_TIMEOUT 10000
 /** 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 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_ */
 
 #endif /* BITTORRENT_BITTORRENT_H_ */