Skip to content

Commit 50949e2

Browse files
committed
Remove addition of lpf_allgatherv to collectives LPF HL (split off into GitHub MR #54)
1 parent df95e1d commit 50949e2

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

include/lpf/collectives.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ typedef void (*lpf_combiner_t) (size_t n, const void * combine, void * into );
116116
*/
117117
extern _LPFLIB_API const lpf_coll_t LPF_INVALID_COLL;
118118

119-
/**
120-
* ToDo: document allgatherv
121-
*/
122-
lpf_err_t lpf_allgatherv(
123-
lpf_coll_t coll,
124-
lpf_memslot_t src,
125-
lpf_memslot_t dst,
126-
size_t *sizes,
127-
bool exclude_myself
128-
);
129119
/**
130120
* Initialises a collectives struct, which allows the scheduling of collective
131121
* calls. The initialised struct is only valid after a next call to lpf_sync().

src/core-libraries/collectives.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -390,41 +390,6 @@ lpf_err_t lpf_allgather(
390390
return LPF_SUCCESS;
391391
}
392392

393-
394-
lpf_err_t lpf_allgatherv(
395-
lpf_coll_t coll,
396-
lpf_memslot_t src,
397-
lpf_memslot_t dst,
398-
size_t *sizes,
399-
bool exclude_myself
400-
) {
401-
402-
ASSERT( coll.P > 0 );
403-
ASSERT( coll.s < coll.P );
404-
405-
size_t allgatherv_start_addresses[coll.P];
406-
407-
for (size_t i=0; i<coll.P; i++) allgatherv_start_addresses[i] = 0;
408-
409-
for (size_t i=1; i<coll.P; i++) {
410-
allgatherv_start_addresses[i] = allgatherv_start_addresses[i-1]+sizes[i-1];
411-
}
412-
413-
size_t me = coll.s;
414-
// Do I have anything to send? If no, then, skip, as
415-
// I haven't access to the remote global slots
416-
if (sizes[me] > 0) {
417-
for (size_t i=0; i<coll.P; i++) {
418-
if ((i != me) || !exclude_myself) {
419-
const lpf_err_t rc = lpf_put( coll.ctx, src, 0, i, dst, allgatherv_start_addresses[me], sizes[me], LPF_MSG_DEFAULT);
420-
if (rc != LPF_SUCCESS) return rc;
421-
}
422-
}
423-
}
424-
425-
return LPF_SUCCESS;
426-
}
427-
428393
lpf_err_t lpf_alltoall(
429394
lpf_coll_t coll,
430395
lpf_memslot_t src,

0 commit comments

Comments
 (0)