Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change the way computation tracing is handled in smpi
authorAugustin Degomme <degomme@idpann.imag.fr>
Fri, 25 Oct 2013 09:05:44 +0000 (11:05 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Wed, 30 Oct 2013 14:23:49 +0000 (15:23 +0100)
Now only smpi_execute_flops is surrounded by tracing calls.

src/smpi/instr_smpi.c
src/smpi/smpi_bench.c
src/smpi/smpi_pmpi.c
src/smpi/smpi_replay.c

index 4bb6e41..527c0f0 100644 (file)
@@ -212,7 +212,8 @@ void TRACE_smpi_computing_init(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  type_t mpi = PJ_type_get("MPI", PJ_container_get_root()->type);
+  type_t type = PJ_type_state_new ("COMPUTATION", mpi);
   const char *color = instr_find_color ("computing");
   val_t value = PJ_value_get_or_new ("computing", color, type);
   new_pajePushState (SIMIX_get_clock(), container, type, value);
@@ -226,19 +227,22 @@ void TRACE_smpi_computing_in(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  type_t type = PJ_type_get ("COMPUTATION", container->type);
   val_t value = PJ_value_get_or_new ("computing", NULL, type);
   new_pajePushState (SIMIX_get_clock(), container, type, value);
 }
 
-void TRACE_smpi_computing_out(int rank)
+void TRACE_smpi_computing_out(int rank, double flops)
 {
   if (!TRACE_smpi_is_enabled()|| !TRACE_smpi_is_computing()) return;
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
-  new_pajePopState (SIMIX_get_clock(), container, type);
+  type_t type = PJ_type_get ("COMPUTATION", container->type);
+  xbt_dynar_t extra= xbt_dynar_new(sizeof(char*), NULL);
+  char* char_duration  = bprintf("%g", flops);
+  xbt_dynar_push(extra, &char_duration);
+  new_pajePopStateWithExtra (SIMIX_get_clock(), container, type, extra);
 }
 
 void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation, int size)
index 915a5a5..2988648 100644 (file)
@@ -127,9 +127,19 @@ void smpi_execute_flops(double flops) {
   smx_action_t action;
   smx_host_t host;
   host = SIMIX_host_self();
+  int rank = smpi_process_index();
+#ifdef HAVE_TRACING
+  TRACE_smpi_computing_in(rank);
+#endif
+
+XBT_DEBUG("Handle real computation time: %f flops", flops);
+action = simcall_host_execute("computation", host, flops, 1);
+
+#ifdef HAVE_TRACING
+  TRACE_smpi_computing_out(rank,flops);
+#endif
+
 
-  XBT_DEBUG("Handle real computation time: %f flops", flops);
-  action = simcall_host_execute("computation", host, flops, 1);
 #ifdef HAVE_TRACING
   simcall_set_category (action, TRACE_internal_smpi_get_category());
 #endif
@@ -165,8 +175,18 @@ void smpi_bench_end(void)
 
 unsigned int smpi_sleep(unsigned int secs)
 {
+  smx_action_t action;
+
   smpi_bench_end();
-  smpi_execute_flops((double) secs*simcall_host_get_speed(SIMIX_host_self()));
+
+  double flops = (double) secs*simcall_host_get_speed(SIMIX_host_self());
+  XBT_DEBUG("Sleep for: %f flops", flops);
+  action = simcall_host_execute("computation", SIMIX_host_self(), flops, 1);
+  #ifdef HAVE_TRACING
+    simcall_set_category (action, TRACE_internal_smpi_get_category());
+  #endif
+  simcall_host_execution_wait(action);
+
   smpi_bench_begin();
   return secs;
 }
index 0d93e9c..3a3b67e 100644 (file)
@@ -115,10 +115,6 @@ int PMPI_Abort(MPI_Comm comm, int errorcode)
 {
   smpi_bench_end();
   smpi_process_destroy();
-#ifdef HAVE_TRACING
-  int rank = smpi_process_index();
-  TRACE_smpi_computing_out(rank);
-#endif
   // FIXME: should kill all processes in comm instead
   simcall_process_kill(SIMIX_process_self());
   return MPI_SUCCESS;
@@ -1099,7 +1095,6 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
 
 #ifdef HAVE_TRACING
     int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-    TRACE_smpi_computing_out(rank);
     int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, count*smpi_datatype_size(datatype));
     TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
@@ -1111,7 +1106,6 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
 #ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
     (*request)->send = 1;
-    TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1148,7 +1142,6 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype,
 
 #ifdef HAVE_TRACING
     int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-    TRACE_smpi_computing_out(rank);
     int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, count*smpi_datatype_size(datatype));
     TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
@@ -1160,7 +1153,6 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype,
 #ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
     (*request)->send = 1;
-    TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1196,7 +1188,6 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int src_traced = smpi_group_index(smpi_comm_group(comm), src);
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, count*smpi_datatype_size(datatype));
 #endif
 
