Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename parameters all around to make their meaning unambiguous
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 4 Apr 2015 15:15:31 +0000 (17:15 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 4 Apr 2015 15:49:27 +0000 (17:49 +0200)
30 files changed:
ChangeLog
examples/msg/ns3/ns3.c
include/msg/msg.h
include/simdag/simdag.h
include/simgrid/simix.h
src/bindings/java/jmsg_task.c
src/include/surf/surf.h
src/msg/msg_gos.c
src/msg/msg_io.c
src/msg/msg_mailbox.c
src/msg/msg_private.h
src/msg/msg_task.c
src/simdag/private.h
src/simdag/sd_task.c
src/simdag/sd_workstation.c
src/simix/libsmx.c
src/simix/popping_accessors.h
src/simix/popping_bodies.c
src/simix/simcalls.in
src/simix/smx_host.c
src/simix/smx_host_private.h
src/surf/surf_c_bindings.cpp
src/surf/vm_workstation_hl13.cpp
src/surf/vm_workstation_hl13.hpp
src/surf/workstation_clm03.cpp
src/surf/workstation_clm03.hpp
src/surf/workstation_interface.hpp
src/surf/workstation_ptask_L07.cpp
src/surf/workstation_ptask_L07.hpp
teshsuite/msg/storage/storage_basic.c

index a9f1513..6fe8a6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@ SimGrid (3.12) NOT RELEASED; urgency=low
  cMSG:
  * Interface improvement:
    - Rename MSG_host_is_avail(h) to MSG_host_is_on(h)
+   - Rename MSG_task_set_compute_duration(t) to MSG_task_set_flops_amount(t)
+   - Rename MSG_task_set_data_size(t) to MSG_task_set_bytes_amount(t)
+     Rename MSG_task_get_data_size(t) to MSG_task_get_bytes_amount(t)
    - Massive cleanups in the functions related to the energy
  jMSG:
  * Interface improvement:
index 31ef941..2b10ef2 100644 (file)
@@ -169,7 +169,7 @@ int slave(int argc, char *argv[])
   
   XBT_INFO("FLOW[%d] : Receive %.0f bytes from %s to %s",
       id,
-      MSG_task_get_data_size(task),
+      MSG_task_get_bytes_amount(task),
        masternames[id],
        slavenames[id]);
 //  MSG_task_execute(task);
index 32a2de4..3cad8f3 100644 (file)
@@ -218,17 +218,17 @@ XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process);
 
 /************************** Task handling ************************************/
 XBT_PUBLIC(msg_task_t) MSG_task_create(const char *name,
-                                     double compute_duration,
-                                     double message_size, void *data);
+                                     double flops_amount,
+                                     double bytes_amount, void *data);
 XBT_PUBLIC(msg_gpu_task_t) MSG_gpu_task_create(const char *name,
-                                     double compute_duration,
+                                     double flops_amount,
                                      double dispatch_latency,
                                      double collect_latency);
 XBT_PUBLIC(msg_task_t) MSG_parallel_task_create(const char *name,
                                               int host_nb,
                                               const msg_host_t * host_list,
-                                              double *computation_amount,
-                                              double *communication_amount,
+                                              double *flops_amount,
+                                              double *bytes_amount,
                                               void *data);
 XBT_PUBLIC(void *) MSG_task_get_data(msg_task_t task);
 XBT_PUBLIC(void) MSG_task_set_data(msg_task_t task, void *data);
@@ -256,15 +256,15 @@ XBT_PUBLIC(msg_error_t) MSG_process_join(msg_process_t process, double timeout);
 XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec);
 
 XBT_PUBLIC(double) MSG_task_get_compute_duration(msg_task_t task);
-XBT_PUBLIC(void) MSG_task_set_compute_duration(msg_task_t task,
-                                               double compute_duration);
-XBT_PUBLIC(void) MSG_task_set_data_size(msg_task_t task,
-                                        double data_size);
+XBT_PUBLIC(void) MSG_task_set_flops_amount(msg_task_t task,
+                                               double flops_amount);
+XBT_PUBLIC(void) MSG_task_set_bytes_amount(msg_task_t task,
+                                        double bytes_amount);
 
 XBT_PUBLIC(double) MSG_task_get_remaining_computation(msg_task_t task);
 XBT_PUBLIC(double) MSG_task_get_remaining_communication(msg_task_t task);
 XBT_PUBLIC(int) MSG_task_is_latency_bounded(msg_task_t task);
-XBT_PUBLIC(double) MSG_task_get_data_size(msg_task_t task);
+XBT_PUBLIC(double) MSG_task_get_bytes_amount(msg_task_t task);
 
 
 XBT_PUBLIC(msg_error_t)
index 31ed69d..de49070 100644 (file)
@@ -91,21 +91,17 @@ XBT_PUBLIC(void) SD_workstation_set_access_mode(SD_workstation_t
                                                 e_SD_workstation_access_mode_t
                                                 access_mode);
 
-XBT_PUBLIC(double) SD_workstation_get_computation_time(SD_workstation_t
-                                                       workstation,
-                                                       double
-                                                       computation_amount);
+XBT_PUBLIC(double) SD_workstation_get_computation_time(SD_workstation_t workstation,
+                                                       double flops_amount);
 XBT_PUBLIC(double) SD_route_get_current_latency(SD_workstation_t src,
                                                 SD_workstation_t dst);
 XBT_PUBLIC(double) SD_route_get_current_bandwidth(SD_workstation_t src,
                                                   SD_workstation_t dst);
 XBT_PUBLIC(double) SD_route_get_communication_time(SD_workstation_t src,
                                                    SD_workstation_t dst,
-                                                   double
-                                                   communication_amount);
+                                                   double bytes_amount);
 
-XBT_PUBLIC(SD_task_t) SD_workstation_get_current_task(SD_workstation_t
-                                                      workstation);
+XBT_PUBLIC(SD_task_t) SD_workstation_get_current_task(SD_workstation_t workstation);
 XBT_PUBLIC(xbt_dict_t)
     SD_workstation_get_mounted_storage_list(SD_workstation_t workstation);
 XBT_PUBLIC(xbt_dynar_t)
@@ -148,15 +144,14 @@ XBT_PUBLIC(double) SD_task_get_execution_time(SD_task_t task,
                                               int workstation_nb,
                                               const SD_workstation_t *
                                               workstation_list,
-                                              const double
-                                              *computation_amount, const double
-                                              *communication_amount);
+                                              const double *flops_amount,
+                                                                                         const double *bytes_amount);
 XBT_PUBLIC(int) SD_task_get_kind(SD_task_t task);
 XBT_PUBLIC(void) SD_task_schedule(SD_task_t task, int workstation_nb,
                                   const SD_workstation_t *
                                   workstation_list,
-                                  const double *computation_amount,
-                                  const double *communication_amount,
+                                  const double *flops_amount,
+                                  const double *bytes_amount,
                                   double rate);
 XBT_PUBLIC(void) SD_task_unschedule(SD_task_t task);
 XBT_PUBLIC(double) SD_task_get_start_time(SD_task_t task);
@@ -194,7 +189,7 @@ XBT_PUBLIC(void) SD_task_schedulel(SD_task_t task, int count, ...);
  *
  *  SD_task_schedule(task, my_workstation_nb,
  *                   my_workstation_list,
- *                   my_computation_amount,
+ *                   my_flops_amount,
  *                   SD_TASK_SCHED_NO_COST,
  *                   my_rate);
  */
index 0fac060..59eebe9 100644 (file)
@@ -321,13 +321,13 @@ XBT_PUBLIC(void) simcall_host_set_power_peak_at(smx_host_t host, int pstate_inde
 XBT_PUBLIC(double) simcall_host_get_consumed_energy(smx_host_t host);
 
 XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, smx_host_t host,
-                                                double computation_amount,
+                                                double flops_amount,
                                                 double priority, double bound, unsigned long affinity_mask);
 XBT_PUBLIC(smx_synchro_t) simcall_host_parallel_execute(const char *name,
                                                      int host_nb,
                                                      smx_host_t *host_list,
-                                                     double *computation_amount,
-                                                     double *communication_amount,
+                                                     double *flops_amount,
+                                                     double *bytes_amount,
                                                      double amount,
                                                      double rate);
 XBT_PUBLIC(void) simcall_host_execution_destroy(smx_synchro_t execution);
