Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
unify collective tags
authorAugustin Degomme <degomme@idpann.imag.fr>
Tue, 2 Jul 2013 07:51:05 +0000 (09:51 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Tue, 2 Jul 2013 07:51:05 +0000 (09:51 +0200)
allows to quickly identify the type of the collective when debugging
avoid some collisions with wrong messages being received

88 files changed:
src/smpi/colls/allgather-2dmesh.c
src/smpi/colls/allgather-3dmesh.c
src/smpi/colls/allgather-NTSLR-NB.c
src/smpi/colls/allgather-NTSLR.c
src/smpi/colls/allgather-SMP-NTS.c
src/smpi/colls/allgather-bruck.c
src/smpi/colls/allgather-loosely-lr.c
src/smpi/colls/allgather-lr.c
src/smpi/colls/allgather-ompi-neighborexchange.c
src/smpi/colls/allgather-pair.c
src/smpi/colls/allgather-rdb.c
src/smpi/colls/allgather-rhv.c
src/smpi/colls/allgather-ring.c
src/smpi/colls/allgather-smp-simple.c
src/smpi/colls/allgather-spreading-simple.c
src/smpi/colls/allgatherv-mpich-rdb.c
src/smpi/colls/allgatherv-ompi-bruck.c
src/smpi/colls/allgatherv-ompi-neighborexchange.c
src/smpi/colls/allgatherv-pair.c
src/smpi/colls/allgatherv-ring.c
src/smpi/colls/allreduce-NTS.c
src/smpi/colls/allreduce-lr.c
src/smpi/colls/allreduce-rab-rdb.c
src/smpi/colls/allreduce-rab-reduce-scatter.c
src/smpi/colls/allreduce-rab-rsag.c
src/smpi/colls/allreduce-rab1.c
src/smpi/colls/allreduce-rdb.c
src/smpi/colls/allreduce-smp-binomial-pipeline.c
src/smpi/colls/allreduce-smp-binomial.c
src/smpi/colls/allreduce-smp-rdb.c
src/smpi/colls/allreduce-smp-rsag-lr.c
src/smpi/colls/allreduce-smp-rsag-rab.c
src/smpi/colls/allreduce-smp-rsag.c
src/smpi/colls/alltoall-2dmesh.c
src/smpi/colls/alltoall-3dmesh.c
src/smpi/colls/alltoall-bruck.c
src/smpi/colls/alltoall-ompi-pairwise.c
src/smpi/colls/alltoall-pair-light-barrier.c
src/smpi/colls/alltoall-pair-mpi-barrier.c
src/smpi/colls/alltoall-pair-one-barrier.c
src/smpi/colls/alltoall-pair.c
src/smpi/colls/alltoall-rdb.c
src/smpi/colls/alltoall-ring-light-barrier.c
src/smpi/colls/alltoall-ring-mpi-barrier.c
src/smpi/colls/alltoall-ring-one-barrier.c
src/smpi/colls/alltoall-ring.c
src/smpi/colls/alltoall-simple.c
src/smpi/colls/alltoallv-bruck.c
src/smpi/colls/alltoallv-ompi-basic-linear.c
src/smpi/colls/alltoallv-pair-light-barrier.c
src/smpi/colls/alltoallv-pair-mpi-barrier.c
src/smpi/colls/alltoallv-pair-one-barrier.c
src/smpi/colls/alltoallv-pair.c
src/smpi/colls/alltoallv-ring-light-barrier.c
src/smpi/colls/alltoallv-ring-mpi-barrier.c
src/smpi/colls/alltoallv-ring-one-barrier.c
src/smpi/colls/alltoallv-ring.c
src/smpi/colls/barrier-ompi.c
src/smpi/colls/bcast-NTSB.c
src/smpi/colls/bcast-NTSL-Isend.c
src/smpi/colls/bcast-NTSL.c
src/smpi/colls/bcast-SMP-binary.c
src/smpi/colls/bcast-SMP-binomial.c
src/smpi/colls/bcast-SMP-linear.c
src/smpi/colls/bcast-arrival-nb.c
src/smpi/colls/bcast-arrival-pattern-aware-wait.c
src/smpi/colls/bcast-arrival-pattern-aware.c
src/smpi/colls/bcast-arrival-scatter.c
src/smpi/colls/bcast-binomial-tree.c
src/smpi/colls/bcast-flattree-pipeline.c
src/smpi/colls/bcast-flattree.c
src/smpi/colls/bcast-ompi-pipeline.c
src/smpi/colls/bcast-ompi-split-bintree.c
src/smpi/colls/bcast-scatter-LR-allgather.c
src/smpi/colls/bcast-scatter-rdb-allgather.c
src/smpi/colls/gather-ompi.c
src/smpi/colls/reduce-NTSL.c
src/smpi/colls/reduce-arrival-pattern-aware.c
src/smpi/colls/reduce-binomial.c
src/smpi/colls/reduce-flat-tree.c
src/smpi/colls/reduce-ompi.c
src/smpi/colls/reduce-scatter-gather.c
src/smpi/colls/reduce_scatter-mpich.c
src/smpi/colls/reduce_scatter-ompi.c
src/smpi/colls/scatter-ompi.c
src/smpi/private.h
src/smpi/smpi_base.c
src/smpi/smpi_comm.c

index 4e3a9c7..602d540 100644 (file)
@@ -110,7 +110,7 @@ smpi_coll_tuned_allgather_2dmesh(void *send_buff, int send_count, MPI_Datatype
   int i, src, dst, rank, num_procs;
   int X, Y, send_offset, recv_offset;
   int my_row_base, my_col_base, src_row_base, block_size, num_reqs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index dfd2ace..5a22437 100644 (file)
@@ -97,7 +97,7 @@ int smpi_coll_tuned_allgather_3dmesh(void *send_buff, int send_count,
   int i, src, dst, rank, num_procs, block_size, my_z_base;
   int my_z, X, Y, Z, send_offset, recv_offset;
   int two_dsize, my_row_base, my_col_base, src_row_base, src_z_base, num_reqs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index d0c6ef0..0873395 100644 (file)
@@ -10,7 +10,7 @@ smpi_coll_tuned_allgather_NTSLR_NB(void *sbuf, int scount, MPI_Datatype stype,
   MPI_Status status, status2;
   int i, to, from, rank, size;
   int send_offset, recv_offset;
-  int tag = 500;
+  int tag = COLL_TAG_ALLGATHER;
 
   rank = smpi_comm_rank(comm);
   size = smpi_comm_size(comm);
index bcaabfd..28ab0b3 100644 (file)
@@ -10,7 +10,7 @@ smpi_coll_tuned_allgather_NTSLR(void *sbuf, int scount, MPI_Datatype stype,
   MPI_Status status;
   int i, to, from, rank, size;
   int send_offset, recv_offset;
-  int tag = 500;
+  int tag = COLL_TAG_ALLGATHER;
 
   rank = smpi_comm_rank(comm);
   size = smpi_comm_size(comm);
index a6b515a..b511fb9 100644 (file)
@@ -14,7 +14,7 @@ int smpi_coll_tuned_allgather_SMP_NTS(void *sbuf, int scount,
   MPI_Aint rextent, sextent;
   rextent = smpi_datatype_get_extent(rtype);
   sextent = smpi_datatype_get_extent(stype);
-  int tag = 50;
+  int tag = COLL_TAG_ALLGATHER;
   MPI_Request request;
   MPI_Request rrequest_array[128];
 
index 681690a..2b49321 100644 (file)
@@ -72,7 +72,7 @@ int smpi_coll_tuned_allgather_bruck(void *send_buff, int send_count,
 
   // local int variables
   int src, dst, rank, num_procs, count, remainder;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
   int pof2 = 1;
 
   // local string variables
index 6455db1..04c7faf 100644 (file)
@@ -10,7 +10,7 @@ int smpi_coll_tuned_allgather_loosely_lr(void *sbuf, int scount,
                                          MPI_Comm comm)
 {
   int comm_size, rank;
-  int tag = 50;
+  int tag = COLL_TAG_ALLGATHER;
   int i, j, send_offset, recv_offset;
   int intra_rank, inter_rank, inter_comm_size, intra_comm_size;
   int inter_dst, inter_src;
index 7656069..92b28bf 100644 (file)
@@ -10,7 +10,7 @@ smpi_coll_tuned_allgather_lr(void *sbuf, int scount, MPI_Datatype stype,
   MPI_Status status;
   int i, to, from, rank, size;
   int send_offset, recv_offset;
-  int tag = 500;
+  int tag = COLL_TAG_ALLGATHER;
 
   rank = smpi_comm_rank(comm);
   size = smpi_comm_size(comm);
index 238163e..d416a66 100644 (file)
@@ -57,7 +57,6 @@
  */
  
  #include "colls_private.h"
- #define MCA_COLL_BASE_TAG_ALLGATHER 555
 int 
 smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
                                                  MPI_Datatype sdtype,
@@ -134,9 +133,9 @@ smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
    tmpsend = (char*)rbuf + rank * rcount * rext;
    /* Sendreceive */
    smpi_mpi_sendrecv(tmpsend, rcount, rdtype, neighbor[0],
-                                  MCA_COLL_BASE_TAG_ALLGATHER,
+                                  COLL_TAG_ALLGATHER,
                                   tmprecv, rcount, rdtype, neighbor[0],
-                                  MCA_COLL_BASE_TAG_ALLGATHER,
+                                  COLL_TAG_ALLGATHER,
                                   comm, MPI_STATUS_IGNORE);
 
    /* Determine initial sending location */
@@ -157,10 +156,10 @@ smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
       /* Sendreceive */
       smpi_mpi_sendrecv(tmpsend, 2 * rcount, rdtype, 
                                      neighbor[i_parity], 
-                                     MCA_COLL_BASE_TAG_ALLGATHER,
+                                     COLL_TAG_ALLGATHER,
                                      tmprecv, 2 * rcount, rdtype,
                                      neighbor[i_parity],
-                                     MCA_COLL_BASE_TAG_ALLGATHER,
+                                     COLL_TAG_ALLGATHER,
                                      comm, MPI_STATUS_IGNORE);
 
       send_data_from = recv_data_from[i_parity];
index 0dc4aec..6075723 100644 (file)
@@ -67,7 +67,7 @@ smpi_coll_tuned_allgather_pair(void *send_buff, int send_count,
 
   MPI_Aint extent;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
   MPI_Status status;
 
   char *send_ptr = (char *) send_buff;
index 520819a..26467de 100644 (file)
@@ -14,7 +14,7 @@ smpi_coll_tuned_allgather_rdb(void *sbuf, int send_count,
   int i, j, k, dst, rank, num_procs, send_offset, recv_offset, tree_root;
   int dst_tree_root, rank_tree_root, last_recv_count = 0, num_procs_completed;
   int offset, tmp_mask;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
   int mask = 1;
   int success = 0;
   int curr_count = recv_count;
index c3db821..aceb283 100644 (file)
@@ -15,7 +15,7 @@ smpi_coll_tuned_allgather_rhv(void *sbuf, int send_count,
   int i, dst, send_base_offset, recv_base_offset, send_chunk, recv_chunk,
       send_offset, recv_offset;
   int rank, num_procs;
-  int tag = 50;
+  int tag = COLL_TAG_ALLGATHER;
   int mask;
   int curr_count;
 
index 6108ae5..4634ddc 100644 (file)
@@ -66,7 +66,7 @@ smpi_coll_tuned_allgather_ring(void *send_buff, int send_count,
 
   MPI_Aint extent;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
   MPI_Status status;
 
   char *sendptr = (char *) send_buff;
index 21cab26..1438870 100644 (file)
@@ -14,7 +14,7 @@ int smpi_coll_tuned_allgather_smp_simple(void *send_buf, int scount,
   MPI_Aint rextent, sextent;
   rextent = smpi_datatype_get_extent(rtype);
   sextent = smpi_datatype_get_extent(stype);
-  int tag = 50;
+  int tag = COLL_TAG_ALLGATHER;
   MPI_Status status;
   int i, send_offset, recv_offset;
   int intra_rank, inter_rank;
index 822ab53..c7dfbc9 100644 (file)
@@ -70,7 +70,7 @@ smpi_coll_tuned_allgather_spreading_simple(void *send_buff, int send_count,
   MPI_Request *reqs, *req_ptr;
   MPI_Aint extent;
   int i, src, dst, rank, num_procs, num_reqs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHER;
   MPI_Status status;
   char *recv_ptr = (char *) recv_buff;
 
index 3a65b30..454288d 100644 (file)
@@ -1,7 +1,6 @@
         /* Short or medium size message and power-of-two no. of processes. Use
          * recursive doubling algorithm */   
 #include "colls_private.h"
-#define MPIR_ALLGATHERV_TAG 222
 int smpi_coll_tuned_allgatherv_mpich_rdb ( 
     void *sendbuf,
     int sendcount,
@@ -94,10 +93,10 @@ int smpi_coll_tuned_allgatherv_mpich_rdb (
 
                     smpi_mpi_sendrecv(((char *)tmp_buf + send_offset * recvtype_extent),
                                                  curr_cnt, recvtype, dst,
-                                                 MPIR_ALLGATHERV_TAG,  
+                                                 COLL_TAG_ALLGATHERV,
                                                  ((char *)tmp_buf + recv_offset * recvtype_extent),
                                                  total_count - recv_offset, recvtype, dst,
-                                                 MPIR_ALLGATHERV_TAG,
+                                                 COLL_TAG_ALLGATHERV,
                                                  comm, &status);
                         /* for convenience, recv is posted for a bigger amount
                            than will be sent */
@@ -159,7 +158,7 @@ int smpi_coll_tuned_allgatherv_mpich_rdb (
                             smpi_mpi_send(((char *)tmp_buf + offset),
                                                      last_recv_cnt,
                                                      recvtype, dst,
-                                                     MPIR_ALLGATHERV_TAG, comm);
+                                                     COLL_TAG_ALLGATHERV, comm);
                             /* last_recv_cnt was set in the previous
                                receive. that's the amount of data to be
                                sent now. */
@@ -176,7 +175,7 @@ int smpi_coll_tuned_allgatherv_mpich_rdb (
 
                             smpi_mpi_recv(((char *)tmp_buf + offset * recvtype_extent),
                                                      total_count - offset, recvtype,
-                                                     dst, MPIR_ALLGATHERV_TAG,
+                                                     dst, COLL_TAG_ALLGATHERV,
                                                      comm, &status);
                                 /* for convenience, recv is posted for a
                                    bigger amount than will be sent */
index 420f430..bffcbac 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include "colls_private.h"
-#define  MCA_COLL_BASE_TAG_ALLGATHERV 444
 /*
  * ompi_coll_tuned_allgatherv_intra_bruck
  *
@@ -159,9 +158,9 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount,
 
       /* Sendreceive */
       smpi_mpi_sendrecv(rbuf, 1, new_sdtype, sendto,
-                                     MCA_COLL_BASE_TAG_ALLGATHERV,
+                                     COLL_TAG_ALLGATHERV,
                                      rbuf, 1, new_rdtype, recvfrom,
-                                     MCA_COLL_BASE_TAG_ALLGATHERV,
+                                     COLL_TAG_ALLGATHERV,
                                      comm, MPI_STATUS_IGNORE);
       smpi_datatype_free(&new_sdtype);
       smpi_datatype_free(&new_rdtype);
index f80e681..3692a38 100644 (file)
@@ -59,7 +59,6 @@
  */
  
  #include "colls_private.h"
- #define  MCA_COLL_BASE_TAG_ALLGATHERV 444
  
 int 
 smpi_coll_tuned_allgatherv_ompi_neighborexchange(void *sbuf, int scount,
@@ -142,9 +141,9 @@ smpi_coll_tuned_allgatherv_ompi_neighborexchange(void *sbuf, int scount,
     tmprecv = (char*)rbuf + rdispls[neighbor[0]] * rext;
     tmpsend = (char*)rbuf + rdispls[rank] * rext;
     smpi_mpi_sendrecv(tmpsend, rcounts[rank], rdtype, 
-                                   neighbor[0], MCA_COLL_BASE_TAG_ALLGATHERV,
+                                   neighbor[0], COLL_TAG_ALLGATHERV,
                                    tmprecv, rcounts[neighbor[0]], rdtype, 
-                                   neighbor[0], MCA_COLL_BASE_TAG_ALLGATHERV,
+                                   neighbor[0], COLL_TAG_ALLGATHERV,
                                    comm, MPI_STATUS_IGNORE);
 
 
@@ -194,9 +193,9 @@ smpi_coll_tuned_allgatherv_ompi_neighborexchange(void *sbuf, int scount,
       
         /* Sendreceive */
         smpi_mpi_sendrecv(tmpsend, 1, new_sdtype, neighbor[i_parity],
-                                       MCA_COLL_BASE_TAG_ALLGATHERV,
+                                       COLL_TAG_ALLGATHERV,
                                        tmprecv, 1, new_rdtype, neighbor[i_parity],
-                                       MCA_COLL_BASE_TAG_ALLGATHERV,
+                                       COLL_TAG_ALLGATHERV,
                                        comm, MPI_STATUS_IGNORE);
 
         send_data_from = recv_data_from[i_parity];
index d60e77a..c73366e 100644 (file)
@@ -67,7 +67,7 @@ smpi_coll_tuned_allgatherv_pair(void *send_buff, int send_count,
 
   MPI_Aint extent;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHERV;
   MPI_Status status;
 
   char *send_ptr = (char *) send_buff;
index 4c1e14f..fc7598c 100644 (file)
@@ -66,7 +66,7 @@ smpi_coll_tuned_allgatherv_ring(void *send_buff, int send_count,
 
   MPI_Aint extent;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLGATHERV;
   MPI_Status status;
 
   char *sendptr = (char *) send_buff;
index a8cf48d..51e3aed 100644 (file)
@@ -14,7 +14,7 @@ int
 smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount,
                               MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
-  int tag = 5000;
+  int tag = COLL_TAG_ALLREDUCE;
   MPI_Status status;
   int rank, i, size, count;
   int send_offset, recv_offset;
index 81cb392..9bb4149 100644 (file)
@@ -17,7 +17,7 @@ int
 smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount,
                              MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
-  int tag = 5000;
+  int tag = COLL_TAG_ALLREDUCE;
   MPI_Status status;
   int rank, i, size, count;
   int send_offset, recv_offset;
index 9d5ee9c..6024607 100644 (file)
@@ -4,7 +4,7 @@ int smpi_coll_tuned_allreduce_rab_rdb(void *sbuff, void *rbuff, int count,
                                       MPI_Datatype dtype, MPI_Op op,
                                       MPI_Comm comm)
 {
-  int nprocs, rank, tag = 543;
+  int nprocs, rank, tag = COLL_TAG_ALLREDUCE;
   int mask, dst, pof2, newrank, rem, newdst, i,
       send_idx, recv_idx, last_idx, send_cnt, recv_cnt, *cnts, *disps;
   MPI_Aint extent;
index 5650ef2..13abd17 100644 (file)
@@ -334,7 +334,7 @@ int smpi_coll_tuned_allreduce_rab_reduce_scatter(void *sbuff, void *rbuff,
                                                  int count, MPI_Datatype dtype,
                                                  MPI_Op op, MPI_Comm comm)
 {
-  int nprocs, rank, type_size, tag = 543;
+  int nprocs, rank, type_size, tag = COLL_TAG_ALLREDUCE;
   int mask, dst, pof2, newrank, rem, newdst, i,
       send_idx, recv_idx, last_idx, send_cnt, recv_cnt, *cnts, *disps;
   MPI_Aint lb, extent;
index 34e23d6..c387a22 100644 (file)
@@ -5,7 +5,7 @@ int smpi_coll_tuned_allreduce_rab_rsag(void *sbuff, void *rbuff, int count,
                                        MPI_Datatype dtype, MPI_Op op,
                                        MPI_Comm comm)
 {
-  int nprocs, rank, tag = 543;
+  int nprocs, rank, tag = COLL_TAG_ALLREDUCE;
   int mask, dst, pof2, newrank, rem, newdst, i,
       send_idx, recv_idx, last_idx, send_cnt, recv_cnt, *cnts, *disps;
   MPI_Aint extent;
index ae72f74..66862da 100644 (file)
@@ -8,7 +8,7 @@ int smpi_coll_tuned_allreduce_rab1(void *sbuff, void *rbuff,
 {
   MPI_Status status;
   MPI_Aint extent;
-  int tag = 4321, rank, nprocs, send_size, newcnt, share;
+  int tag = COLL_TAG_ALLREDUCE, rank, nprocs, send_size, newcnt, share;
   int pof2 = 1, mask, send_idx, recv_idx, dst, send_cnt, recv_cnt;
 
   void *recv, *tmp_buf;
index 44717ad..23e7e30 100644 (file)
@@ -4,7 +4,7 @@
 int smpi_coll_tuned_allreduce_rdb(void *sbuff, void *rbuff, int count,
                                   MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
-  int nprocs, rank, tag = 543;
+  int nprocs, rank, tag = COLL_TAG_ALLREDUCE;
   int mask, dst, pof2, newrank, rem, newdst;
   MPI_Aint extent, lb;
   MPI_Status status;
index 93d72bb..68c99f5 100644 (file)
@@ -43,7 +43,7 @@ int smpi_coll_tuned_allreduce_smp_binomial_pipeline(void *send_buf,
 {
   int comm_size, rank;
   void *tmp_buf;
-  int tag = 50;
+  int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   MPI_Status status;
   int num_core = NUM_CORE;
index ed9b68c..77a5abc 100644 (file)
@@ -32,7 +32,7 @@ int smpi_coll_tuned_allreduce_smp_binomial(void *send_buf, void *recv_buf,
 {
   int comm_size, rank;
   void *tmp_buf;
-  int tag = 50;
+  int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   int num_core = NUM_CORE;
   MPI_Status status;
index d208584..b6def2e 100644 (file)
@@ -31,7 +31,7 @@ int smpi_coll_tuned_allreduce_smp_rdb(void *send_buf, void *recv_buf, int count,
 {
   int comm_size, rank;
   void *tmp_buf;
-  int tag = 50;
+  int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   MPI_Status status;
   int num_core = NUM_CORE;
index fd49327..ce90781 100644 (file)
@@ -20,7 +20,7 @@ int smpi_coll_tuned_allreduce_smp_rsag_lr(void *send_buf, void *recv_buf,
 {
   int comm_size, rank;
   void *tmp_buf;
-  int tag = 50;
+  int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   MPI_Status status;
   int num_core = NUM_CORE;
index c98b78d..cec7521 100644 (file)
@@ -23,7 +23,7 @@ int smpi_coll_tuned_allreduce_smp_rsag_rab(void *sbuf, void *rbuf, int count,
 {
   int comm_size, rank;
   void *tmp_buf;
-  int tag = 50;
+  int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   MPI_Status status;
   int num_core = NUM_CORE;
index 24ccaa0..573f5c6 100644 (file)
@@ -19,7 +19,7 @@ int smpi_coll_tuned_allreduce_smp_rsag(void *send_buf, void *recv_buf,
 {
   int comm_size, rank;
   void *tmp_buf;
-  int tag = 50;
+  int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   MPI_Status status;
   int num_core = NUM_CORE;
index 61ea21e..08f4db2 100644 (file)
@@ -60,7 +60,7 @@ int smpi_coll_tuned_alltoall_2dmesh(void *send_buff, int send_count,
   int i, j, src, dst, rank, num_procs, count, num_reqs;
   int X, Y, send_offset, recv_offset;
   int my_row_base, my_col_base, src_row_base, block_size;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALL;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index ca10de7..c226927 100644 (file)
@@ -50,7 +50,7 @@ int smpi_coll_tuned_alltoall_3dmesh(void *send_buff, int send_count,
   MPI_Status status, *statuses;
   int i, j, src, dst, rank, num_procs, num_reqs, X, Y, Z, block_size, count;
   int my_z, two_dsize, my_row_base, my_col_base, my_z_base, src_row_base;
-  int src_z_base, send_offset, recv_offset, tag = 1;
+  int src_z_base, send_offset, recv_offset, tag = COLL_TAG_ALLTOALL;
 
   char *tmp_buff1, *tmp_buff2;
 
index d38b3e5..9e3117c 100644 (file)
@@ -30,7 +30,7 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count,
 
   int *blocks_length, *disps;
   int i, src, dst, rank, num_procs, count, remainder, block, position;
-  int pack_size, tag = 1, pof2 = 1;
+  int pack_size, tag = COLL_TAG_ALLTOALL, pof2 = 1;
 
 
   char *tmp_buff;
index e23944f..8daee00 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include "colls_private.h"
-#define MCA_COLL_BASE_TAG_ALLTOALL 101
 
 int smpi_coll_tuned_alltoall_ompi_pairwise(void *sbuf, int scount, 
                                             MPI_Datatype sdtype,
@@ -53,9 +52,9 @@ int smpi_coll_tuned_alltoall_ompi_pairwise(void *sbuf, int scount,
 
         /* send and receive */
         smpi_mpi_sendrecv( tmpsend, scount, sdtype, sendto, 
-                                        MCA_COLL_BASE_TAG_ALLTOALL,
+                                        COLL_TAG_ALLTOALL,
                                         tmprecv, rcount, rdtype, recvfrom, 
-                                        MCA_COLL_BASE_TAG_ALLTOALL,
+                                        COLL_TAG_ALLTOALL,
                                         comm, MPI_STATUS_IGNORE);
     }
 
index 96cf68d..65ae5f8 100644 (file)
@@ -31,7 +31,7 @@ smpi_coll_tuned_alltoall_pair_light_barrier(void *send_buff, int send_count,
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs, next_partner;
-  int tag = 1;     /*, failure = 0; */
+  int tag = COLL_TAG_ALLTOALL;     /*, failure = 0; */
 
   char send_sync = 'a', recv_sync = 'b';
   char *send_ptr = (char *) send_buff;
index f12c3f9..ef36248 100644 (file)
@@ -30,7 +30,7 @@ smpi_coll_tuned_alltoall_pair_mpi_barrier(void *send_buff, int send_count,
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 101;
+  int tag = COLL_TAG_ALLTOALL;
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
 
index 19e693d..0d14d28 100644 (file)
@@ -30,7 +30,7 @@ smpi_coll_tuned_alltoall_pair_one_barrier(void *send_buff, int send_count,
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALL;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index 24ef5f7..66c4767 100644 (file)
@@ -68,7 +68,7 @@ int smpi_coll_tuned_alltoall_pair(void *send_buff, int send_count,
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALL;
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
 
index 45b529f..9c0b9cc 100644 (file)
@@ -33,7 +33,7 @@ int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
   int dst_tree_root, rank_tree_root, send_offset, recv_offset;
   int rank, num_procs, j, k, dst, curr_size, max_size;
   int last_recv_count = 0, tmp_mask, tree_root, num_procs_completed;
-  int tag = 1, mask = 1, i = 0;
+  int tag = COLL_TAG_ALLTOALL, mask = 1, i = 0;
 
   char *tmp_buff;
   char *send_ptr = (char *) send_buff;
index d45912b..df280bb 100644 (file)
@@ -31,7 +31,7 @@ smpi_coll_tuned_alltoall_ring_light_barrier(void *send_buff, int send_count,
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs, next_dst, next_src;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALL;
 
   char send_sync = 'a', recv_sync = 'b';
   char *send_ptr = (char *) send_buff;
index e3a3f2d..7b84edb 100644 (file)
@@ -29,7 +29,7 @@ smpi_coll_tuned_alltoall_ring_mpi_barrier(void *send_buff, int send_count,
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALL;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index 97b912b..30583fb 100644 (file)
@@ -28,7 +28,7 @@ smpi_coll_tuned_alltoall_ring_one_barrier(void *send_buff, int send_count,
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALL;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index 622fd9d..16ba29c 100644 (file)
@@ -28,7 +28,7 @@ smpi_coll_tuned_alltoall_ring(void *send_buff, int send_count,
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 11;
+  int tag = COLL_TAG_ALLTOALL;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index fa50a8c..f6edcdc 100644 (file)
@@ -27,7 +27,7 @@ int smpi_coll_tuned_alltoall_simple(void *send_buff, int send_count,
                                     void *recv_buff, int recv_count,
                                     MPI_Datatype recv_type, MPI_Comm comm)
 {
-  int i, rank, size, nreqs, src, dst, tag = 101;
+  int i, rank, size, nreqs, src, dst, tag = COLL_TAG_ALLTOALL;
   char *psnd;
   char *prcv;
   MPI_Aint sndinc;
index 0296798..3a4183b 100644 (file)
@@ -12,7 +12,7 @@ int smpi_coll_tuned_alltoallv_bruck(void *sendbuf, int *sendcounts, int *senddis
                                    int *recvcounts, int *recvdisps, MPI_Datatype recvtype,
                                    MPI_Comm comm)
 {
-  int system_tag = 777;
+  int system_tag = COLL_TAG_ALLTOALLV;
   int i, rank, size, err, count;
   MPI_Aint lb;
   MPI_Aint sendext = 0;
index f90471d..abc29f5 100644 (file)
@@ -1,6 +1,5 @@
 
 #include "colls_private.h"
-#define MCA_COLL_BASE_TAG_ALLTOALLV 111
 /*  
  * Linear functions are copied from the basic coll module.  For
  * some small number of nodes and/or small data sizes they are just as
@@ -57,7 +56,7 @@ smpi_coll_tuned_alltoallv_ompi_basic_linear(void *sbuf, int *scounts, int *sdisp
         prcv = ((char *) rbuf) + (rdisps[i] * rext);
 
         *preq = smpi_irecv_init(prcv, rcounts[i], rdtype,
-                                      i, MCA_COLL_BASE_TAG_ALLTOALLV, comm
+                                      i, COLL_TAG_ALLTOALLV, comm
                                       );
         preq++;
         ++nreqs;
@@ -72,7 +71,7 @@ smpi_coll_tuned_alltoallv_ompi_basic_linear(void *sbuf, int *scounts, int *sdisp
 
         psnd = ((char *) sbuf) + (sdisps[i] * sext);
         *preq=smpi_isend_init(psnd, scounts[i], sdtype,
-                                      i, MCA_COLL_BASE_TAG_ALLTOALLV, comm
+                                      i, COLL_TAG_ALLTOALLV, comm
                                       );
         preq++;
         ++nreqs;
index 45a864b..60e2647 100644 (file)
@@ -31,7 +31,7 @@ smpi_coll_tuned_alltoallv_pair_light_barrier(void *send_buff, int *send_counts,
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs, next_partner;
-  int tag = 1;     /*, failure = 0; */
+  int tag = COLL_TAG_ALLTOALLV;     /*, failure = 0; */
 
   char send_sync = 'a', recv_sync = 'b';
   char *send_ptr = (char *) send_buff;
index 9944493..62b0d71 100644 (file)
@@ -30,7 +30,7 @@ smpi_coll_tuned_alltoallv_pair_mpi_barrier(void *send_buff, int *send_counts, in
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 101;
+  int tag = COLL_TAG_ALLTOALLV;
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
 
index ab1f48e..7bea7e7 100644 (file)
@@ -29,7 +29,7 @@ smpi_coll_tuned_alltoallv_pair_one_barrier(void *send_buff, int *send_counts, in
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALLV;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index 50839df..6692eeb 100644 (file)
@@ -30,7 +30,7 @@ int smpi_coll_tuned_alltoallv_pair(void *send_buff, int *send_counts, int *send_
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALLV;
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
 
index 7a42ab9..d9653e3 100644 (file)
@@ -31,7 +31,7 @@ smpi_coll_tuned_alltoallv_ring_light_barrier(void *send_buff, int *send_counts,
   MPI_Aint send_chunk, recv_chunk;
   MPI_Status s;
   int i, src, dst, rank, num_procs, next_dst, next_src;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALLV;
 
   char send_sync = 'a', recv_sync = 'b';
   char *send_ptr = (char *) send_buff;
index 273f15c..36af835 100644 (file)
@@ -29,7 +29,7 @@ smpi_coll_tuned_alltoallv_ring_mpi_barrier(void *send_buff, int *send_counts, in
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALLV;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index 8e2d0cd..7f5e795 100644 (file)
@@ -28,7 +28,7 @@ smpi_coll_tuned_alltoallv_ring_one_barrier(void *send_buff, int *send_counts, in
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_ALLTOALLV;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index dcd4b35..dcbb9f4 100644 (file)
@@ -29,7 +29,7 @@ smpi_coll_tuned_alltoallv_ring(void *send_buff, int *send_counts, int *send_disp
   MPI_Status s;
   MPI_Aint send_chunk, recv_chunk;
   int i, src, dst, rank, num_procs;
-  int tag = 11;
+  int tag = COLL_TAG_ALLTOALLV;
 
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
index 39bdeb1..8a210fe 100644 (file)
@@ -21,7 +21,6 @@
 #include "coll_tuned_topo.h"
 
 
-#define MCA_COLL_BASE_TAG_BARRIER 100
 /*
  * Barrier is ment to be a synchronous operation, as some BTLs can mark 
  * a request done before its passed to the NIC and progress might not be made 
@@ -58,38 +57,38 @@ int smpi_coll_tuned_barrier_ompi_doublering(MPI_Comm comm
 
     if (rank > 0) { /* receive message from the left */
         smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left, 
-                                MCA_COLL_BASE_TAG_BARRIER, comm, 
+                                COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
     /* Send message to the right */
     smpi_mpi_send((void*)NULL, 0, MPI_BYTE, right, 
-                            MCA_COLL_BASE_TAG_BARRIER, 
+                            COLL_TAG_BARRIER,
                              comm);
 
     /* root needs to receive from the last node */
     if (rank == 0) {
         smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left, 
-                                MCA_COLL_BASE_TAG_BARRIER, comm, 
+                                COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
     /* Allow nodes to exit */
     if (rank > 0) { /* post Receive from left */
         smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left, 
-                                MCA_COLL_BASE_TAG_BARRIER, comm, 
+                                COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
     /* send message to the right one */
     smpi_mpi_send((void*)NULL, 0, MPI_BYTE, right, 
-                            MCA_COLL_BASE_TAG_BARRIER, 
+                            COLL_TAG_BARRIER,
                              comm);
  
     /* rank 0 post receive from the last node */
     if (rank == 0) {
         smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left, 
-                                MCA_COLL_BASE_TAG_BARRIER, comm, 
+                                COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
@@ -124,16 +123,16 @@ int smpi_coll_tuned_barrier_ompi_recursivedoubling(MPI_Comm comm
             /* send message to lower ranked node */
             remote = rank - adjsize;
             smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, remote,
-                                                  MCA_COLL_BASE_TAG_BARRIER,
+                                                  COLL_TAG_BARRIER,
                                                   NULL, 0, MPI_BYTE, remote,
-                                                  MCA_COLL_BASE_TAG_BARRIER,
+                                                  COLL_TAG_BARRIER,
                                                   comm, MPI_STATUS_IGNORE);
 
         } else if (rank < (size - adjsize)) {
 
             /* receive message from high level rank */
             smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, rank+adjsize,
-                                    MCA_COLL_BASE_TAG_BARRIER, comm, 
+                                    COLL_TAG_BARRIER, comm,
                                     MPI_STATUS_IGNORE);
 
         }
@@ -149,9 +148,9 @@ int smpi_coll_tuned_barrier_ompi_recursivedoubling(MPI_Comm comm
 
             /* post receive from the remote node */
             smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, remote,
-                                                  MCA_COLL_BASE_TAG_BARRIER,
+                                                  COLL_TAG_BARRIER,
                                                   NULL, 0, MPI_BYTE, remote,
-                                                  MCA_COLL_BASE_TAG_BARRIER,
+                                                  COLL_TAG_BARRIER,
                                                   comm, MPI_STATUS_IGNORE);
         }
     }
@@ -162,7 +161,7 @@ int smpi_coll_tuned_barrier_ompi_recursivedoubling(MPI_Comm comm
             /* send enter message to higher ranked node */
             remote = rank + adjsize;
             smpi_mpi_send((void*)NULL, 0, MPI_BYTE, remote, 
-                                    MCA_COLL_BASE_TAG_BARRIER, 
+                                    COLL_TAG_BARRIER,
                                      comm);
 
         }
@@ -195,9 +194,9 @@ int smpi_coll_tuned_barrier_ompi_bruck(MPI_Comm comm
 
         /* send message to lower ranked node */
         smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, to, 
-                                              MCA_COLL_BASE_TAG_BARRIER,
+                                              COLL_TAG_BARRIER,
                                               NULL, 0, MPI_BYTE, from, 
-                                              MCA_COLL_BASE_TAG_BARRIER,
+                                              COLL_TAG_BARRIER,
                                               comm, MPI_STATUS_IGNORE);
     }
 
@@ -221,9 +220,9 @@ int smpi_coll_tuned_barrier_ompi_two_procs(MPI_Comm comm
     remote = (remote + 1) & 0x1;
 
     smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, remote, 
-                                          MCA_COLL_BASE_TAG_BARRIER, 
+                                          COLL_TAG_BARRIER,
                                           NULL, 0, MPI_BYTE, remote, 
-                                          MCA_COLL_BASE_TAG_BARRIER,
+                                          COLL_TAG_BARRIER,
                                           comm, MPI_STATUS_IGNORE);
     return (MPI_SUCCESS);
 }
@@ -253,11 +252,11 @@ int smpi_coll_tuned_barrier_ompi_basic_linear(MPI_Comm comm)
 
     if (rank > 0) {
         smpi_mpi_send (NULL, 0, MPI_BYTE, 0, 
-                                 MCA_COLL_BASE_TAG_BARRIER,
+                                 COLL_TAG_BARRIER,
                                   comm);
 
         smpi_mpi_recv (NULL, 0, MPI_BYTE, 0, 
-                                 MCA_COLL_BASE_TAG_BARRIER,
+                                 COLL_TAG_BARRIER,
                                  comm, MPI_STATUS_IGNORE);
     }
 
@@ -269,14 +268,14 @@ int smpi_coll_tuned_barrier_ompi_basic_linear(MPI_Comm comm)
         requests = (MPI_Request*)malloc( size * sizeof(MPI_Request) );
         for (i = 1; i < size; ++i) {
             requests[i] = smpi_mpi_irecv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE,
-                                     MCA_COLL_BASE_TAG_BARRIER, comm
+                                     COLL_TAG_BARRIER, comm
                                      );
         }
         smpi_mpi_waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
 
         for (i = 1; i < size; ++i) {
             requests[i] = smpi_mpi_isend(NULL, 0, MPI_BYTE, i,
-                                     MCA_COLL_BASE_TAG_BARRIER, 
+                                     COLL_TAG_BARRIER,
                                       comm
                                      );
         }
@@ -314,11 +313,11 @@ int smpi_coll_tuned_barrier_ompi_tree(MPI_Comm comm)
         if (!(partner & (jump-1)) && partner < size) {
             if (partner > rank) {
                 smpi_mpi_recv (NULL, 0, MPI_BYTE, partner, 
-                                         MCA_COLL_BASE_TAG_BARRIER, comm,
+                                         COLL_TAG_BARRIER, comm,
                                          MPI_STATUS_IGNORE);
             } else if (partner < rank) {
                 smpi_mpi_send (NULL, 0, MPI_BYTE, partner,
-                                         MCA_COLL_BASE_TAG_BARRIER, 
+                                         COLL_TAG_BARRIER,
                                           comm);
             }
         }
@@ -330,11 +329,11 @@ int smpi_coll_tuned_barrier_ompi_tree(MPI_Comm comm)
         if (!(partner & (jump-1)) && partner < size) {
             if (partner > rank) {
                 smpi_mpi_send (NULL, 0, MPI_BYTE, partner,
-                                         MCA_COLL_BASE_TAG_BARRIER,
+                                         COLL_TAG_BARRIER,
                                           comm);
             } else if (partner < rank) {
                 smpi_mpi_recv (NULL, 0, MPI_BYTE, partner, 
-                                         MCA_COLL_BASE_TAG_BARRIER, comm,
+                                         COLL_TAG_BARRIER, comm,
                                          MPI_STATUS_IGNORE);
             }
         }
index 93ace1d..4ebfc15 100644 (file)
@@ -5,7 +5,7 @@ int bcast_NTSB_segment_size_in_byte = 8192;
 int smpi_coll_tuned_bcast_NTSB(void *buf, int count, MPI_Datatype datatype,
                                int root, MPI_Comm comm)
 {
-  int tag = 5000;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   int rank, size;
   int i;
index 89f8f5c..ecdcdc7 100644 (file)
@@ -8,7 +8,7 @@ static int bcast_NTSL_segment_size_in_byte = 8192;
 int smpi_coll_tuned_bcast_NTSL_Isend(void *buf, int count, MPI_Datatype datatype,
                                int root, MPI_Comm comm)
 {
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *send_request_array;
index 090edc7..53a7d76 100644 (file)
@@ -8,7 +8,7 @@ static int bcast_NTSL_segment_size_in_byte = 8192;
 int smpi_coll_tuned_bcast_NTSL(void *buf, int count, MPI_Datatype datatype,
                                int root, MPI_Comm comm)
 {
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *send_request_array;
index ec717e2..1645e71 100644 (file)
@@ -9,7 +9,7 @@ int smpi_coll_tuned_bcast_SMP_binary(void *buf, int count,
                                      MPI_Datatype datatype, int root,
                                      MPI_Comm comm)
 {
-  int tag = 5000;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *request_array;
index 9919302..c2b24a4 100644 (file)
@@ -11,7 +11,7 @@ int smpi_coll_tuned_bcast_SMP_binomial(void *buf, int count,
   int size;
   int rank;
   MPI_Status status;
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
 
   size = smpi_comm_size(comm);
   rank = smpi_comm_rank(comm);
index 673f6cf..b999b39 100644 (file)
@@ -9,7 +9,7 @@ int smpi_coll_tuned_bcast_SMP_linear(void *buf, int count,
                                      MPI_Datatype datatype, int root,
                                      MPI_Comm comm)
 {
-  int tag = 5000;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *request_array;
index be088ed..15280f4 100644 (file)
@@ -10,7 +10,7 @@ int smpi_coll_tuned_bcast_arrival_nb(void *buf, int count,
                                      MPI_Datatype datatype, int root,
                                      MPI_Comm comm)
 {
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *send_request_array;
index 0a12246..285c163 100644 (file)
@@ -27,7 +27,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware_wait(void *buf, int count,
 
   int rank, size;
   int i, j, k;
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
   int will_send[BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE];
 
   int sent_count;
index a9df449..1e8f95a 100644 (file)
@@ -10,7 +10,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count,
                                                 MPI_Datatype datatype, int root,
                                                 MPI_Comm comm)
 {
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *send_request_array;
index 6ad805d..761c15f 100644 (file)
@@ -13,7 +13,7 @@ int smpi_coll_tuned_bcast_arrival_scatter(void *buf, int count,
                                           MPI_Datatype datatype, int root,
                                           MPI_Comm comm)
 {
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
   int header_tag = 10;
   MPI_Status status;
 
index e840c02..0b37d39 100644 (file)
@@ -68,7 +68,7 @@ smpi_coll_tuned_bcast_binomial_tree(void *buff, int count,
                                     MPI_Comm comm)
 {
   int src, dst, rank, num_procs, mask, relative_rank;
-  int tag = 1;
+  int tag = COLL_TAG_BCAST;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index 9033bf5..434b684 100644 (file)
@@ -8,7 +8,7 @@ smpi_coll_tuned_bcast_flattree_pipeline(void *buff, int count,
                                         MPI_Comm comm)
 {
   int i, j, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_BCAST;
 
   MPI_Aint extent;
   extent = smpi_datatype_get_extent(data_type);
index 626c203..4cf3308 100644 (file)
@@ -8,7 +8,7 @@ smpi_coll_tuned_bcast_flattree(void *buff, int count, MPI_Datatype data_type,
   MPI_Request *reqs;
 
   int i, rank, num_procs;
-  int tag = 1;
+  int tag = COLL_TAG_BCAST;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index 63c2067..cd0e3ce 100644 (file)
@@ -96,7 +96,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
             for( i = 0; i < tree->tree_nextsize; i++ ) { 
                 send_reqs[i] = smpi_mpi_isend(tmpbuf, sendcount, datatype,
                                          tree->tree_next[i], 
-                                         777, comm);
+                                         COLL_TAG_BCAST, comm);
            } 
 
             /* complete the sends before starting the next sends */
@@ -124,7 +124,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
          */
         req_index = 0;
         recv_reqs[req_index]=smpi_mpi_irecv(tmpbuf, count_by_segment, datatype,
-                           tree->tree_prev, 777,
+                           tree->tree_prev, COLL_TAG_BCAST,
                            comm);
         
         for( segindex = 1; segindex < num_segments; segindex++ ) {
@@ -134,7 +134,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
             /* post new irecv */
             recv_reqs[req_index]= smpi_mpi_irecv( tmpbuf + realsegsize, count_by_segment,
                                 datatype, tree->tree_prev, 
-                                777, 
+                                COLL_TAG_BCAST,
                                 comm);
             
             /* wait for and forward the previous segment to children */
@@ -144,7 +144,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
             for( i = 0; i < tree->tree_nextsize; i++ ) { 
                 send_reqs[i]=smpi_mpi_isend(tmpbuf, count_by_segment, datatype,
                                          tree->tree_next[i], 
-                                         777, comm );
+                                         COLL_TAG_BCAST, comm );
             } 
             
             /* complete the sends before starting the next iteration */
@@ -161,7 +161,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
         for( i = 0; i < tree->tree_nextsize; i++ ) {
             send_reqs[i] = smpi_mpi_isend(tmpbuf, sendcount, datatype,
                                      tree->tree_next[i], 
-                                     777, comm);
+                                     COLL_TAG_BCAST, comm);
         }
         
         smpi_mpi_waitall( tree->tree_nextsize, send_reqs, 
@@ -180,7 +180,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
         */
         req_index = 0;
         recv_reqs[req_index] = smpi_mpi_irecv(tmpbuf, count_by_segment, datatype,
-                                 tree->tree_prev, 777,
+                                 tree->tree_prev, COLL_TAG_BCAST,
                                  comm);
 
         for( segindex = 1; segindex < num_segments; segindex++ ) {
@@ -188,7 +188,7 @@ int smpi_coll_tuned_bcast_ompi_pipeline( void* buffer,
             tmpbuf += realsegsize;
             /* post receive for the next segment */
             recv_reqs[req_index] = smpi_mpi_irecv(tmpbuf, count_by_segment, datatype, 
-                                     tree->tree_prev, 777, 
+                                     tree->tree_prev, COLL_TAG_BCAST,
                                      comm);
             /* wait on the previous segment */
             smpi_mpi_wait( &recv_reqs[req_index ^ 0x1], 
index f1201d1..58bf387 100644 (file)
@@ -171,7 +171,7 @@ smpi_coll_tuned_bcast_ompi_split_bintree ( void* buffer,
                     sendcount[i] = counts[i] - segindex*segcount[i];
                 /* send data */
                 smpi_mpi_send(tmpbuf[i], sendcount[i], datatype,
-                                  tree->tree_next[i], 777, comm);
+                                  tree->tree_next[i], COLL_TAG_BCAST, comm);
                 /* update tmp buffer */
                 tmpbuf[i] += realsegsize[i];
             }
@@ -193,7 +193,7 @@ smpi_coll_tuned_bcast_ompi_split_bintree ( void* buffer,
          */
         sendcount[lr] = segcount[lr];
         base_req=smpi_mpi_irecv(tmpbuf[lr], sendcount[lr], datatype,
-                           tree->tree_prev, 777,
+                           tree->tree_prev, COLL_TAG_BCAST,
                            comm);
 
         for( segindex = 1; segindex < num_segments[lr]; segindex++ ) {
@@ -202,14 +202,14 @@ smpi_coll_tuned_bcast_ompi_split_bintree ( void* buffer,
                 sendcount[lr] = counts[lr] - segindex*segcount[lr];
             /* post new irecv */
             new_req = smpi_mpi_irecv( tmpbuf[lr] + realsegsize[lr], sendcount[lr],
-                                datatype, tree->tree_prev, 777, 
+                                datatype, tree->tree_prev, COLL_TAG_BCAST,
                                 comm);
 
             /* wait for and forward current segment */
             smpi_mpi_waitall( 1, &base_req, MPI_STATUSES_IGNORE );
             for( i = 0; i < tree->tree_nextsize; i++ ) {  /* send data to children (segcount[lr]) */
                 smpi_mpi_send( tmpbuf[lr], segcount[lr], datatype,
-                                   tree->tree_next[i], 777,
+                                   tree->tree_next[i], COLL_TAG_BCAST,
                                    comm);
             } /* end of for each child */
 
@@ -223,7 +223,7 @@ smpi_coll_tuned_bcast_ompi_split_bintree ( void* buffer,
         smpi_mpi_waitall( 1, &base_req, MPI_STATUSES_IGNORE );
         for( i = 0; i < tree->tree_nextsize; i++ ) {  /* send data to children */
             smpi_mpi_send(tmpbuf[lr], sendcount[lr], datatype,
-                              tree->tree_next[i], 777, comm);
+                              tree->tree_next[i], COLL_TAG_BCAST, comm);
         } /* end of for each child */
     } 
   
@@ -236,7 +236,7 @@ smpi_coll_tuned_bcast_ompi_split_bintree ( void* buffer,
             if (segindex == (num_segments[lr] - 1)) sendcount[lr] = counts[lr] - segindex*segcount[lr];
             /* receive segments */
             smpi_mpi_recv(tmpbuf[lr], sendcount[lr], datatype,
-                              tree->tree_prev, 777,
+                              tree->tree_prev, COLL_TAG_BCAST,
                               comm, MPI_STATUS_IGNORE);
             /* update the initial pointer to the buffer */
             tmpbuf[lr] += realsegsize[lr];
@@ -265,29 +265,29 @@ smpi_coll_tuned_bcast_ompi_split_bintree ( void* buffer,
     if ( (size%2) != 0 && rank != root) { 
 
         smpi_mpi_sendrecv( tmpbuf[lr], counts[lr], datatype,
-                                        pair, 777,
+                                        pair, COLL_TAG_BCAST,
                                         tmpbuf[(lr+1)%2], counts[(lr+1)%2], datatype,
-                                        pair, 777,
+                                        pair, COLL_TAG_BCAST,
                                         comm, MPI_STATUS_IGNORE);
     } else if ( (size%2) == 0 ) {
         /* root sends right buffer to the last node */
         if( rank == root ) {
             smpi_mpi_send(tmpbuf[1], counts[1], datatype,
-                              (root+size-1)%size, 777, comm);
+                              (root+size-1)%size, COLL_TAG_BCAST, comm);
 
         } 
         /* last node receives right buffer from the root */
         else if (rank == (root+size-1)%size) {
             smpi_mpi_recv(tmpbuf[1], counts[1], datatype,
-                              root, 777,
+                              root, COLL_TAG_BCAST,
                               comm, MPI_STATUS_IGNORE);
         } 
         /* everyone else exchanges buffers */
         else {
             smpi_mpi_sendrecv( tmpbuf[lr], counts[lr], datatype,
-                                            pair, 777,
+                                            pair, COLL_TAG_BCAST,
                                             tmpbuf[(lr+1)%2], counts[(lr+1)%2], datatype,
-                                            pair, 777,
+                                            pair, COLL_TAG_BCAST,
                                             comm, MPI_STATUS_IGNORE); 
         }
     }
index ebd5539..bf7a05a 100644 (file)
@@ -71,7 +71,7 @@ smpi_coll_tuned_bcast_scatter_LR_allgather(void *buff, int count,
   int i, src, dst, rank, num_procs;
   int mask, relative_rank, curr_size, recv_size, send_size, nbytes;
   int scatter_size, left, right, next_src, *recv_counts, *disps;
-  int tag = 1;
+  int tag = COLL_TAG_BCAST;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index ab458e4..43cf25d 100644 (file)
@@ -73,7 +73,7 @@ smpi_coll_tuned_bcast_scatter_rdb_allgather(void *buff, int count, MPI_Datatype
   int mask, relative_rank, curr_size, recv_size = 0, send_size, nbytes;
   int scatter_size, tree_root, relative_dst, dst_tree_root;
   int my_tree_root, offset, tmp_mask, num_procs_completed;
-  int tag = 1;
+  int tag = COLL_TAG_BCAST;
 
   rank = smpi_comm_rank(comm);
   num_procs = smpi_comm_size(comm);
index 22e6e63..18f1d08 100644 (file)
@@ -19,7 +19,6 @@
 #include "colls_private.h"
 #include "coll_tuned_topo.h"
 
-#define MCA_COLL_BASE_TAG_GATHER 333
 /* Todo: gather_intra_generic, gather_intra_binary, gather_intra_chain,
  * gather_intra_pipeline, segmentation? */
 int
@@ -137,7 +136,7 @@ smpi_coll_tuned_gather_ompi_binomial(void *sbuf, int scount,
                         rank, bmtree->tree_next[i], mycount);
 
            smpi_mpi_recv(ptmp + total_recv*rextent, rcount*size-total_recv, rdtype,
-                                   bmtree->tree_next[i], MCA_COLL_BASE_TAG_GATHER,
+                                   bmtree->tree_next[i], COLL_TAG_GATHER,
                                    comm, &status);
 
            total_recv += mycount;
@@ -152,7 +151,7 @@ smpi_coll_tuned_gather_ompi_binomial(void *sbuf, int scount,
 
        smpi_mpi_send(ptmp, total_recv, sdtype,
                                bmtree->tree_prev,
-                               MCA_COLL_BASE_TAG_GATHER,
+                               COLL_TAG_GATHER,
                                 comm);
   }
     if (rank == root) {
@@ -243,16 +242,16 @@ smpi_coll_tuned_gather_ompi_linear_sync(void *sbuf, int scount,
                                       first_segment_count );
 
         smpi_mpi_recv(sbuf, 0, MPI_BYTE, root, 
-                                MCA_COLL_BASE_TAG_GATHER,
+                                COLL_TAG_GATHER,
                                 comm, MPI_STATUS_IGNORE);
 
         smpi_mpi_send(sbuf, first_segment_count, sdtype, root,
-                                MCA_COLL_BASE_TAG_GATHER,
+                                COLL_TAG_GATHER,
                                  comm);
 
         smpi_mpi_send((char*)sbuf + extent * first_segment_count, 
                                 (scount - first_segment_count), sdtype, 
-                                root, MCA_COLL_BASE_TAG_GATHER,
+                                root, COLL_TAG_GATHER,
                                  comm);
     }
 
@@ -288,18 +287,18 @@ smpi_coll_tuned_gather_ompi_linear_sync(void *sbuf, int scount,
             /* irecv for the first segment from i */
             ptmp = (char*)rbuf + i * rcount * extent;
             first_segment_req = smpi_mpi_irecv(ptmp, first_segment_count, rdtype, i,
-                                     MCA_COLL_BASE_TAG_GATHER, comm
+                                     COLL_TAG_GATHER, comm
                                      );
             
             /* send sync message */
             smpi_mpi_send(rbuf, 0, MPI_BYTE, i,
-                                    MCA_COLL_BASE_TAG_GATHER,
+                                    COLL_TAG_GATHER,
                                      comm);
 
             /* irecv for the second segment */
             ptmp = (char*)rbuf + (i * rcount + first_segment_count) * extent;
             reqs[i]=smpi_mpi_irecv(ptmp, (rcount - first_segment_count), 
-                                     rdtype, i, MCA_COLL_BASE_TAG_GATHER, comm
+                                     rdtype, i, COLL_TAG_GATHER, comm
                                      );
 
             /* wait on the first segment to complete */
@@ -376,7 +375,7 @@ smpi_coll_tuned_gather_ompi_basic_linear(void *sbuf, int scount,
 
     if (rank != root) {
         smpi_mpi_send(sbuf, scount, sdtype, root,
-                                 MCA_COLL_BASE_TAG_GATHER,
+                                 COLL_TAG_GATHER,
                                   comm);
         return MPI_SUCCESS;
     }
@@ -395,7 +394,7 @@ smpi_coll_tuned_gather_ompi_basic_linear(void *sbuf, int scount,
             }
         } else {
             smpi_mpi_recv(ptmp, rcount, rdtype, i,
-                                    MCA_COLL_BASE_TAG_GATHER,
+                                    COLL_TAG_GATHER,
                                     comm, MPI_STATUS_IGNORE);
             err = MPI_SUCCESS;
         }
index 5a3b887..2bb714a 100644 (file)
@@ -10,7 +10,7 @@ int smpi_coll_tuned_reduce_NTSL(void *buf, void *rbuf, int count,
                                 MPI_Datatype datatype, MPI_Op op, int root,
                                 MPI_Comm comm)
 {
-  int tag = 50;
+  int tag = COLL_TAG_REDUCE;
   MPI_Status status;
   MPI_Request *send_request_array;
   MPI_Request *recv_request_array;
index 1e25250..4038e70 100644 (file)
@@ -21,7 +21,7 @@ int smpi_coll_tuned_reduce_arrival_pattern_aware(void *buf, void *rbuf,
   int rank;
   rank = smpi_comm_rank(comm);
 
-  int tag = 50;
+  int tag = COLL_TAG_REDUCE;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *send_request_array;
index f2555f8..6c91ffb 100644 (file)
@@ -10,7 +10,7 @@ int smpi_coll_tuned_reduce_binomial(void *sendbuf, void *recvbuf, int count,
   int comm_size, rank;
   int mask, relrank, source;
   int dst;
-  int tag = 4321;
+  int tag = COLL_TAG_REDUCE;
   MPI_Aint extent;
   void *tmp_buf;
   MPI_Aint true_lb, true_extent;
index f304e78..9241be1 100644 (file)
@@ -6,7 +6,7 @@ smpi_coll_tuned_reduce_flat_tree(void *sbuf, void *rbuf, int count,
                                  MPI_Datatype dtype, MPI_Op op,
                                  int root, MPI_Comm comm)
 {
-  int i, tag = 4321;
+  int i, tag = COLL_TAG_REDUCE;
   int size;
   int rank;
   MPI_Aint extent;
index 78294e8..25353aa 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "colls_private.h"
 #include "coll_tuned_topo.h"
-#define MCA_COLL_BASE_TAG_REDUCE 555
 
 
 
@@ -151,7 +150,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
 
                     reqs[inbi]=smpi_mpi_irecv(local_recvbuf, recvcount, datatype,
                                              tree->tree_next[i], 
-                                             MCA_COLL_BASE_TAG_REDUCE, comm
+                                             COLL_TAG_REDUCE, comm
                                              );
                 }
                 /* wait for previous req to complete, if any.
@@ -195,7 +194,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
                         /* send combined/accumulated data to parent */
                         smpi_mpi_send( accumulator, prevcount, 
                                                   datatype, tree->tree_prev, 
-                                                  MCA_COLL_BASE_TAG_REDUCE,
+                                                  COLL_TAG_REDUCE,
                                                   comm);
                     }
 
@@ -242,7 +241,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
                                          segindex * segment_increment,
                                          count_by_segment, datatype,
                                          tree->tree_prev, 
-                                         MCA_COLL_BASE_TAG_REDUCE,
+                                         COLL_TAG_REDUCE,
                                          comm) ;
                 segindex++;
                 original_count -= count_by_segment;
@@ -270,7 +269,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
                                           segindex * segment_increment,
                                           count_by_segment, datatype,
                                           tree->tree_prev, 
-                                          MCA_COLL_BASE_TAG_REDUCE,
+                                          COLL_TAG_REDUCE,
                                           comm);
                 original_count -= count_by_segment;
             }
@@ -288,7 +287,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
                                           segindex * segment_increment, 
                                           count_by_segment, datatype, 
                                           tree->tree_prev, 
-                                          MCA_COLL_BASE_TAG_REDUCE, 
+                                          COLL_TAG_REDUCE,
                                           comm );
                 creq = (creq + 1) % max_outstanding_reqs;
                 segindex++;
@@ -545,7 +544,7 @@ int smpi_coll_tuned_reduce_ompi_in_order_binary( void *sendbuf, void *recvbuf,
         if (root == rank) {
             /* Receive result from rank io_root to recvbuf */
             smpi_mpi_recv(recvbuf, count, datatype, io_root,
-                                    MCA_COLL_BASE_TAG_REDUCE, comm,
+                                    COLL_TAG_REDUCE, comm,
                                     MPI_STATUS_IGNORE);
             if (MPI_IN_PLACE == sendbuf) {
                 free(use_this_sendbuf);
@@ -554,7 +553,7 @@ int smpi_coll_tuned_reduce_ompi_in_order_binary( void *sendbuf, void *recvbuf,
         } else if (io_root == rank) {
             /* Send result from use_this_recvbuf to root */
             smpi_mpi_send(use_this_recvbuf, count, datatype, root,
-                                    MCA_COLL_BASE_TAG_REDUCE, 
+                                    COLL_TAG_REDUCE,
                                     comm);
             free(use_this_recvbuf);
         }
@@ -610,7 +609,7 @@ smpi_coll_tuned_reduce_ompi_basic_linear(void *sbuf, void *rbuf, int count,
 
     if (rank != root) {
         smpi_mpi_send(sbuf, count, dtype, root,
-                                MCA_COLL_BASE_TAG_REDUCE,
+                                COLL_TAG_REDUCE,
                                 comm);
         return -1;
     }
@@ -642,7 +641,7 @@ smpi_coll_tuned_reduce_ompi_basic_linear(void *sbuf, void *rbuf, int count,
         smpi_datatype_copy((char*)sbuf, count, dtype,(char*)rbuf, count, dtype);
     } else {
         smpi_mpi_recv(rbuf, count, dtype, size - 1,
-                                MCA_COLL_BASE_TAG_REDUCE, comm,
+                                COLL_TAG_REDUCE, comm,
                                 MPI_STATUS_IGNORE);
     }
 
@@ -653,7 +652,7 @@ smpi_coll_tuned_reduce_ompi_basic_linear(void *sbuf, void *rbuf, int count,
             inbuf = (char*)sbuf;
         } else {
             smpi_mpi_recv(pml_buffer, count, dtype, i,
-                                    MCA_COLL_BASE_TAG_REDUCE, comm,
+                                    COLL_TAG_REDUCE, comm,
                                     MPI_STATUS_IGNORE);
             inbuf = pml_buffer;
         }
index 2c61d48..24ad911 100644 (file)
@@ -15,7 +15,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
   int recv_idx, last_idx = 0, newdst;
   int dst, send_cnt, recv_cnt, newroot, newdst_tree_root;
   int newroot_tree_root, new_count;
-  int tag = 4321;
+  int tag = COLL_TAG_REDUCE;
   void *send_ptr, *recv_ptr, *tmp_buf;
 
   cnts = NULL;
index e7631be..5101c7e 100644 (file)
@@ -1,5 +1,4 @@
 #include "colls_private.h"
-#define MPIR_REDUCE_SCATTER_TAG 222
 
 static inline int MPIU_Mirror_permutation(unsigned int x, int bits)
 {
@@ -70,16 +69,16 @@ int smpi_coll_tuned_reduce_scatter_mpich_pair(void *sendbuf, void *recvbuf, int
             if (sendbuf != MPI_IN_PLACE) 
                 smpi_mpi_sendrecv(((char *)sendbuf+disps[dst]*extent), 
                                              recvcounts[dst], datatype, dst,
-                                             MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf,
+                                             COLL_TAG_SCATTER, tmp_recvbuf,
                                              recvcounts[rank], datatype, src,
-                                             MPIR_REDUCE_SCATTER_TAG, comm,
+                                             COLL_TAG_SCATTER, comm,
                                              MPI_STATUS_IGNORE);
             else
                 smpi_mpi_sendrecv(((char *)recvbuf+disps[dst]*extent), 
                                              recvcounts[dst], datatype, dst,
-                                             MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf,
+                                             COLL_TAG_SCATTER, tmp_recvbuf,
                                              recvcounts[rank], datatype, src,
-                                             MPIR_REDUCE_SCATTER_TAG, comm,
+                                             COLL_TAG_SCATTER, comm,
                                              MPI_STATUS_IGNORE);
             
             if (is_commutative || (src < rank)) {
@@ -212,9 +211,9 @@ int smpi_coll_tuned_reduce_scatter_mpich_noncomm(void *sendbuf, void *recvbuf, i
         }
 
         smpi_mpi_sendrecv(outgoing_data + send_offset*true_extent,
-                                     size, datatype, peer, MPIR_REDUCE_SCATTER_TAG,
+                                     size, datatype, peer, COLL_TAG_SCATTER,
                                      incoming_data + recv_offset*true_extent,
-                                     size, datatype, peer, MPIR_REDUCE_SCATTER_TAG,
+                                     size, datatype, peer, COLL_TAG_SCATTER,
                                      comm, MPI_STATUS_IGNORE);
         /* always perform the reduction at recv_offset, the data at send_offset
            is now our peer's responsibility */
@@ -367,9 +366,9 @@ int smpi_coll_tuned_reduce_scatter_mpich_rdb(void *sendbuf, void *recvbuf, int r
                        tmp_results. accumulation is done later below.   */ 
 
                     smpi_mpi_sendrecv(tmp_results, 1, sendtype, dst,
-                                                 MPIR_REDUCE_SCATTER_TAG, 
+                                                 COLL_TAG_SCATTER,
                                                  tmp_recvbuf, 1, recvtype, dst,
-                                                 MPIR_REDUCE_SCATTER_TAG, comm,
+                                                 COLL_TAG_SCATTER, comm,
                                                  MPI_STATUS_IGNORE);
                     received = 1;
                 }
@@ -411,7 +410,7 @@ int smpi_coll_tuned_reduce_scatter_mpich_rdb(void *sendbuf, void *recvbuf, int r
                             && (dst >= tree_root + nprocs_completed)) {
                             /* send the current result */
                             smpi_mpi_send(tmp_recvbuf, 1, recvtype,
-                                                     dst, MPIR_REDUCE_SCATTER_TAG,
+                                                     dst, COLL_TAG_SCATTER,
                                                      comm);
                         }
                         /* recv only if this proc. doesn't have data and sender
@@ -420,7 +419,7 @@ int smpi_coll_tuned_reduce_scatter_mpich_rdb(void *sendbuf, void *recvbuf, int r
                                  (dst < tree_root + nprocs_completed) &&
                                  (rank >= tree_root + nprocs_completed)) {
                             smpi_mpi_recv(tmp_recvbuf, 1, recvtype, dst,
-                                                     MPIR_REDUCE_SCATTER_TAG,
+                                                     COLL_TAG_SCATTER,
                                                      comm, MPI_STATUS_IGNORE); 
                             received = 1;
                         }
index e10be98..bb01dee 100644 (file)
@@ -22,7 +22,6 @@
 #include "colls_private.h"
 #include "coll_tuned_topo.h"
 
-#define MCA_COLL_BASE_TAG_REDUCE_SCATTER 222
 /*
  * Recursive-halving function is (*mostly*) copied from the BASIC coll module.
  * I have removed the part which handles "large" message sizes 
@@ -116,13 +115,13 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
     if (rank < 2 * remain) {
         if ((rank & 1) == 0) {
             smpi_mpi_send(result_buf, count, dtype, rank + 1, 
-                                    MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                    COLL_TAG_REDUCE_SCATTER,
                                     comm);
             /* we don't participate from here on out */
             tmp_rank = -1;
         } else {
             smpi_mpi_recv(recv_buf, count, dtype, rank - 1,
-                                    MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                    COLL_TAG_REDUCE_SCATTER,
                                     comm, MPI_STATUS_IGNORE);
          
             /* integrate their results into our temp results */
@@ -211,7 +210,7 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
             if (send_count > 0 && recv_count != 0) {
                 request=smpi_mpi_irecv(recv_buf + (ptrdiff_t)tmp_disps[recv_index] * extent,
                                          recv_count, dtype, peer,
-                                         MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                         COLL_TAG_REDUCE_SCATTER,
                                          comm);
                 if (MPI_SUCCESS != err) {
                     xbt_free(tmp_rcounts);
@@ -222,7 +221,7 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
             if (recv_count > 0 && send_count != 0) {
                 smpi_mpi_send(result_buf + (ptrdiff_t)tmp_disps[send_index] * extent,
                                         send_count, dtype, peer, 
-                                        MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                        COLL_TAG_REDUCE_SCATTER,
                                         comm);
                 if (MPI_SUCCESS != err) {
                     xbt_free(tmp_rcounts);
@@ -271,14 +270,14 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
         if ((rank & 1) == 0) {
             if (rcounts[rank]) {
                 smpi_mpi_recv(rbuf, rcounts[rank], dtype, rank + 1,
-                                        MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                        COLL_TAG_REDUCE_SCATTER,
                                         comm, MPI_STATUS_IGNORE);
             }
         } else {
             if (rcounts[rank - 1]) {
                 smpi_mpi_send(result_buf + disps[rank - 1] * extent,
                                         rcounts[rank - 1], dtype, rank - 1,
-                                        MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                        COLL_TAG_REDUCE_SCATTER,
                                         comm);
             }
         }            
@@ -452,11 +451,11 @@ smpi_coll_tuned_reduce_scatter_ompi_ring(void *sbuf, void *rbuf, int *rcounts,
     inbi = 0;
     /* Initialize first receive from the neighbor on the left */
     reqs[inbi]=smpi_mpi_irecv(inbuf[inbi], max_block_count, dtype, recv_from,
-                             MCA_COLL_BASE_TAG_REDUCE_SCATTER, comm
+                             COLL_TAG_REDUCE_SCATTER, comm
                              );
     tmpsend = accumbuf + (ptrdiff_t)displs[recv_from] * extent;
     smpi_mpi_send(tmpsend, rcounts[recv_from], dtype, send_to,
-                            MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                            COLL_TAG_REDUCE_SCATTER,
                              comm);
 
     for (k = 2; k < size; k++) {
@@ -466,7 +465,7 @@ smpi_coll_tuned_reduce_scatter_ompi_ring(void *sbuf, void *rbuf, int *rcounts,
 
         /* Post irecv for the current block */
         reqs[inbi]=smpi_mpi_irecv(inbuf[inbi], max_block_count, dtype, recv_from,
-                                 MCA_COLL_BASE_TAG_REDUCE_SCATTER, comm 
+                                 COLL_TAG_REDUCE_SCATTER, comm
                                  );
       
         /* Wait on previous block to arrive */
@@ -480,7 +479,7 @@ smpi_coll_tuned_reduce_scatter_ompi_ring(void *sbuf, void *rbuf, int *rcounts,
       
         /* send previous block to send_to */
         smpi_mpi_send(tmprecv, rcounts[prevblock], dtype, send_to,
-                                MCA_COLL_BASE_TAG_REDUCE_SCATTER,
+                                COLL_TAG_REDUCE_SCATTER,
                                  comm);
     }
 
index dbc223f..7cce8ae 100644 (file)
@@ -20,7 +20,6 @@
 #include "colls_private.h"
 #include "coll_tuned_topo.h"
 
-#define MCA_COLL_BASE_TAG_SCATTER 111
 
 int
 smpi_coll_tuned_scatter_ompi_binomial(void *sbuf, int scount,
@@ -123,7 +122,7 @@ smpi_coll_tuned_scatter_ompi_binomial(void *sbuf, int scount,
        if (rank != root) {
            /* recv from parent on non-root */
            smpi_mpi_recv(ptmp, rcount*size, rdtype, bmtree->tree_prev,
-                                   MCA_COLL_BASE_TAG_SCATTER, comm, &status);
+                                   COLL_TAG_SCATTER, comm, &status);
            /* local copy to rbuf */
            err = smpi_datatype_copy(ptmp, scount, sdtype,
                                  rbuf, rcount, rdtype);
@@ -140,7 +139,7 @@ smpi_coll_tuned_scatter_ompi_binomial(void *sbuf, int scount,
 
            smpi_mpi_send(ptmp + total_send*sextent, mycount, sdtype,
                                    bmtree->tree_next[i],
-                                   MCA_COLL_BASE_TAG_SCATTER,
+                                   COLL_TAG_SCATTER,
                                     comm);
 
            total_send += mycount;
@@ -151,7 +150,7 @@ smpi_coll_tuned_scatter_ompi_binomial(void *sbuf, int scount,
     } else {
        /* recv from parent on leaf nodes */
        smpi_mpi_recv(ptmp, rcount, rdtype, bmtree->tree_prev,
-                               MCA_COLL_BASE_TAG_SCATTER, comm, &status);
+                               COLL_TAG_SCATTER, comm, &status);
     }
     //!FIXME : store the tree, as done in ompi, instead of calculating it each time ?
     xbt_free(bmtree);
@@ -209,7 +208,7 @@ smpi_coll_tuned_scatter_ompi_basic_linear(void *sbuf, int scount,
 
     if (rank != root) {
         smpi_mpi_recv(rbuf, rcount, rdtype, root,
-                                MCA_COLL_BASE_TAG_SCATTER,
+                                COLL_TAG_SCATTER,
                                 comm, MPI_STATUS_IGNORE);
         return MPI_SUCCESS;
     }
@@ -234,7 +233,7 @@ smpi_coll_tuned_scatter_ompi_basic_linear(void *sbuf, int scount,
             }
         } else {
             smpi_mpi_send(ptmp, scount, sdtype, i,
-                                    MCA_COLL_BASE_TAG_SCATTER,
+                                    COLL_TAG_SCATTER,
                                      comm);
         }
         if (MPI_SUCCESS != err) {
index 11a8933..6c34cd0 100644 (file)
@@ -47,6 +47,20 @@ typedef struct s_smpi_mpi_datatype{
   int in_use;
 } s_smpi_mpi_datatype_t;
 
+
+#define COLL_TAG_REDUCE 111
+#define COLL_TAG_SCATTER 222
+#define COLL_TAG_SCATTERV 333
+#define COLL_TAG_GATHER 444
+#define COLL_TAG_ALLGATHER 555
+#define COLL_TAG_ALLGATHERV 666
+#define COLL_TAG_BARRIER 777
+#define COLL_TAG_REDUCE_SCATTER 888
+#define COLL_TAG_ALLTOALLV 999
+#define COLL_TAG_ALLTOALL 1111
+#define COLL_TAG_GATHERV 2222
+#define COLL_TAG_BCAST 3333
+#define COLL_TAG_ALLREDUCE 4444
 //*****************************************************************************************
 
 typedef struct s_smpi_mpi_request {
index 84c53dc..9f12335 100644 (file)
@@ -912,7 +912,7 @@ void smpi_mpi_gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      void *recvbuf, int recvcount, MPI_Datatype recvtype,
                      int root, MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_GATHER;
   int rank, size, src, index;
   MPI_Aint lb = 0, recvext = 0;
   MPI_Request *requests;
@@ -975,7 +975,7 @@ void smpi_mpi_gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
                       void *recvbuf, int *recvcounts, int *displs,
                       MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_GATHERV;
   int rank, size, src, index;
   MPI_Aint lb = 0, recvext = 0;
   MPI_Request *requests;
@@ -1015,7 +1015,7 @@ void smpi_mpi_allgather(void *sendbuf, int sendcount,
                         int recvcount, MPI_Datatype recvtype,
                         MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_ALLGATHER;
   int rank, size, other, index;
   MPI_Aint lb = 0, recvext = 0;
   MPI_Request *requests;
@@ -1054,7 +1054,7 @@ void smpi_mpi_allgatherv(void *sendbuf, int sendcount,
                          int *recvcounts, int *displs,
                          MPI_Datatype recvtype, MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_ALLGATHERV;
   int rank, size, other, index;
   MPI_Aint lb = 0, recvext = 0;
   MPI_Request *requests;
@@ -1092,7 +1092,7 @@ void smpi_mpi_scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
                       void *recvbuf, int recvcount, MPI_Datatype recvtype,
                       int root, MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_SCATTER;
   int rank, size, dst, index;
   MPI_Aint lb = 0, sendext = 0;
   MPI_Request *requests;
@@ -1131,7 +1131,7 @@ void smpi_mpi_scatterv(void *sendbuf, int *sendcounts, int *displs,
                        MPI_Datatype sendtype, void *recvbuf, int recvcount,
                        MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_SCATTERV;
   int rank, size, dst, index;
   MPI_Aint lb = 0, sendext = 0;
   MPI_Request *requests;
@@ -1170,7 +1170,7 @@ void smpi_mpi_reduce(void *sendbuf, void *recvbuf, int count,
                      MPI_Datatype datatype, MPI_Op op, int root,
                      MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = COLL_TAG_REDUCE;
   int rank, size, src, index;
   MPI_Aint lb = 0, dataext = 0;
   MPI_Request *requests;
@@ -1244,7 +1244,7 @@ void smpi_mpi_allreduce(void *sendbuf, void *recvbuf, int count,
 void smpi_mpi_scan(void *sendbuf, void *recvbuf, int count,
                    MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
-  int system_tag = 666;
+  int system_tag = 888;
   int rank, size, other, index;
   MPI_Aint lb = 0, dataext = 0;
   MPI_Request *requests;
index d49b858..611690a 100644 (file)
@@ -78,7 +78,7 @@ void smpi_comm_get_name (MPI_Comm comm, char* name, int* len)
 
 MPI_Comm smpi_comm_split(MPI_Comm comm, int color, int key)
 {
-  int system_tag = 666;
+  int system_tag = 123;
   int index, rank, size, i, j, count, reqs;
   int* sendbuf;
   int* recvbuf;