@@ -1208,7 +1199,6 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
   if(status!=MPI_STATUS_IGNORE)src_traced = smpi_group_index(smpi_comm_group(comm), status->MPI_SOURCE);
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
   TRACE_smpi_recv(rank, src_traced, rank);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1241,7 +1231,6 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
 
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, count*smpi_datatype_size(datatype));
   TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
@@ -1252,7 +1241,6 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
 
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1285,7 +1273,6 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
 
  #ifdef HAVE_TRACING
    int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-   TRACE_smpi_computing_out(rank);
    int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
    TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, count*smpi_datatype_size(datatype));
    TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
@@ -1296,7 +1283,6 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
 
  #ifdef HAVE_TRACING
    TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
-   TRACE_smpi_computing_in(rank);
  #endif
    }
 
@@ -1335,7 +1321,6 @@ int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
   int src_traced = smpi_group_index(smpi_comm_group(comm), src);
   TRACE_smpi_ptp_in(rank, src_traced, dst_traced, __FUNCTION__, sendcount*smpi_datatype_size(sendtype));
@@ -1350,7 +1335,6 @@ int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, dst_traced, __FUNCTION__);
   TRACE_smpi_recv(rank, src_traced, rank);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   }
@@ -1497,7 +1481,6 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
     int rank = request && (*request)->comm != MPI_COMM_NULL
       ? smpi_process_index()
       : -1;
-    TRACE_smpi_computing_out(rank);
 
     int src_traced = (*request)->src;
     int dst_traced = (*request)->dst;
@@ -1519,7 +1502,6 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
           src_traced;
       TRACE_smpi_recv(rank, src_traced, dst_traced);
     }
-    TRACE_smpi_computing_in(rank);
 #endif
 
   }
@@ -1551,7 +1533,6 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
     }
   }
   int rank_traced = smpi_process_index();
-  TRACE_smpi_computing_out(rank_traced);
 
   TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__,count);
 
@@ -1582,7 +1563,6 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
     xbt_free(comms);
 
   }
-  TRACE_smpi_computing_in(rank_traced);
 #endif
   smpi_bench_begin();
   return retval;
@@ -1615,7 +1595,6 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
     }
   }
   int rank_traced = smpi_process_index();
-  TRACE_smpi_computing_out(rank_traced);
 
   TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__,count);
 #endif
@@ -1644,7 +1623,6 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
   xbt_free(valid);
   xbt_free(comms);
 
-  TRACE_smpi_computing_in(rank_traced);
 #endif
   smpi_bench_begin();
   return retval;
@@ -1694,7 +1672,6 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, count*smpi_datatype_size(datatype));
 #endif
@@ -1702,7 +1679,6 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1721,14 +1697,12 @@ int PMPI_Barrier(MPI_Comm comm)
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, smpi_comm_size(comm));
 #endif
     mpi_coll_barrier_fun(comm);
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1763,7 +1737,6 @@ int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     }
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,sendcount*smpi_datatype_size(sendtmptype));
 #endif
@@ -1774,7 +1747,6 @@ int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1810,7 +1782,6 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,sendcount*smpi_datatype_size(sendtmptype));
 #endif
@@ -1819,7 +1790,6 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1851,7 +1821,6 @@ int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     }
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,sendcount*smpi_datatype_size(sendtype));
 #endif
     mpi_coll_allgather_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
