Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sed -i -e 's/\t/ /g' [sources] Please people, stop using tabs
[simgrid.git] / src / smpi / smpi_base.c
index bc93e0d..8b0c747 100644 (file)
@@ -408,7 +408,7 @@ void smpi_mpi_start(MPI_Request request)
 
     int rank = request->src;
     if (TRACE_smpi_view_internals()) {
-       TRACE_smpi_send(rank, rank, receiver,request->size);
+      TRACE_smpi_send(rank, rank, receiver,request->size);
     }
     print_request("New send", request);
     
@@ -460,7 +460,7 @@ void smpi_mpi_start(MPI_Request request)
     }
 
     void* buf = request->buf;
-    if ( (! (request->flags & SSEND)) && (request->size < sg_cfg_get_int("smpi/send_is_detached_thres"))) {
+    if ( (! (request->flags & SSEND)) && (request->size < sg_cfg_get_int("smpi/send_is_detached_thresh"))) {
       void *oldbuf = NULL;
       request->detached = 1;
       XBT_DEBUG("Send request %p is detached", request);
@@ -501,7 +501,7 @@ void smpi_mpi_start(MPI_Request request)
 
     /* FIXME: detached sends are not traceable (request->action == NULL) */
     if (request->action)
-       simcall_set_category(request->action, TRACE_internal_smpi_get_category());
+      simcall_set_category(request->action, TRACE_internal_smpi_get_category());
 
     if (async_small_thresh != 0 || request->flags & RMA)
       xbt_mutex_release(mut);
@@ -1086,14 +1086,12 @@ int smpi_mpi_testsome(int incount, MPI_Request requests[], int *indices,
 void smpi_mpi_bcast(void *buf, int count, MPI_Datatype datatype, int root,
                     MPI_Comm comm)
 {
-  // arity=2: a binary tree, arity=4 seem to be a good setting (see P2P-MPI))
-  nary_tree_bcast(buf, count, datatype, root, comm, 4);
+    smpi_coll_tuned_bcast_binomial_tree(buf, count, datatype, root, comm);
 }
 
 void smpi_mpi_barrier(MPI_Comm comm)
 {
-  // arity=2: a binary tree, arity=4 seem to be a good setting (see P2P-MPI))
-  nary_tree_barrier(comm, 4);
+    smpi_coll_tuned_barrier_ompi_basic_linear(comm);
 }
 
 void smpi_mpi_gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
@@ -1421,10 +1419,10 @@ void smpi_mpi_reduce(void *sendbuf, void *recvbuf, int count,
       if(src != root) {
         // FIXME: possibly overkill we we have contiguous/noncontiguous data
         //  mapping...
-           if (!smpi_process_get_replaying())
+         if (!smpi_process_get_replaying())
           tmpbufs[index] = xbt_malloc(count * dataext);
-           else
-             tmpbufs[index] = smpi_get_tmp_sendbuffer(count * dataext);
+         else
+           tmpbufs[index] = smpi_get_tmp_sendbuffer(count * dataext);
         requests[index] =
           smpi_irecv_init(tmpbufs[index], count, datatype, src,
                           system_tag, comm);