index 77aa315..07c3748 100644 (file)
@@ -353,7 +353,7 @@ Java_org_simgrid_msg_Task_setComputeDuration
     jxbt_throw_notbound(env, "task", jtask);
     return;
        }
-       MSG_task_set_compute_duration(task, (double) computationAmount);
+       MSG_task_set_flops_amount(task, (double) computationAmount);
 }
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Task_setDataSize
@@ -365,7 +365,7 @@ Java_org_simgrid_msg_Task_setDataSize
     return;
        }
         (*env)->SetDoubleField(env, jtask, jtask_field_Task_messageSize, dataSize);
-       MSG_task_set_data_size(task, (double) dataSize);
+       MSG_task_set_bytes_amount(task, (double) dataSize);
 }
 
 JNIEXPORT void JNICALL
index c9f19e8..6a887bc 100644 (file)
@@ -271,16 +271,16 @@ XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
  * @param model The model which handle the parallelisation
  * @param workstation_nb The number of workstations
  * @param workstation_list The list of workstations on which the task is executed
- * @param computation_amount The processing amount (in flop) needed to process
- * @param communication_amount The amount of data (in bytes) needed to transfer
+ * @param flops_amount The processing amount (in flop) needed to process
+ * @param bytes_amount The amount of data (in bytes) needed to transfer
  * @param rate [description]
  * @return The action corresponding to the parallele execution task
  */
 XBT_PUBLIC(surf_action_t) surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
                                                    int workstation_nb,
                                             void **workstation_list,
-                                            double *computation_amount,
-                                            double *communication_amount,
+                                            double *flops_amount,
+                                            double *bytes_amount,
                                             double rate);
 
 /**
index b36b3eb..1cb7988 100644 (file)
@@ -62,7 +62,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
 
   XBT_DEBUG("Computing on %s", MSG_process_get_name(MSG_process_self()));
 
-  if (simdata->computation_amount == 0 && !simdata->host_nb) {
+  if (simdata->flops_amount == 0 && !simdata->host_nb) {
 #ifdef HAVE_TRACING
     TRACE_msg_task_execute_end(task);
 #endif
@@ -80,8 +80,8 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
       simdata->compute = simcall_host_parallel_execute(task->name,
                                                        simdata->host_nb,
                                                        simdata->host_list,
-                                                       simdata->comp_amount,
-                                                       simdata->comm_amount,
+                                                       simdata->flops_parallel_amount,
+                                                       simdata->bytes_parallel_amount,
                                                        1.0, -1.0);
       XBT_DEBUG("Parallel execution action created: %p", simdata->compute);
     } else {
@@ -90,7 +90,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
 
       simdata->compute = simcall_host_execute(task->name,
                                               p_simdata->m_host,
-                                              simdata->computation_amount,
+                                              simdata->flops_amount,
                                               simdata->priority,
                                               simdata->bound,
                                               affinity_mask
@@ -127,7 +127,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
   }
   /* action ended, set comm and compute = NULL, the actions is already destroyed
    * in the main function */
-  simdata->computation_amount = 0.0;
+  simdata->flops_amount = 0.0;
   simdata->comm = NULL;
   simdata->compute = NULL;
 #ifdef HAVE_TRACING
@@ -436,7 +436,7 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
   msg_global->sent_msg++;
 
   /* Send it by calling SIMIX network layer */
-  smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->message_size,
+  smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->bytes_amount,
                                         t_simdata->rate, task, sizeof(void *),
                                         match_fun, cleanup, NULL, match_data,detached);
   t_simdata->comm = act; /* FIXME: is the field t_simdata->comm still useful? */
index a35e598..4e0971f 100644 (file)
@@ -111,10 +111,10 @@ sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
 
     m_host_list[0] = MSG_host_self();
     m_host_list[1] = attached_host;
-    double computation_amount[] = { 0, 0 };
-    double communication_amount[] = { 0, 0, (double)read_size, 0 };
+    double flops_amount[] = { 0, 0 };
+    double bytes_amount[] = { 0, 0, (double)read_size, 0 };
 
-    msg_task_t task = MSG_parallel_task_create("file transfer for read", 2, m_host_list, computation_amount, communication_amount, NULL);
+    msg_task_t task = MSG_parallel_task_create("file transfer for read", 2, m_host_list, flops_amount, bytes_amount, NULL);
     msg_error_t transfer = MSG_parallel_task_execute(task);
     MSG_task_destroy(task);
     free(m_host_list);
@@ -155,10 +155,10 @@ sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
 
     m_host_list[0] = MSG_host_self();
     m_host_list[1] = attached_host;
-    double computation_amount[] = { 0, 0 };
-    double communication_amount[] = { 0, (double)size, 0, 0 };
+    double flops_amount[] = { 0, 0 };
+    double bytes_amount[] = { 0, (double)size, 0, 0 };
 
-    msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, computation_amount, communication_amount, NULL);
+    msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, flops_amount, bytes_amount, NULL);
     msg_error_t transfer = MSG_parallel_task_execute(task);
     MSG_task_destroy(task);
     free(m_host_list);
@@ -366,10 +366,10 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
 
   m_host_list[0] = attached_host;
   m_host_list[1] = host_dest;
-  double computation_amount[] = { 0, 0 };
-  double communication_amount[] = { 0, (double)read_size, 0, 0 };
+  double flops_amount[] = { 0, 0 };
+  double bytes_amount[] = { 0, (double)read_size, 0, 0 };
 
-  msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, computation_amount, communication_amount, NULL);
+  msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, flops_amount, bytes_amount, NULL);
   msg_error_t transfer = MSG_parallel_task_execute(task);
   MSG_task_destroy(task);
   free(m_host_list);
index 53f99df..0ef4c21 100644 (file)
@@ -207,7 +207,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
   /* Try to send it by calling SIMIX network layer */
   TRY {
     smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simix call  */
-    comm = simcall_comm_isend(SIMIX_process_self(), mailbox,t_simdata->message_size,
+    comm = simcall_comm_isend(SIMIX_process_self(), mailbox,t_simdata->bytes_amount,
                                   t_simdata->rate, task, sizeof(void *),
                                   NULL, NULL, NULL, task, 0);
 #ifdef HAVE_TRACING
index c6c17a3..9850e62 100644 (file)
@@ -41,8 +41,8 @@ SG_BEGIN_DECL()
 typedef struct simdata_task {
   smx_synchro_t compute;         /* SIMIX modeling of computation */
   smx_synchro_t comm;            /* SIMIX modeling of communication */
-  double message_size;          /* Data size */
-  double computation_amount;    /* Computation size */
+  double bytes_amount;    /* Data size */
+  double flops_amount;    /* Computation size */
   msg_process_t sender;
   msg_process_t receiver;
   msg_host_t source;
@@ -57,8 +57,8 @@ typedef struct simdata_task {
   int host_nb;                  /* ==0 if sequential task; parallel task if not */
   /*******  Parallel Tasks Only !!!! *******/
   smx_host_t *host_list;
-  double *comp_amount;
-  double *comm_amount;
+  double *flops_parallel_amount;
+  double *bytes_parallel_amount;
 } s_simdata_task_t;
 
 /********************************* File **************************************/
@@ -68,7 +68,7 @@ typedef struct simdata_file {
 
 /*************** Begin GPU ***************/
 typedef struct simdata_gpu_task {
-  double computation_amount;    /* Computation size */
+  double flops_amount;    /* Computation size */
   double dispatch_latency;
   double collect_latency;
   int isused;  /* Indicates whether the task is used in SIMIX currently */
index 2488dac..aa71c5e 100644 (file)
@@ -31,7 +31,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg,
    corresponding object.
  * \param name a name for the object. It is for user-level information
    and can be NULL.
- * \param compute_duration a value of the processing amount (in flop)
+ * \param flop_amount a value of the processing amount (in flop)
    needed to process this new task. If 0, then it cannot be executed with
    MSG_task_execute(). This value has to be >=0.
  * \param message_size a value of the amount of data (in bytes) needed to
@@ -43,7 +43,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg,
  * \see msg_task_t
  * \return The new corresponding object.
  */
-msg_task_t MSG_task_create(const char *name, double compute_duration,
+msg_task_t MSG_task_create(const char *name, double flop_amount,
                          double message_size, void *data)
 {
   msg_task_t task = xbt_new(s_msg_task_t, 1);
@@ -57,8 +57,8 @@ msg_task_t MSG_task_create(const char *name, double compute_duration,
   /* Simulator Data */
   simdata->compute = NULL;
   simdata->comm = NULL;
-  simdata->message_size = message_size;
-  simdata->computation_amount = compute_duration;
+  simdata->bytes_amount = message_size;
+  simdata->flops_amount = flop_amount;
   simdata->sender = NULL;
   simdata->receiver = NULL;
   simdata->source = NULL;
@@ -70,8 +70,8 @@ msg_task_t MSG_task_create(const char *name, double compute_duration,
 
   simdata->host_nb = 0;
   simdata->host_list = NULL;
-  simdata->comp_amount = NULL;
-  simdata->comm_amount = NULL;
+  simdata->flops_parallel_amount = NULL;
+  simdata->bytes_parallel_amount = NULL;
 #ifdef HAVE_TRACING
   TRACE_msg_task_create(task);
 #endif
@@ -88,21 +88,20 @@ msg_task_t MSG_task_create(const char *name, double compute_duration,
  and can be NULL.
  * \param host_nb the number of hosts implied in the parallel task.
  * \param host_list an array of \p host_nb msg_host_t.
- * \param computation_amount an array of \p host_nb
- doubles. computation_amount[i] is the total number of operations
- that have to be performed on host_list[i].
- * \param communication_amount an array of \p host_nb* \p host_nb doubles.
- * \param data a pointer to any data may want to attach to the new
- object.  It is for user-level information and can be NULL. It can
- be retrieved with the function \ref MSG_task_get_data.
+ * \param flops_amount an array of \p host_nb doubles.
+ *                     flops_amount[i] is the total number of operations that have to be performed on host_list[i].
+ * \param bytes_amount an array of \p host_nb* \p host_nb doubles.
+ * \param data a pointer to any data may want to attach to the new object.
+ *             It is for user-level information and can be NULL.
+ *             It can be retrieved with the function \ref MSG_task_get_data.
  * \see msg_task_t
  * \return The new corresponding object.
  */
 msg_task_t
 MSG_parallel_task_create(const char *name, int host_nb,
                          const msg_host_t * host_list,
-                         double *computation_amount,
-                         double *communication_amount, void *data)
+                         double *flops_amount,
+                         double *bytes_amount, void *data)
 {
   msg_task_t task = MSG_task_create(name, 0, 0, data);
   simdata_task_t simdata = task->simdata;
@@ -111,8 +110,8 @@ MSG_parallel_task_create(const char *name, int host_nb,
   /* Simulator Data specific to parallel tasks */
   simdata->host_nb = host_nb;
   simdata->host_list = xbt_new0(smx_host_t, host_nb);
-  simdata->comp_amount = computation_amount;
-  simdata->comm_amount = communication_amount;
+  simdata->flops_parallel_amount = flops_amount;
+  simdata->bytes_parallel_amount = bytes_amount;
 
   for (i = 0; i < host_nb; i++)
     simdata->host_list[i] = host_list[i];
@@ -130,7 +129,7 @@ MSG_parallel_task_create(const char *name, int host_nb,
  * \param name a name for the object. It is for user-level information
    and can be NULL.
 
- * \param compute_duration a value of the processing amount (in flop)
+ * \param flops_amount a value of the processing amount (in flop)
    needed to process this new task. If 0, then it cannot be executed with
    MSG_gpu_task_execute(). This value has to be >=0.
 
@@ -142,7 +141,7 @@ MSG_parallel_task_create(const char *name, int host_nb,
  * \see msg_gpu_task_t
  * \return The new corresponding object.
  */
-msg_gpu_task_t MSG_gpu_task_create(const char *name, double compute_duration,
+msg_gpu_task_t MSG_gpu_task_create(const char *name, double flops_amount,
                          double dispatch_latency, double collect_latency)
 {
   msg_gpu_task_t task = xbt_new(s_msg_gpu_task_t, 1);
@@ -152,7 +151,7 @@ msg_gpu_task_t MSG_gpu_task_create(const char *name, double compute_duration,
   task->name = xbt_strdup(name);
 
   /* Simulator Data */
-  simdata->computation_amount = compute_duration;
+  simdata->flops_amount = flops_amount;
   simdata->dispatch_latency   = dispatch_latency;
   simdata->collect_latency    = collect_latency;
 
@@ -329,7 +328,7 @@ double MSG_task_get_compute_duration(msg_task_t task)
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 
-  return task->simdata->computation_amount;
+  return task->simdata->flops_amount;
 }
 
 
@@ -337,17 +336,14 @@ double MSG_task_get_compute_duration(msg_task_t task)
  * \brief set the computation amount needed to process a task #msg_task_t.
  *
  * \warning If the computation is ongoing (already started and not finished),
- * it is not modified by this call. And the termination of the ongoing task with
- * set the computation_amount to zero, overriding any value set during the
- * execution.
+ * it is not modified by this call. Moreover, after its completion, the ongoing
+ * execution with set the flops_amount to zero, overriding any value set during
+ * the execution.
  */
 
-void MSG_task_set_compute_duration(msg_task_t task,
-                                   double computation_amount)
+void MSG_task_set_flops_amount(msg_task_t task, double flops_amount)
 {
-  xbt_assert(task, "Invalid parameter");
-  task->simdata->computation_amount = computation_amount;
-
+  task->simdata->flops_amount = flops_amount;
 }
 
 /** \ingroup m_task_management
@@ -357,12 +353,9 @@ void MSG_task_set_compute_duration(msg_task_t task,
  * it is not modified by this call.
  */
 
-void MSG_task_set_data_size(msg_task_t task,
-                                   double data_size)
+void MSG_task_set_bytes_amount(msg_task_t task, double data_size)
 {
-  xbt_assert(task, "Invalid parameter");
-  task->simdata->message_size = data_size;
-
+  task->simdata->bytes_amount = data_size;
 }
 
 
@@ -382,7 +375,7 @@ double MSG_task_get_remaining_computation(msg_task_t task)
   if (task->simdata->compute) {
     return simcall_host_execution_get_remains(task->simdata->compute);
   } else {
-    return task->simdata->computation_amount;
+    return task->simdata->flops_amount;
   }
 }
 
@@ -420,12 +413,12 @@ int MSG_task_is_latency_bounded(msg_task_t task)
  * \brief Returns the size of the data attached to a task #msg_task_t.
  *
  */
-double MSG_task_get_data_size(msg_task_t task)
+double MSG_task_get_bytes_amount(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 
-  return task->simdata->message_size;
+  return task->simdata->bytes_amount;
 }
 
 
index ada782b..2e44ca8 100644 (file)
@@ -110,8 +110,8 @@ typedef struct SD_task {
   /* scheduling parameters (only exist in state SD_SCHEDULED) */
   int workstation_nb;
   SD_workstation_t *workstation_list;   /* surf workstations */
-  double *computation_amount;
-  double *communication_amount;
+  double *flops_amount;
+  double *bytes_amount;
   double rate;
 
 #ifdef HAVE_TRACING
index 9c00ca4..7603ffc 100644 (file)
@@ -55,8 +55,8 @@ void SD_task_recycle_f(void *t)
   /* scheduling parameters */
   task->workstation_nb = 0;
   task->workstation_list = NULL;
-  task->computation_amount = NULL;
-  task->communication_amount = NULL;
+  task->flops_amount = NULL;
+  task->bytes_amount = NULL;
   task->rate = -1;
 }
 
@@ -102,8 +102,8 @@ static XBT_INLINE SD_task_t SD_task_create_sized(const char *name,
                                                  int ws_count)
 {
   SD_task_t task = SD_task_create(name, data, amount);
-  task->communication_amount = xbt_new0(double, ws_count * ws_count);
-  task->computation_amount = xbt_new0(double, ws_count);
+  task->bytes_amount = xbt_new0(double, ws_count * ws_count);
+  task->flops_amount = xbt_new0(double, ws_count);
   task->workstation_nb = ws_count;
   task->workstation_list = xbt_new0(SD_workstation_t, ws_count);
   return task;
@@ -123,7 +123,7 @@ SD_task_t SD_task_create_comm_e2e(const char *name, void *data,
                                   double amount)
 {
   SD_task_t res = SD_task_create_sized(name, data, amount, 2);
-  res->communication_amount[2] = amount;
+  res->bytes_amount[2] = amount;
   res->kind = SD_TASK_COMM_E2E;
 
 #ifdef HAVE_TRACING
@@ -146,14 +146,14 @@ SD_task_t SD_task_create_comm_e2e(const char *name, void *data,
  *
  * \param name the name of the task (can be \c NULL)
  * \param data the user data you want to associate with the task (can be \c NULL)
- * \param amount amount of compute work to be done by the task
+ * \param flops_amount amount of compute work to be done by the task
  * \return the new SD_TASK_COMP_SEQ typed task
  */
 SD_task_t SD_task_create_comp_seq(const char *name, void *data,
-                                  double amount)
+                                  double flops_amount)
 {
-  SD_task_t res = SD_task_create_sized(name, data, amount, 1);
-  res->computation_amount[0] = amount;
+  SD_task_t res = SD_task_create_sized(name, data, flops_amount, 1);
+  res->flops_amount[0] = flops_amount;
   res->kind = SD_TASK_COMP_SEQ;
 
 #ifdef HAVE_TRACING
@@ -177,17 +177,17 @@ return res;
  * first.
  * \param name the name of the task (can be \c NULL)
  * \param data the user data you want to associate with the task (can be \c NULL)
- * \param amount amount of compute work to be done by the task
+ * \param flops_amount amount of compute work to be done by the task
  * \param alpha purely serial fraction of the work to be done (in [0.;1.[)
  * \return the new task
  */
 SD_task_t SD_task_create_comp_par_amdahl(const char *name, void *data,
-                                  double amount, double alpha)
+                                  double flops_amount, double alpha)
 {
   xbt_assert(alpha < 1. && alpha >= 0.,
               "Invalid parameter: alpha must be in [0.;1.[");
   
-  SD_task_t res = SD_task_create(name, data, amount);
+  SD_task_t res = SD_task_create(name, data, flops_amount);
   res->alpha = alpha;
   res->kind = SD_TASK_COMP_PAR_AMDAHL;
 
@@ -260,8 +260,8 @@ void SD_task_destroy(SD_task_t task)
        surf_action_unref(task->surf_action);
 
   xbt_free(task->workstation_list);
-  xbt_free(task->communication_amount);
-  xbt_free(task->computation_amount);
+  xbt_free(task->bytes_amount);
+  xbt_free(task->flops_amount);
 
 #ifdef HAVE_TRACING
   TRACE_sd_task_destroy(task);
@@ -476,7 +476,7 @@ double SD_task_get_amount(SD_task_t task)
 /**
  * \brief Sets the total amount of work of a task
  * For sequential typed tasks (COMP_SEQ and COMM_E2E), it also sets the
- * appropriate values in the computation_amount and communication_amount arrays
+ * appropriate values in the flops_amount and bytes_amount arrays
  * respectively. Nothing more than modifying task->amount is done for paralle
  * typed tasks (COMP_PAR_AMDAHL and COMM_PAR_MXN_1D_BLOCK) as the distribution
  * of the amount of work is done at scheduling time.
@@ -488,9 +488,9 @@ void SD_task_set_amount(SD_task_t task, double amount)
 {
   task->amount = amount;
   if (task->kind == SD_TASK_COMP_SEQ)
-    task->computation_amount[0] = amount;
+    task->flops_amount[0] = amount;
   if (task->kind == SD_TASK_COMM_E2E)
-    task->communication_amount[2] = amount;
+    task->bytes_amount[2] = amount;
 }
 
 /**
@@ -923,16 +923,16 @@ void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state)
  * \param task the task to evaluate
  * \param workstation_nb number of workstations on which the task would be executed
  * \param workstation_list the workstations on which the task would be executed
- * \param computation_amount computation amount for each workstation
- * \param communication_amount communication amount between each pair of workstations
+ * \param flops_amount computation amount for each workstation
+ * \param bytes_amount communication amount between each pair of workstations
  * \see SD_schedule()
  */
 double SD_task_get_execution_time(SD_task_t task,
                                   int workstation_nb,
                                   const SD_workstation_t *
                                   workstation_list,
-                                  const double *computation_amount,
-                                  const double *communication_amount)
+                                  const double *flops_amount,
+                                  const double *bytes_amount)
 {
   double time, max_time = 0.0;
   int i, j;
@@ -942,17 +942,17 @@ double SD_task_get_execution_time(SD_task_t task,
 
   for (i = 0; i < workstation_nb; i++) {
     time = 0.0;
-    if (computation_amount != NULL)
+    if (flops_amount != NULL)
       time =
           SD_workstation_get_computation_time(workstation_list[i],
-                                              computation_amount[i]);
+                                              flops_amount[i]);
 
-    if (communication_amount != NULL)
+    if (bytes_amount != NULL)
       for (j = 0; j < workstation_nb; j++) {
         time +=
             SD_route_get_communication_time(workstation_list[i],
                                             workstation_list[j],
-                                            communication_amount[i *
+                                            bytes_amount[i *
                                                                  workstation_nb
                                                                  + j]);
       }
@@ -987,15 +987,15 @@ static XBT_INLINE void SD_task_do_schedule(SD_task_t task)
  * \param task the task you want to schedule
  * \param workstation_count number of workstations on which the task will be executed
  * \param workstation_list the workstations on which the task will be executed
- * \param computation_amount computation amount for each workstation
- * \param communication_amount communication amount between each pair of workstations
+ * \param flops_amount computation amount for each workstation
+ * \param bytes_amount communication amount between each pair of workstations
  * \param rate task execution speed rate
  * \see SD_task_unschedule()
  */
 void SD_task_schedule(SD_task_t task, int workstation_count,
                       const SD_workstation_t * workstation_list,
-                      const double *computation_amount,
-                      const double *communication_amount, double rate)
+                      const double *flops_amount,
+                      const double *bytes_amount, double rate)
 {
   int communication_nb;
   task->workstation_nb = 0;
@@ -1005,25 +1005,25 @@ void SD_task_schedule(SD_task_t task, int workstation_count,
   task->workstation_nb = workstation_count;
   task->rate = rate;
 
-  if (computation_amount) {
-    task->computation_amount = xbt_realloc(task->computation_amount,
+  if (flops_amount) {
+    task->flops_amount = xbt_realloc(task->flops_amount,
                                            sizeof(double) * workstation_count);
-    memcpy(task->computation_amount, computation_amount,
+    memcpy(task->flops_amount, flops_amount,
            sizeof(double) * workstation_count);
   } else {
-    xbt_free(task->computation_amount);
-    task->computation_amount = NULL;
+    xbt_free(task->flops_amount);
+    task->flops_amount = NULL;
   }
 
   communication_nb = workstation_count * workstation_count;
-  if (communication_amount) {
-    task->communication_amount = xbt_realloc(task->communication_amount,
+  if (bytes_amount) {
+    task->bytes_amount = xbt_realloc(task->bytes_amount,
                                              sizeof(double) * communication_nb);
-    memcpy(task->communication_amount, communication_amount,
+    memcpy(task->bytes_amount, bytes_amount,
            sizeof(double) * communication_nb);
   } else {
-    xbt_free(task->communication_amount);
-    task->communication_amount = NULL;
+    xbt_free(task->bytes_amount);
+    task->bytes_amount = NULL;
   }
 
   task->workstation_list =
@@ -1087,9 +1087,9 @@ static void __SD_task_destroy_scheduling_data(SD_task_t task)
            "Task '%s' must be SD_SCHEDULED, SD_RUNNABLE or SD_IN_FIFO",
            SD_task_get_name(task));
 
-  xbt_free(task->computation_amount);
-  xbt_free(task->communication_amount);
-  task->computation_amount = task->communication_amount = NULL;
+  xbt_free(task->flops_amount);
+  xbt_free(task->bytes_amount);
+  task->flops_amount = task->bytes_amount = NULL;
 }
 
 /* Runs a task. This function is directly called by __SD_task_try_to_run if
@@ -1134,22 +1134,22 @@ void __SD_task_really_run(SD_task_t task)
   for (i = 0; i < workstation_nb; i++)
     surf_workstations[i] =  surf_workstation_resource_priv(task->workstation_list[i]);
 
-  double *computation_amount = xbt_new0(double, workstation_nb);
-  double *communication_amount = xbt_new0(double, workstation_nb * workstation_nb);
+  double *flops_amount = xbt_new0(double, workstation_nb);
+  double *bytes_amount = xbt_new0(double, workstation_nb * workstation_nb);
 
 
-  if(task->computation_amount)
-    memcpy(computation_amount, task->computation_amount, sizeof(double) *
+  if(task->flops_amount)
+    memcpy(flops_amount, task->flops_amount, sizeof(double) *
            workstation_nb);
-  if(task->communication_amount)
-    memcpy(communication_amount, task->communication_amount,
+  if(task->bytes_amount)
+    memcpy(bytes_amount, task->bytes_amount,
            sizeof(double) * workstation_nb * workstation_nb);
 
   task->surf_action = surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
                                                                     workstation_nb,
                                                                     surf_workstations,
-                                                                    computation_amount,
-                                                                    communication_amount,
+                                                                    flops_amount,
+                                                                    bytes_amount,
                                                                     task->rate);
 
   surf_action_set_data(task->surf_action, task);
@@ -1432,14 +1432,14 @@ void SD_task_distribute_comp_amdahl(SD_task_t task, int ws_count)
               "Task %s is not a SD_TASK_COMP_PAR_AMDAHL typed task."
               "Cannot use this function.",
               SD_task_get_name(task));  
-  task->computation_amount = xbt_new0(double, ws_count);
-  task->communication_amount = xbt_new0(double, ws_count * ws_count);
+  task->flops_amount = xbt_new0(double, ws_count);
+  task->bytes_amount = xbt_new0(double, ws_count * ws_count);
   xbt_free(task->workstation_list);
   task->workstation_nb = ws_count;
   task->workstation_list = xbt_new0(SD_workstation_t, ws_count);
   
   for(i=0;i<ws_count;i++){
-    task->computation_amount[i] = 
+    task->flops_amount[i] = 
       (task->alpha + (1 - task->alpha)/ws_count) * task->amount;
   }
 } 
@@ -1485,10 +1485,10 @@ void SD_task_schedulev(SD_task_t task, int count,
                count,task->workstation_nb);
     for (i = 0; i < count; i++)
       task->workstation_list[i] = list[i];
-    if (SD_task_get_kind(task)== SD_TASK_COMP_SEQ && !task->computation_amount){
-      /*This task has failed and is rescheduled. Reset the computation amount*/
-      task->computation_amount = xbt_new0(double, 1);
-      task->computation_amount[0] = task->remains;
+    if (SD_task_get_kind(task)== SD_TASK_COMP_SEQ && !task->flops_amount){
+      /*This task has failed and is rescheduled. Reset the flops_amount*/
+      task->flops_amount = xbt_new0(double, 1);
+      task->flops_amount[0] = task->remains;
     }
     SD_task_do_schedule(task);
     break;
@@ -1501,7 +1501,7 @@ void SD_task_schedulev(SD_task_t task, int count,
           SD_task_get_name(task),
           SD_workstation_get_name(task->workstation_list[0]),
           SD_workstation_get_name(task->workstation_list[1]),
-          task->communication_amount[2]);
+          task->bytes_amount[2]);
 
   }
 
@@ -1511,7 +1511,7 @@ void SD_task_schedulev(SD_task_t task, int count,
     XBT_VERB("Schedule computation task %s on %s. It costs %.f flops",
           SD_task_get_name(task),
           SD_workstation_get_name(task->workstation_list[0]),
-          task->computation_amount[0]);
+          task->flops_amount[0]);
 
     xbt_dynar_foreach(task->tasks_before, cpt, dep) {
       SD_task_t before = dep->src;
@@ -1527,7 +1527,7 @@ void SD_task_schedulev(SD_task_t task, int count,
                SD_task_get_name(before),
                SD_workstation_get_name(before->workstation_list[0]),
                SD_workstation_get_name(before->workstation_list[1]),
-               before->communication_amount[2]);
+               before->bytes_amount[2]);
         }
       }
     }
@@ -1544,7 +1544,7 @@ void SD_task_schedulev(SD_task_t task, int count,
                SD_task_get_name(after),
                SD_workstation_get_name(after->workstation_list[0]),
                SD_workstation_get_name(after->workstation_list[1]),
-               after->communication_amount[2]);
+               after->bytes_amount[2]);
 
         }
       }
@@ -1556,7 +1556,7 @@ void SD_task_schedulev(SD_task_t task, int count,
     XBT_VERB("Schedule computation task %s on %d workstations. %.f flops"
              " will be distributed following Amdahl's Law",
           SD_task_get_name(task), task->workstation_nb,
-          task->computation_amount[0]);
+          task->flops_amount[0]);
     xbt_dynar_foreach(task->tasks_before, cpt, dep) {
       SD_task_t before = dep->src;
       if (before->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK){
@@ -1584,11 +1584,11 @@ void SD_task_schedulev(SD_task_t task, int count,
                task->workstation_list[i];
 
           before->workstation_nb += count;
-          xbt_free(before->computation_amount);
-          xbt_free(before->communication_amount);
-          before->computation_amount = xbt_new0(double,
+          xbt_free(before->flops_amount);
+          xbt_free(before->bytes_amount);
+          before->flops_amount = xbt_new0(double,
                                                 before->workstation_nb);
-          before->communication_amount = xbt_new0(double,
+          before->bytes_amount = xbt_new0(double,
                                                   before->workstation_nb*
                                                   before->workstation_nb);
 
@@ -1603,13 +1603,13 @@ void SD_task_schedulev(SD_task_t task, int count,
                   SD_workstation_get_name(before->workstation_list[src_nb+j]),
                   src_start, src_end, dst_start, dst_end);
               if ((src_end <= dst_start) || (dst_end <= src_start)) {
-                before->communication_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
+                before->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
               } else {
-                before->communication_amount[i*(src_nb+dst_nb)+src_nb+j] =
+                before->bytes_amount[i*(src_nb+dst_nb)+src_nb+j] =
                   MIN(src_end, dst_end) - MAX(src_start, dst_start);
               }
               XBT_VERB("==> %.2f",
-                 before->communication_amount[i*(src_nb+dst_nb)+src_nb+j]);
+                 before->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]);
             }
           }
 
@@ -1650,11 +1650,11 @@ void SD_task_schedulev(SD_task_t task, int count,
 
           after->workstation_nb += count;
 
-          xbt_free(after->computation_amount);
-          xbt_free(after->communication_amount);
+          xbt_free(after->flops_amount);
+          xbt_free(after->bytes_amount);
 
-          after->computation_amount = xbt_new0(double, after->workstation_nb);
-          after->communication_amount = xbt_new0(double,
+          after->flops_amount = xbt_new0(double, after->workstation_nb);
+          after->bytes_amount = xbt_new0(double,
                                                  after->workstation_nb*
                                                  after->workstation_nb);
 
@@ -1667,13 +1667,13 @@ void SD_task_schedulev(SD_task_t task, int count,
               XBT_VERB("(%d->%d): (%.2f, %.2f)-> (%.2f, %.2f)",
                   i, j, src_start, src_end, dst_start, dst_end);
               if ((src_end <= dst_start) || (dst_end <= src_start)) {
-                after->communication_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
+                after->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
               } else {
-                after->communication_amount[i*(src_nb+dst_nb)+src_nb+j] =
+                after->bytes_amount[i*(src_nb+dst_nb)+src_nb+j] =
                    MIN(src_end, dst_end)- MAX(src_start, dst_start);
               }
               XBT_VERB("==> %.2f",
-                 after->communication_amount[i*(src_nb+dst_nb)+src_nb+j]);
+                 after->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]);
             }
           }
 
index 428c71a..01aff11 100644 (file)
@@ -308,15 +308,15 @@ double SD_workstation_get_available_power(SD_workstation_t workstation)
  * \brief Returns an approximative estimated time for the given computation amount on a workstation
  *
  * \param workstation a workstation
- * \param computation_amount the computation amount you want to evaluate (in flops)
+ * \param flops_amount the computation amount you want to evaluate (in flops)
  * \return an approximative estimated computation time for the given computation amount on this workstation (in seconds)
  */
 double SD_workstation_get_computation_time(SD_workstation_t workstation,
-                                           double computation_amount)
+                                           double flops_amount)
 {
-  xbt_assert(computation_amount >= 0,
-              "computation_amount must be greater than or equal to zero");
-  return computation_amount / SD_workstation_get_power(workstation);
+  xbt_assert(flops_amount >= 0,
+              "flops_amount must be greater than or equal to zero");
+  return flops_amount / SD_workstation_get_power(workstation);
 }
 
 /**
@@ -386,13 +386,13 @@ double SD_route_get_current_bandwidth(SD_workstation_t src,
  *
  * \param src the first workstation
  * \param dst the second workstation
- * \param communication_amount the communication amount you want to evaluate (in bytes)
- * \return an approximative estimated computation time for the given communication amount
+ * \param bytes_amount the communication amount you want to evaluate (in bytes)
+ * \return an approximative estimated communication time for the given bytes amount
  * between the workstations (in seconds)
  */
 double SD_route_get_communication_time(SD_workstation_t src,
                                        SD_workstation_t dst,
-                                       double communication_amount)
+                                       double bytes_amount)
 {
 
 
@@ -405,12 +405,10 @@ double SD_route_get_communication_time(SD_workstation_t src,
   double latency;
   int i;
 
-  xbt_assert(communication_amount >= 0,
-              "communication_amount must be greater than or equal to zero");
+  xbt_assert(bytes_amount >= 0, "bytes_amount must be greater than or equal to zero");
 
 
-
-  if (communication_amount == 0.0)
+  if (bytes_amount == 0.0)
     return 0.0;
 
   links = SD_route_get_list(src, dst);
@@ -425,7 +423,7 @@ double SD_route_get_communication_time(SD_workstation_t src,
       min_bandwidth = bandwidth;
   }
 
-  return latency + (communication_amount / min_bandwidth);
+  return latency + (bytes_amount / min_bandwidth);
 }
 
 /**
index eb50d4d..b4bc985 100644 (file)
@@ -223,21 +223,21 @@ double simcall_host_get_consumed_energy(smx_host_t host)
  *
  * \param name Name of the execution synchro to create
  * \param host SIMIX host where the synchro will be executed
- * \param computation_amount amount Computation amount (in bytes)
+ * \param flops_amount amount Computation amount (in flops)
  * \param priority computation priority
  * \param bound
  * \param affinity_mask
  * \return A new SIMIX execution synchronization
  */
 smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
-                                    double computation_amount,
+                                    double flops_amount,
                                     double priority, double bound, unsigned long affinity_mask)
 {
   /* checking for infinite values */
-  xbt_assert(isfinite(computation_amount), "computation_amount is not finite!");
+  xbt_assert(isfinite(flops_amount), "flops_amount is not finite!");
   xbt_assert(isfinite(priority), "priority is not finite!");
 
-  return simcall_BODY_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
+  return simcall_BODY_host_execute(name, host, flops_amount, priority, bound, affinity_mask);
 }
 
 /**
@@ -248,8 +248,8 @@ smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
  * \param name Name of the execution synchro to create
  * \param host_nb Number of hosts where the synchro will be executed
  * \param host_list Array (of size host_nb) of hosts where the synchro will be executed
- * \param computation_amount Array (of size host_nb) of computation amount of hosts (in bytes)
- * \param communication_amount Array (of size host_nb * host_nb) representing the communication
+ * \param flops_amount Array (of size host_nb) of computation amount of hosts (in bytes)
+ * \param bytes_amount Array (of size host_nb * host_nb) representing the communication
  * amount between each pair of hosts
  * \param amount the SURF action amount
  * \param rate the SURF action rate
@@ -258,18 +258,18 @@ smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
 smx_synchro_t simcall_host_parallel_execute(const char *name,
                                          int host_nb,
                                          smx_host_t *host_list,
-                                         double *computation_amount,
-                                         double *communication_amount,
+                                         double *flops_amount,
+                                         double *bytes_amount,
                                          double amount,
                                          double rate)
 {
   int i,j;
   /* checking for infinite values */
   for (i = 0 ; i < host_nb ; ++i) {
-     xbt_assert(isfinite(computation_amount[i]), "computation_amount[%d] is not finite!", i);
+     xbt_assert(isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
      for (j = 0 ; j < host_nb ; ++j) {
-        xbt_assert(isfinite(communication_amount[i + host_nb * j]),
-             "communication_amount[%d+%d*%d] is not finite!", i, host_nb, j);
+        xbt_assert(isfinite(bytes_amount[i + host_nb * j]),
+             "bytes_amount[%d+%d*%d] is not finite!", i, host_nb, j);
      }
   }
 
@@ -277,8 +277,8 @@ smx_synchro_t simcall_host_parallel_execute(const char *name,
   xbt_assert(isfinite(rate), "rate is not finite!");
 
   return simcall_BODY_host_parallel_execute(name, host_nb, host_list,
-                                            computation_amount,
-                                            communication_amount,
+                                            flops_amount,
+                                            bytes_amount,
                                             amount, rate);
 
 }
index de024d6..6e013fe 100644 (file)
@@ -215,10 +215,10 @@ static inline smx_host_t simcall_host_execute__get__host(smx_simcall_t simcall)
 static inline void simcall_host_execute__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline double simcall_host_execute__get__computation_amount(smx_simcall_t simcall) {
+static inline double simcall_host_execute__get__flops_amount(smx_simcall_t simcall) {
   return  simcall->args[2].d;
 }
-static inline void simcall_host_execute__set__computation_amount(smx_simcall_t simcall, double arg) {
+static inline void simcall_host_execute__set__flops_amount(smx_simcall_t simcall, double arg) {
     simcall->args[2].d = arg;
 }
 static inline double simcall_host_execute__get__priority(smx_simcall_t simcall) {
@@ -264,16 +264,16 @@ static inline smx_host_t* simcall_host_parallel_execute__get__host_list(smx_simc
 static inline void simcall_host_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline double* simcall_host_parallel_execute__get__computation_amount(smx_simcall_t simcall) {
+static inline double* simcall_host_parallel_execute__get__flops_amount(smx_simcall_t simcall) {
   return (double*) simcall->args[3].dp;
 }
-static inline void simcall_host_parallel_execute__set__computation_amount(smx_simcall_t simcall, void* arg) {
+static inline void simcall_host_parallel_execute__set__flops_amount(smx_simcall_t simcall, void* arg) {
     simcall->args[3].dp = arg;
 }
-static inline double* simcall_host_parallel_execute__get__communication_amount(smx_simcall_t simcall) {
+static inline double* simcall_host_parallel_execute__get__bytes_amount(smx_simcall_t simcall) {
   return (double*) simcall->args[4].dp;
 }
-static inline void simcall_host_parallel_execute__set__communication_amount(smx_simcall_t simcall, void* arg) {
+static inline void simcall_host_parallel_execute__set__bytes_amount(smx_simcall_t simcall, void* arg) {
     simcall->args[4].dp = arg;
 }
 static inline double simcall_host_parallel_execute__get__amount(smx_simcall_t simcall) {
index 81efa33..a5c3240 100644 (file)
@@ -334,11 +334,11 @@ inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
     return self->simcall.result.d;
   }
   
-inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
+inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
+    if (0) SIMIX_host_execute(name, host, flops_amount, priority, bound, affinity_mask);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTE;
@@ -346,7 +346,7 @@ inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
     self->simcall.args[0].cc = (const char*) name;
     self->simcall.args[1].dp = (void*) host;
-    self->simcall.args[2].d = (double) computation_amount;
+    self->simcall.args[2].d = (double) flops_amount;
     self->simcall.args[3].d = (double) priority;
     self->simcall.args[4].d = (double) bound;
     self->simcall.args[5].ul = (unsigned long) affinity_mask;
@@ -360,11 +360,11 @@ inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host
     return self->simcall.result.dp;
   }
   
-inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
+inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
+    if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
@@ -373,8 +373,8 @@ inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name,
     self->simcall.args[0].cc = (const char*) name;
     self->simcall.args[1].i = (int) host_nb;
     self->simcall.args[2].dp = (void*) host_list;
-    self->simcall.args[3].dp = (void*) computation_amount;
-    self->simcall.args[4].dp = (void*) communication_amount;
+    self->simcall.args[3].dp = (void*) flops_amount;
+    self->simcall.args[4].dp = (void*) bytes_amount;
     self->simcall.args[5].d = (double) amount;
     self->simcall.args[6].d = (double) rate;
     if (self != simix_global->maestro_process) {
index 22578fd..966d180 100644 (file)
@@ -54,8 +54,8 @@ Func - host_get_nb_pstates (int) (host, void*, smx_host_t)
 Proc - host_set_power_peak_at (void) (host, void*, smx_host_t) (pstate_index, int)
 Func - host_get_consumed_energy (double) (host, void*, smx_host_t)
 
-Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (computation_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
-Func - host_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (computation_amount, void*, double*) (communication_amount, void*, double*) (amount, double) (rate, double)
+Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
+Func - host_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (flops_amount, void*, double*) (bytes_amount, void*, double*) (amount, double) (rate, double)
 Proc - host_execution_destroy (void) (execution, void*, smx_synchro_t)
 Proc - host_execution_cancel (void) (execution, void*, smx_synchro_t)
 Func - host_execution_get_remains (double) (execution, void*, smx_synchro_t)
index d05a6be..4270431 100644 (file)
@@ -363,7 +363,7 @@ void SIMIX_host_autorestart(smx_host_t host)
 }
 
 smx_synchro_t SIMIX_host_execute(const char *name,
-    smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
+    smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask){
 
   /* alloc structures and initialize */
   smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
@@ -379,7 +379,7 @@ smx_synchro_t SIMIX_host_execute(const char *name,
   /* set surf's action */
   if (!MC_is_active() && !MC_record_replay_is_active()) {
 
-    synchro->execution.surf_exec = surf_workstation_execute(host, computation_amount);
+    synchro->execution.surf_exec = surf_workstation_execute(host, flops_amount);
     surf_action_set_data(synchro->execution.surf_exec, synchro);
     surf_action_set_priority(synchro->execution.surf_exec, priority);
 
@@ -405,7 +405,7 @@ smx_synchro_t SIMIX_host_execute(const char *name,
 
 smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     int host_nb, smx_host_t *host_list,
-    double *computation_amount, double *communication_amount,
+    double *flops_amount, double *bytes_amount,
     double amount, double rate){
 
   void **workstation_list = NULL;
@@ -444,7 +444,7 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name,
   if (!MC_is_active() && !MC_record_replay_is_active()) {
     synchro->execution.surf_exec =
       surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
-                 host_nb, workstation_list, computation_amount, communication_amount, rate);
+                 host_nb, workstation_list, flops_amount, bytes_amount, rate);
 
     surf_action_set_data(synchro->execution.surf_exec, synchro);
   }
index 33316bd..8492787 100644 (file)
@@ -53,10 +53,10 @@ int SIMIX_host_get_nb_pstates(smx_host_t host);
 double SIMIX_host_get_consumed_energy(smx_host_t host);
 void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index);
 smx_synchro_t SIMIX_host_execute(const char *name,
-    smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask);
+    smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask);
 smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     int host_nb, smx_host_t *host_list,
-    double *computation_amount, double *communication_amount,
+    double *flops_amount, double *bytes_amount,
     double amount, double rate);
 void SIMIX_host_execution_destroy(smx_synchro_t synchro);
 void SIMIX_host_execution_cancel(smx_synchro_t synchro);
index 70bd496..de2e071 100644 (file)
@@ -272,10 +272,10 @@ int surf_model_running_action_set_size(surf_model_t model){
 surf_action_t surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
                                                    int workstation_nb,
                                             void **workstation_list,
-                                            double *computation_amount,
-                                            double *communication_amount,
+                                            double *flops_amount,
+                                            double *bytes_amount,
                                             double rate){
-  return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, computation_amount, communication_amount, rate));
+  return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, flops_amount, bytes_amount, rate));
 }
 
 surf_action_t surf_workstation_model_communicate(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate){
index 563c3db..a98275b 100644 (file)
@@ -183,26 +183,26 @@ double WorkstationVMHL13Model::shareResources(double now)
 
 ActionPtr WorkstationVMHL13Model::executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate){
 #define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
   if ((workstation_nb == 1)
-      && (cost_or_zero(communication_amount, 0) == 0.0))
-    return ((WorkstationCLM03Ptr)workstation_list[0])->execute(computation_amount[0]);
+      && (cost_or_zero(bytes_amount, 0) == 0.0))
+    return ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
   else if ((workstation_nb == 1)
-           && (cost_or_zero(computation_amount, 0) == 0.0))
-    return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],communication_amount[0], rate);
+           && (cost_or_zero(flops_amount, 0) == 0.0))
+    return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
   else if ((workstation_nb == 2)
-             && (cost_or_zero(computation_amount, 0) == 0.0)
-             && (cost_or_zero(computation_amount, 1) == 0.0)) {
+             && (cost_or_zero(flops_amount, 0) == 0.0)
+             && (cost_or_zero(flops_amount, 1) == 0.0)) {
     int i,nb = 0;
     double value = 0.0;
 
     for (i = 0; i < workstation_nb * workstation_nb; i++) {
-      if (cost_or_zero(communication_amount, i) > 0.0) {
+      if (cost_or_zero(bytes_amount, i) > 0.0) {
         nb++;
-        value = cost_or_zero(communication_amount, i);
+        value = cost_or_zero(bytes_amount, i);
       }
     }
     if (nb == 1)
index a17605c..c09d5f3 100644 (file)
@@ -37,8 +37,8 @@ public:
   ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
   ActionPtr executeParallelTask(int workstation_nb,
                                           void **workstation_list,
-                                          double *computation_amount,
-                                          double *communication_amount,
+                                          double *flops_amount,
+                                          double *bytes_amount,
                                           double rate);
   void updateActionsState(double /*now*/, double /*delta*/);
 };
index f149e7f..1472e15 100644 (file)
@@ -94,28 +94,28 @@ void WorkstationCLM03Model::updateActionsState(double /*now*/, double /*delta*/)
 
 ActionPtr WorkstationCLM03Model::executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate){
 #define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
   ActionPtr action =NULL;
   if ((workstation_nb == 1)
-      && (cost_or_zero(communication_amount, 0) == 0.0)){
-    action = ((WorkstationCLM03Ptr)workstation_list[0])->execute(computation_amount[0]);
+      && (cost_or_zero(bytes_amount, 0) == 0.0)){
+    action = ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
   } else if ((workstation_nb == 1)
-           && (cost_or_zero(computation_amount, 0) == 0.0)) {
+           && (cost_or_zero(flops_amount, 0) == 0.0)) {
     action = communicate((WorkstationCLM03Ptr)workstation_list[0],
-        (WorkstationCLM03Ptr)workstation_list[0],communication_amount[0], rate);
+        (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
   } else if ((workstation_nb == 2)
-             && (cost_or_zero(computation_amount, 0) == 0.0)
-             && (cost_or_zero(computation_amount, 1) == 0.0)) {
+             && (cost_or_zero(flops_amount, 0) == 0.0)
+             && (cost_or_zero(flops_amount, 1) == 0.0)) {
     int i,nb = 0;
     double value = 0.0;
 
     for (i = 0; i < workstation_nb * workstation_nb; i++) {
-      if (cost_or_zero(communication_amount, i) > 0.0) {
+      if (cost_or_zero(bytes_amount, i) > 0.0) {
         nb++;
-        value = cost_or_zero(communication_amount, i);
+        value = cost_or_zero(bytes_amount, i);
       }
     }
     if (nb == 1){
index 88b4854..11e2435 100644 (file)
@@ -40,8 +40,8 @@ public:
 
   ActionPtr executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate);
  ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
 };
index 967f2e4..13ccd60 100644 (file)
@@ -101,15 +101,15 @@ public:
    *
    * @param workstation_nb [description]
    * @param workstation_list [description]
-   * @param computation_amount [description]
-   * @param communication_amount [description]
+   * @param flops_amount [description]
+   * @param bytes_amount [description]
    * @param rate [description]
    * @return [description]
    */
   virtual ActionPtr executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate)=0;
 
  /**
@@ -186,11 +186,11 @@ public:
   /**
    * @brief Execute some quantity of computation
    *
-   * @param size The value of the processing amount (in flop) needed to process
+   * @param flops_amount The value of the processing amount (in flop) needed to process
    * @return The CpuAction corresponding to the processing
    * @see Cpu
    */
-  virtual ActionPtr execute(double size)=0;
+  virtual ActionPtr execute(double flops_amount)=0;
 
   /**
    * @brief Make a process sleep for duration seconds
index f7b460a..db86aab 100644 (file)
@@ -169,10 +169,9 @@ void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
 
 ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
                                                    void **workstation_list,
-                                                 double
-                                                 *computation_amount, double
-                                                 *communication_amount,
-                                                 double rate)
+                                                   double *flops_amount,
+                                                                                                  double *bytes_amount,
+                                                   double rate)
 {
   WorkstationL07ActionPtr action;
   int i, j;
@@ -191,7 +190,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
     for (j = 0; j < workstation_nb; j++) {
       xbt_dynar_t route=NULL;
 
-      if (communication_amount[i * workstation_nb + j] > 0) {
+      if (bytes_amount[i * workstation_nb + j] > 0) {
         double lat=0.0;
         unsigned int cpt;
         void *_link;
@@ -215,7 +214,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   xbt_dict_reset(ptask_parallel_task_link_set);
 
   for (i = 0; i < workstation_nb; i++)
-    if (computation_amount[i] > 0)
+    if (flops_amount[i] > 0)
       nb_host++;
 
   action = new WorkstationL07Action(this, 1, 0);
@@ -225,8 +224,8 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
                                    calloc but it seems to help valgrind... */
   action->m_workstationNb = workstation_nb;
   action->p_workstationList = (WorkstationPtr *) workstation_list;
-  action->p_computationAmount = computation_amount;
-  action->p_communicationAmount = communication_amount;
+  action->p_computationAmount = flops_amount;
+  action->p_communicationAmount = bytes_amount;
   action->m_latency = latency;
   action->m_rate = rate;
 
@@ -240,7 +239,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   for (i = 0; i < workstation_nb; i++)
     lmm_expand(ptask_maxmin_system,
                 static_cast<WorkstationL07Ptr>(workstation_list[i])->p_cpu->getConstraint(),
-               action->getVariable(), computation_amount[i]);
+               action->getVariable(), flops_amount[i]);
 
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
@@ -248,7 +247,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
       LinkL07Ptr link;
 
       xbt_dynar_t route=NULL;
-      if (communication_amount[i * workstation_nb + j] == 0.0)
+      if (bytes_amount[i * workstation_nb + j] == 0.0)
         continue;
 
       routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
@@ -259,7 +258,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
         link = static_cast<LinkL07Ptr>(_link);
         lmm_expand_add(ptask_maxmin_system, link->getConstraint(),
                        action->getVariable(),
-                       communication_amount[i * workstation_nb + j]);
+                       bytes_amount[i * workstation_nb + j]);
       }
     }
   }
@@ -292,17 +291,17 @@ ActionPtr WorkstationL07Model::communicate(WorkstationPtr src, WorkstationPtr ds
                                        double size, double rate)
 {
   void **workstation_list = xbt_new0(void *, 2);
-  double *computation_amount = xbt_new0(double, 2);
-  double *communication_amount = xbt_new0(double, 4);
+  double *flops_amount = xbt_new0(double, 2);
+  double *bytes_amount = xbt_new0(double, 4);
   ActionPtr res = NULL;
 
   workstation_list[0] = src;
   workstation_list[1] = dst;
-  communication_amount[1] = size;
+  bytes_amount[1] = size;
 
   res = executeParallelTask(2, workstation_list,
-                                    computation_amount,
-                                    communication_amount, rate);
+                                    flops_amount,
+                                    bytes_amount, rate);
 
   return res;
 }
@@ -558,16 +557,16 @@ e_surf_resource_state_t WorkstationL07::getState()
 ActionPtr WorkstationL07::execute(double size)
 {
   void **workstation_list = xbt_new0(void *, 1);
-  double *computation_amount = xbt_new0(double, 1);
-  double *communication_amount = xbt_new0(double, 1);
+  double *flops_amount = xbt_new0(double, 1);
+  double *bytes_amount = xbt_new0(double, 1);
 
   workstation_list[0] = this;
-  communication_amount[0] = 0.0;
-  computation_amount[0] = size;
+  bytes_amount[0] = 0.0;
+  flops_amount[0] = size;
 
   return static_cast<WorkstationL07ModelPtr>(getModel())->executeParallelTask(1, workstation_list,
-                                             computation_amount,
-                                     communication_amount, -1);
+                                             flops_amount,
+                                     bytes_amount, -1);
 }
 
 ActionPtr WorkstationL07::sleep(double duration)
index 364ed78..2b97f71 100644 (file)
@@ -51,8 +51,8 @@ public:
   WorkstationPtr createWorkstation(const char *name);
   ActionPtr executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate);
   xbt_dynar_t getRoute(WorkstationPtr src, WorkstationPtr dst);
   ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
@@ -170,9 +170,8 @@ class WorkstationL07Action : public WorkstationAction {
   friend ActionPtr WorkstationL07::sleep(double duration);
   friend ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
                                                      void **workstation_list,
-                                                   double
-                                                   *computation_amount, double
-                                                   *communication_amount,
+                                                   double *flops_amount,
+                                                                                                  double *bytes_amount,
                                                    double rate);
 public:
   WorkstationL07Action(ModelPtr model, double cost, bool failed)
index 034a0ee..95fcaa1 100644 (file)
@@ -187,7 +187,7 @@ int server(int argc, char *argv[])
     else if(!strcmp(task_name,"hsm_put")){// Receive file to save
       // Write file on local disk
       char *dest = MSG_task_get_data(to_execute);
-      sg_size_t size_to_write = (sg_size_t)MSG_task_get_data_size(to_execute);
+      sg_size_t size_to_write = (sg_size_t)MSG_task_get_bytes_amount(to_execute);
       write_local_file(dest, size_to_write);
     }