Skip to content

Commit

Permalink
Remove the PMIX_SIZE_ESTIMATE support
Browse files Browse the repository at this point in the history
No longer required

Signed-off-by: Ralph Castain <rhc@pmix.org>
  • Loading branch information
rhc54 committed Feb 9, 2023
1 parent 8bb7fa1 commit 10496e3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 89 deletions.
26 changes: 0 additions & 26 deletions src/mca/grpcomm/direct/grpcomm_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,20 +274,6 @@ static void allgather_recv(int status, pmix_proc_t *sender,
/* update the info with the collected value */
info[n].value.type = PMIX_STATUS;
info[n].value.data.status = coll->status;
#ifdef PMIX_SIZE_ESTIMATE
} else if (PMIX_CHECK_KEY(&info[n], PMIX_SIZE_ESTIMATE)) {
PMIX_VALUE_GET_NUMBER(rc, &info[n].value, memsize, size_t);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_PROC_FREE(sig.signature, sig.sz);
PMIX_DATA_BUFFER_DESTRUCT(&ctrlbuf);
return;
}
coll->memsize += memsize;
/* update the info with the collected value */
info[n].value.type = PMIX_SIZE;
info[n].value.data.size = coll->memsize;
#endif
} else if (PMIX_CHECK_KEY(&info[n], PMIX_GROUP_ASSIGN_CONTEXT_ID)) {
assignID = PMIX_INFO_TRUE(&info[n]);
if (assignID) {
Expand Down Expand Up @@ -346,18 +332,6 @@ static void allgather_recv(int status, pmix_proc_t *sender,
}
/* add some values to the payload in the bucket */

#ifdef PMIX_SIZE_ESTIMATE
/* pack the memory size */
PMIX_INFO_LOAD(&infostat, PMIX_SIZE_ESTIMATE, &coll->memsize, PMIX_SIZE);
rc = PMIx_Data_pack(NULL, reply, &infostat, 1, PMIX_INFO);
PMIX_INFO_DESTRUCT(&infostat);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_DATA_BUFFER_RELEASE(reply);
PMIX_PROC_FREE(sig.signature, sig.sz);
return;
}
#endif
/* if we were asked to provide a context id, do so */
if (assignID) {
size_t sz;
Expand Down
17 changes: 0 additions & 17 deletions src/prted/pmix/pmix_server_dyn.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,6 @@ static void connect_release(int status, pmix_data_buffer_t *buf, void *cbdata)
uint32_t ctxid;
bool first = true;
char *payload;
#ifdef PMIX_SIZE_ESTIMATE
size_t memsize = 0;
#endif

PMIX_ACQUIRE_OBJECT(md);

Expand All @@ -1002,15 +999,6 @@ static void connect_release(int status, pmix_data_buffer_t *buf, void *cbdata)
assignedID = true;
++ninfo;
}
#ifdef PMIX_SIZE_ESTIMATE
} else if (PMIX_CHECK_KEY(&infostat, PMIX_SIZE_ESTIMATE)) {
PMIX_VALUE_GET_NUMBER(rc, &infostat.value, memsize, size_t);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
} else {
++ninfo;
}
#endif
}
/* save where we are */
payload = buf->unpack_ptr;
Expand All @@ -1033,11 +1021,6 @@ static void connect_release(int status, pmix_data_buffer_t *buf, void *cbdata)
PMIX_INFO_LOAD(&info[n], PMIX_GROUP_CONTEXT_ID, &ctxid, PMIX_UINT32);
++n;
}
#ifdef PMIX_SIZE_ESTIMATE
if (0 < memsize) {
PMIX_INFO_LOAD(&info[n], PMIX_SIZE_ESTIMATE, &memsize, PMIX_SIZE);
}
#endif

/* there is a byte object for each proc in the connect operation */
cnt = 1;
Expand Down
21 changes: 0 additions & 21 deletions src/prted/pmix/pmix_server_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,6 @@ static void group_release(int status, pmix_data_buffer_t *buf, void *cbdata)
pmix_info_t info;
pmix_byte_object_t bo;
int32_t byused;
#ifdef PMIX_SIZE_ESTIMATE
bool gotestimate = false;
size_t memsize = 0;
#endif
char *payload;

PMIX_ACQUIRE_OBJECT(cd);
Expand Down Expand Up @@ -969,17 +965,6 @@ static void group_release(int status, pmix_data_buffer_t *buf, void *cbdata)
}
assignedID = true;
cd->ninfo++;
#ifdef PMIX_SIZE_ESTIMATE
} else if (PMIX_CHECK_KEY(&info, PMIX_SIZE_ESTIMATE)) {
PMIX_VALUE_GET_NUMBER(rc, &info.value, memsize, size_t);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
cd->ninfo = 0;
goto complete;
}
gotestimate = true;
cd->ninfo++;
#endif
}
/* save where we are */
payload = buf->unpack_ptr;
Expand Down Expand Up @@ -1015,12 +1000,6 @@ static void group_release(int status, pmix_data_buffer_t *buf, void *cbdata)
if (0 < cd->ninfo) {
PMIX_INFO_CREATE(cd->info, cd->ninfo);
n = 0;
#ifdef PMIX_SIZE_ESTIMATE
if (gotestimate) {
PMIX_INFO_LOAD(&cd->info[n], PMIX_SIZE_ESTIMATE, &memsize, PMIX_SIZE);
++n;
}
#endif
if (assignedID) {
PMIX_INFO_LOAD(&cd->info[n], PMIX_GROUP_CONTEXT_ID, &cid, PMIX_UINT32);
++n;
Expand Down
26 changes: 1 addition & 25 deletions src/prted/pmix/pmix_server_register_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Copyright (c) 2014-2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017-2020 IBM Corporation. All rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -608,30 +608,6 @@ int prte_pmix_server_register_nspace(prte_job_t *jdata)
}
PMIX_LIST_DESTRUCT(&local_procs);

#ifdef PMIX_SIZE_ESTIMATE
/* determine the overall size of this payload */
iptr = PMIx_Info_list_get_info(info, NULL, &next);
size = 0;
while (1) {
ret = PMIx_Info_get_size(iptr, &sz);
if (PMIX_SUCCESS != ret) {
break;
}
size += sz;
if (NULL == next) {
break;
}
iptr = PMIx_Info_list_get_info(info, next, &next);
}
if (PMIX_SUCCESS != ret) {
PMIX_ERROR_LOG(ret);
rc = prte_pmix_convert_status(ret);
PMIX_INFO_LIST_RELEASE(info);
return rc;
}
PMIX_INFO_LIST_PREPEND(ret, info, PMIX_SIZE_ESTIMATE, &size, PMIX_SIZE);
#endif

/* register it */
PMIX_INFO_LIST_CONVERT(ret, info, &darray);
pinfo = (pmix_info_t*)darray.array;
Expand Down

0 comments on commit 10496e3

Please sign in to comment.