33 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44 * University Research and Technology
55 * Corporation. All rights reserved.
6- * Copyright (c) 2004-2016 The University of Tennessee and The University
6+ * Copyright (c) 2004-2019 The University of Tennessee and The University
77 * of Tennessee Research Foundation. All rights
88 * reserved.
99 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
1515 * Copyright (c) 2014-2015 Research Organization for Information Science
1616 * and Technology (RIST). All rights reserved.
1717 * Copyright (c) 2017 IBM Corporation. All rights reserved.
18+ * Copyright (c) 2019 Google, LLC. All rights reserved.
1819 * $COPYRIGHT$
1920 *
2021 * Additional copyrights may follow
3637#include "coll_basic.h"
3738#include "ompi/mca/topo/base/base.h"
3839
40+ /**
41+ * We only have 1024 tags for the neighbor collective, so for now we only support
42+ * 512 dimensions.
43+ */
3944static int
4045mca_coll_basic_neighbor_alltoall_cart (const void * sbuf , int scount , struct ompi_datatype_t * sdtype , void * rbuf ,
4146 int rcount , struct ompi_datatype_t * rdtype , struct ompi_communicator_t * comm ,
@@ -67,7 +72,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
6772 if (MPI_PROC_NULL != srank ) {
6873 nreqs ++ ;
6974 rc = MCA_PML_CALL (irecv (rbuf , rcount , rdtype , srank ,
70- MCA_COLL_BASE_TAG_ALLTOALL ,
75+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim ,
7176 comm , preqs ++ ));
7277 if (OMPI_SUCCESS != rc ) break ;
7378 }
@@ -77,7 +82,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
7782 if (MPI_PROC_NULL != drank ) {
7883 nreqs ++ ;
7984 rc = MCA_PML_CALL (irecv (rbuf , rcount , rdtype , drank ,
80- MCA_COLL_BASE_TAG_ALLTOALL ,
85+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim - 1 ,
8186 comm , preqs ++ ));
8287 if (OMPI_SUCCESS != rc ) break ;
8388 }
@@ -104,7 +109,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
104109 * a const for the send buffer. */
105110 nreqs ++ ;
106111 rc = MCA_PML_CALL (isend ((void * ) sbuf , scount , sdtype , srank ,
107- MCA_COLL_BASE_TAG_ALLTOALL ,
112+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim - 1 ,
108113 MCA_PML_BASE_SEND_STANDARD ,
109114 comm , preqs ++ ));
110115 if (OMPI_SUCCESS != rc ) break ;
@@ -115,7 +120,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
115120 if (MPI_PROC_NULL != drank ) {
116121 nreqs ++ ;
117122 rc = MCA_PML_CALL (isend ((void * ) sbuf , scount , sdtype , drank ,
118- MCA_COLL_BASE_TAG_ALLTOALL ,
123+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim ,
119124 MCA_PML_BASE_SEND_STANDARD ,
120125 comm , preqs ++ ));
121126 if (OMPI_SUCCESS != rc ) break ;
0 commit comments