@@ -1892,7 +1861,6 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     }
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,sendcount*smpi_datatype_size(sendtype));
 #endif
     mpi_coll_allgatherv_fun(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
@@ -1900,7 +1868,6 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1929,7 +1896,6 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     }
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,sendcount*smpi_datatype_size(recvtype));
@@ -1939,7 +1905,6 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -1969,7 +1934,6 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
     }
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   int count=0, i;
   for(i=0; i<smpi_comm_size(comm);i++)count+=sendcounts[i];
@@ -1980,7 +1944,6 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2002,7 +1965,6 @@ int PMPI_Reduce(void *sendbuf, void *recvbuf, int count,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, count*smpi_datatype_size(datatype));
 #endif
@@ -2011,7 +1973,6 @@ int PMPI_Reduce(void *sendbuf, void *recvbuf, int count,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2056,7 +2017,6 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count,
     }
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, count*smpi_datatype_size(datatype));
 #endif
     mpi_coll_allreduce_fun(sendtmpbuf, recvbuf, count, datatype, op, comm);
@@ -2068,7 +2028,6 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2092,14 +2051,12 @@ int PMPI_Scan(void *sendbuf, void *recvbuf, int count,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, count*smpi_datatype_size(datatype));
 #endif
     smpi_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm);
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2122,14 +2079,12 @@ int PMPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, count*smpi_datatype_size(datatype));
 #endif
     smpi_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm);
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2154,7 +2109,6 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int count=0, i;
   for(i=0; i<smpi_comm_size(comm);i++)count+=recvcounts[i];
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, count*smpi_datatype_size(datatype));
@@ -2169,7 +2123,6 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2194,7 +2147,6 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, recvcount*smpi_comm_size(comm)*smpi_datatype_size(datatype));
 #endif
     int count=smpi_comm_size(comm);
@@ -2206,7 +2158,6 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
     retval = MPI_SUCCESS;
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2230,13 +2181,11 @@ int PMPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, sendcount*smpi_datatype_size(sendtype));
 #endif
     retval = mpi_coll_alltoall_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
@@ -2263,7 +2212,6 @@ int PMPI_Alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
   } else {
 #ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int i, size=0;
   for(i=0; i< smpi_comm_size(comm);i++)size+=sendcounts[i];
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, size*smpi_datatype_size(sendtype));
@@ -2274,7 +2222,6 @@ int PMPI_Alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
                                   comm);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
   }
 
index fbfb107..3d2f1be 100644 (file)
@@ -159,7 +159,7 @@ static void action_send(const char *const *action)
 
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
-  TRACE_smpi_computing_out(rank);
+
   int dst_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), to);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, size*smpi_datatype_size(MPI_CURRENT_TYPE));
   TRACE_smpi_send(rank, rank, dst_traced, size*smpi_datatype_size(MPI_CURRENT_TYPE));
@@ -171,7 +171,6 @@ static void action_send(const char *const *action)
 
   #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
 }
@@ -188,7 +187,6 @@ static void action_Isend(const char *const *action)
 
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
-  TRACE_smpi_computing_out(rank);
   int dst_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), to);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, size*smpi_datatype_size(MPI_CURRENT_TYPE));
   TRACE_smpi_send(rank, rank, dst_traced, size*smpi_datatype_size(MPI_CURRENT_TYPE));
@@ -199,7 +197,6 @@ static void action_Isend(const char *const *action)
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
   request->send = 1;
-  TRACE_smpi_computing_in(rank);
 #endif
 
   xbt_dynar_push(reqq[smpi_comm_rank(MPI_COMM_WORLD)],&request);
@@ -219,7 +216,6 @@ static void action_recv(const char *const *action) {
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
   int src_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), from);
-  TRACE_smpi_computing_out(rank);
 
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
@@ -229,7 +225,6 @@ static void action_recv(const char *const *action) {
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
   TRACE_smpi_recv(rank, src_traced, rank);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -281,7 +276,6 @@ static void action_wait(const char *const *action){
   int rank = request && request->comm != MPI_COMM_NULL
       ? smpi_comm_rank(request->comm)
       : -1;
-  TRACE_smpi_computing_out(rank);
 
   MPI_Group group = smpi_comm_group(request->comm);
   int src_traced = smpi_group_rank(group, request->src);
@@ -295,7 +289,6 @@ static void action_wait(const char *const *action){
   if (is_wait_for_receive) {
     TRACE_smpi_recv(rank, src_traced, dst_traced);
   }
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -345,8 +338,6 @@ static void action_waitall(const char *const *action){
     }
    }
    int rank_traced = smpi_process_index();
-   TRACE_smpi_computing_out(rank_traced);
-
    TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__, count_requests);
   #endif
 
@@ -367,7 +358,6 @@ static void action_waitall(const char *const *action){
    xbt_dynar_free(&srcs);
    xbt_dynar_free(&dsts);
    xbt_dynar_free(&recvs);
-   TRACE_smpi_computing_in(rank_traced);
   #endif
 
    xbt_dynar_reset(reqq[smpi_comm_rank(MPI_COMM_WORLD)]);
@@ -379,13 +369,11 @@ static void action_barrier(const char *const *action){
   double clock = smpi_process_simulated_elapsed();
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, smpi_comm_size(MPI_COMM_WORLD));
 #endif
   smpi_mpi_barrier(MPI_COMM_WORLD);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -412,7 +400,6 @@ static void action_bcast(const char *const *action)
 
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), 0);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
@@ -420,7 +407,6 @@ static void action_bcast(const char *const *action)
   smpi_mpi_bcast(NULL, size, MPI_CURRENT_TYPE, root, MPI_COMM_WORLD);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -443,7 +429,6 @@ static void action_reduce(const char *const *action)
 
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
-  TRACE_smpi_computing_out(rank);
   int root_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), 0);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,comm_size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
@@ -451,7 +436,6 @@ static void action_reduce(const char *const *action)
    smpi_execute_flops(comp_size);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -467,7 +451,6 @@ static void action_allReduce(const char *const *action) {
   double clock = smpi_process_simulated_elapsed();
 #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,comp_size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
   mpi_coll_reduce_fun(NULL, NULL, comm_size, MPI_CURRENT_TYPE, MPI_OP_NULL, 0, MPI_COMM_WORLD);
@@ -475,7 +458,6 @@ static void action_allReduce(const char *const *action) {
   mpi_coll_bcast_fun(NULL, comm_size, MPI_CURRENT_TYPE, 0, MPI_COMM_WORLD);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -501,7 +483,6 @@ static void action_allToAll(const char *const *action) {
 
 #ifdef HAVE_TRACING
   int rank = smpi_process_index();
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,send_size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
 
@@ -509,7 +490,6 @@ static void action_allToAll(const char *const *action) {
 
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -553,7 +533,6 @@ static void action_gather(const char *const *action) {
     recv = calloc(recv_size*comm_size, smpi_datatype_size(MPI_CURRENT_TYPE2));
 
 #ifdef HAVE_TRACING
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,send_size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
 smpi_mpi_gather(send, send_size, MPI_CURRENT_TYPE,
@@ -562,7 +541,6 @@ smpi_mpi_gather(send, send_size, MPI_CURRENT_TYPE,
 
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -608,7 +586,6 @@ static void action_reducescatter(const char *const *action) {
   }
 
 #ifdef HAVE_TRACING
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, recv_sum*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
    mpi_coll_reduce_fun(NULL, NULL, recv_sum, MPI_CURRENT_TYPE, MPI_OP_NULL,
@@ -620,7 +597,6 @@ static void action_reducescatter(const char *const *action) {
 
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -669,7 +645,6 @@ static void action_allgatherv(const char *const *action) {
 
 #ifdef HAVE_TRACING
   int rank = MPI_COMM_WORLD != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,sendcount*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
 
@@ -677,7 +652,6 @@ mpi_coll_allgatherv_fun(sendbuf, sendcount, MPI_CURRENT_TYPE, recvbuf, recvcount
 
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);
@@ -736,7 +710,6 @@ static void action_allToAllv(const char *const *action) {
 
 #ifdef HAVE_TRACING
   int rank = MPI_COMM_WORLD != MPI_COMM_NULL ? smpi_process_index() : -1;
-  TRACE_smpi_computing_out(rank);
   int count=0;
   for(i=0;i<comm_size;i++) count+=sendcounts[i];
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,count*smpi_datatype_size(MPI_CURRENT_TYPE));
@@ -746,7 +719,6 @@ static void action_allToAllv(const char *const *action) {
                                MPI_COMM_WORLD);
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-  TRACE_smpi_computing_in(rank);
 #endif
 
   log_timed_action (action, clock);