3
3
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4
4
* University Research and Technology
5
5
* 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
7
7
* of Tennessee Research Foundation. All rights
8
8
* reserved.
9
9
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
14
14
* reserved.
15
15
* Copyright (c) 2014-2015 Research Organization for Information Science
16
16
* and Technology (RIST). All rights reserved.
17
+ * Copyright (c) 2017 IBM Corporation. All rights reserved.
18
+ * Copyright (c) 2019 Google, LLC. All rights reserved.
17
19
* $COPYRIGHT$
18
20
*
19
21
* Additional copyrights may follow
35
37
#include "coll_basic.h"
36
38
#include "ompi/mca/topo/base/base.h"
37
39
40
+ /**
41
+ * We only have 1024 tags for the neighbor collective, so for now we only support
42
+ * 512 dimensions.
43
+ */
38
44
static int
39
45
mca_coll_basic_neighbor_alltoall_cart (const void * sbuf , int scount , struct ompi_datatype_t * sdtype , void * rbuf ,
40
46
int rcount , struct ompi_datatype_t * rdtype , struct ompi_communicator_t * comm ,
@@ -66,7 +72,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
66
72
if (MPI_PROC_NULL != srank ) {
67
73
nreqs ++ ;
68
74
rc = MCA_PML_CALL (irecv (rbuf , rcount , rdtype , srank ,
69
- MCA_COLL_BASE_TAG_ALLTOALL ,
75
+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim ,
70
76
comm , preqs ++ ));
71
77
if (OMPI_SUCCESS != rc ) break ;
72
78
}
@@ -76,7 +82,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
76
82
if (MPI_PROC_NULL != drank ) {
77
83
nreqs ++ ;
78
84
rc = MCA_PML_CALL (irecv (rbuf , rcount , rdtype , drank ,
79
- MCA_COLL_BASE_TAG_ALLTOALL ,
85
+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim - 1 ,
80
86
comm , preqs ++ ));
81
87
if (OMPI_SUCCESS != rc ) break ;
82
88
}
@@ -103,7 +109,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
103
109
* a const for the send buffer. */
104
110
nreqs ++ ;
105
111
rc = MCA_PML_CALL (isend ((void * ) sbuf , scount , sdtype , srank ,
106
- MCA_COLL_BASE_TAG_ALLTOALL ,
112
+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim - 1 ,
107
113
MCA_PML_BASE_SEND_STANDARD ,
108
114
comm , preqs ++ ));
109
115
if (OMPI_SUCCESS != rc ) break ;
@@ -114,7 +120,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
114
120
if (MPI_PROC_NULL != drank ) {
115
121
nreqs ++ ;
116
122
rc = MCA_PML_CALL (isend ((void * ) sbuf , scount , sdtype , drank ,
117
- MCA_COLL_BASE_TAG_ALLTOALL ,
123
+ MCA_COLL_BASE_TAG_NEIGHBOR_BASE - 2 * dim ,
118
124
MCA_PML_BASE_SEND_STANDARD ,
119
125
comm , preqs ++ ));
120
126
if (OMPI_SUCCESS != rc ) break ;
0 commit comments