Skip to content

Commit 877f308

Browse files
authored
Merge pull request #10506 from vspetrov/topic/scoll_ucc_collect_a2a_fix
SCOLL/UCC: fix collect & alltoalls
2 parents aa27b09 + df32e93 commit 877f308

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

oshmem/mca/scoll/ucc/scoll_ucc_alltoall.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ int mca_scoll_ucc_alltoall(struct oshmem_group_t *group,
8282
ucc_module = (mca_scoll_ucc_module_t *) group->g_scoll.scoll_alltoall_module;
8383
count = nelems;
8484

85+
if ((sst != 1) || (dst != 1)) {
86+
goto fallback;
87+
}
8588
/* Do nothing on zero-length request */
8689
if (OPAL_UNLIKELY(!nelems)) {
8790
return OSHMEM_SUCCESS;

oshmem/mca/scoll/ucc/scoll_ucc_collect.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@
1313
#include <ucc/api/ucc.h>
1414

1515
static inline ucc_status_t mca_scoll_ucc_collect_init(const void * sbuf, void * rbuf,
16-
int count,
16+
size_t count,
1717
mca_scoll_ucc_module_t * ucc_module,
1818
ucc_coll_req_h * req)
1919
{
20-
ucc_coll_args_t coll = {
20+
size_t gsize = ucc_module->group->proc_count;
21+
ucc_coll_args_t coll = {
2122
.mask = 0,
2223
.coll_type = UCC_COLL_TYPE_ALLGATHER,
2324
.src.info = {
24-
.buffer = (void *) sbuf,
25-
.count = count,
25+
.buffer = (void *) sbuf,
26+
.count = count,
2627
.datatype = UCC_DT_INT8,
2728
.mem_type = UCC_MEMORY_TYPE_UNKNOWN
2829
},
2930
.dst.info = {
30-
.buffer = rbuf,
31-
.count = count,
31+
.buffer = rbuf,
32+
.count = count * gsize,
3233
.datatype = UCC_DT_INT8,
3334
.mem_type = UCC_MEMORY_TYPE_UNKNOWN
3435
},
@@ -66,6 +67,11 @@ int mca_scoll_ucc_collect(struct oshmem_group_t *group,
6667
UCC_VERBOSE(3, "running ucc collect");
6768
ucc_module = (mca_scoll_ucc_module_t *) group->g_scoll.scoll_collect_module;
6869

70+
if (false == nlong_type) {
71+
/* vector type of collect */
72+
goto fallback;
73+
}
74+
6975
if (OPAL_UNLIKELY(!nlong)) {
7076
return OSHMEM_SUCCESS;
7177
}

0 commit comments

Comments
 (0)