Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanup the debug messages
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Dec 2011 23:30:51 +0000 (00:30 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Dec 2011 23:30:51 +0000 (00:30 +0100)
examples/smpi/dsend.c
src/simix/smx_network.c
src/smpi/smpi_base.c

index f7bc825..674aa81 100644 (file)
@@ -8,6 +8,8 @@
 #include <stdio.h>
 #include <mpi.h>
 
+XBT_LOG_NEW_DEFAULT_CATEGORY(dsend,"the dsend test");
+
 int main(int argc, char *argv[]) {
   int rank;
   int data=11;
@@ -27,7 +29,7 @@ int main(int argc, char *argv[]) {
          }
   }
 
-  printf("rank %d: data exchanged\n", rank);
+  XBT_INFO("rank %d: data exchanged", rank);
   MPI_Finalize();
   return 0;
 }
index c359576..e10c1cd 100644 (file)
@@ -407,15 +407,12 @@ void SIMIX_pre_comm_wait(smx_req_t req, smx_action_t action, double timeout, int
     SIMIX_comm_finish(action);
     return;
   }
-       XBT_INFO("Comm_wait. state:%d; I'm %s",action->state,
-                       req->issuer == action->comm.src_proc?"sender":"receiver");
 
   /* If the action has already finish perform the error handling, */
   /* otherwise set up a waiting timeout on the right side         */
   if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING) {
     SIMIX_comm_finish(action);
   } else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
-       XBT_INFO("Not done, we need a sleep action");
     sleep = surf_workstation_model->extension.workstation.sleep(req->issuer->smx_host->host, timeout);
     surf_workstation_model->action_data_set(sleep, action);
 
@@ -877,12 +874,13 @@ void SIMIX_comm_copy_pointer_callback(smx_action_t comm, size_t buff_size)
 
 void SIMIX_comm_copy_buffer_callback(smx_action_t comm, size_t buff_size)
 {
+  XBT_DEBUG("Copy the data over");
   memcpy(comm->comm.dst_buff, comm->comm.src_buff, buff_size);
 }
 
 void smpi_comm_copy_data_callback(smx_action_t comm, size_t buff_size)
 {
-  XBT_INFO("Copy the data over");
+  XBT_DEBUG("Copy the data over");
   memcpy(comm->comm.dst_buff, comm->comm.src_buff, buff_size);
   if (comm->comm.detached) { // if this is a detached send, the source buffer was duplicated by SMPI sender to make the original buffer available to the application ASAP
          comm->comm.clean_fun(comm->comm.src_buff);
index 51b0d9a..8a02def 100644 (file)
@@ -84,12 +84,6 @@ MPI_Request smpi_mpi_recv_init(void *buf, int count, MPI_Datatype datatype,
   return request;
 }
 
-static void myfree(void *d) {
-       xbt_backtrace_display_current();
-       XBT_INFO("myfree called on %p",d);
-       free(d);
-}
-
 void smpi_mpi_start(MPI_Request request)
 {
   smx_rdv_t mailbox;
@@ -113,14 +107,14 @@ void smpi_mpi_start(MPI_Request request)
        detached = 1;
        request->buf = malloc(request->size);
        memcpy(request->buf,oldbuf,request->size);
-       XBT_INFO("Send request %p is detached; buf %p copied into %p",request,oldbuf,request->buf);
+       XBT_DEBUG("Send request %p is detached; buf %p copied into %p",request,oldbuf,request->buf);
     } else {
        XBT_DEBUG("Send request %p is not detached (buf: %p)",request,request->buf);
     }
     request->action = 
                SIMIX_req_comm_isend(mailbox, request->size, -1.0,
                                    request->buf, request->size,
-                                   &match_send,myfree, // cleanup using a simple free() FIXME: that may not be sufficient
+                                   &match_send,free, // a simple free is used to free the buffer
                                    request,
                                    // detach if msg size < eager/rdv switch limit
                                    detached);