Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use (const) references with range-based for loops.
[simgrid.git] / src / instr / instr_paje_trace.cpp
index c7c4f7c..6e9df55 100644 (file)
@@ -68,14 +68,14 @@ void TRACE_paje_dump_buffer (int force)
     return;
   XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
   if (force){
-    for (auto event : buffer){
+    for (auto const& event : buffer) {
       event->print();
       delete event;
     }
     buffer.clear();
   }else{
     std::vector<PajeEvent*>::iterator i = buffer.begin();
-    for (auto event :buffer){
+    for (auto const& event : buffer) {
       double head_timestamp = event->timestamp;
       if (head_timestamp > TRACE_last_timestamp_to_dump)
         break;
@@ -92,7 +92,7 @@ void buffer_debug(std::vector<PajeEvent*> *buf);
 void buffer_debug(std::vector<PajeEvent*> *buf) {
   return;
   XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size());
-  for (auto event :*buf){
+  for (auto const& event : *buf) {
     event->print();
     XBT_DEBUG("%p %s", event, stream.str().c_str());
     stream.str("");
@@ -667,11 +667,13 @@ void PushStateEvent::print() {
           fprintf(trace_file, "%d ", extra->recvcounts[i]);
         fprintf(trace_file, "%d %s %s\n", extra->root, extra->datatype1, extra->datatype2);
         break;
+      case TRACING_ALLGATHER: // rank allgather sendcount recvcounts (sendtype) (recvtype)
+        fprintf(trace_file, "%s allGather %d %d %s %s", process_id, extra->send_size, extra->recv_size, extra->datatype1, extra->datatype2);
+        break;
       case TRACING_WAITANY:
       case TRACING_SENDRECV:
       case TRACING_SCATTER:
       case TRACING_SCATTERV:
-      case TRACING_ALLGATHER:
       case TRACING_SCAN:
       case TRACING_EXSCAN:
       case TRACING_COMM_SIZE: