Skip to content

Commit 60b45ef

Browse files
committed
Fix dmodex operations
Local clients are added to the namespace tracking list upon registration, but they are not added to the array of local clients until they actually connect. Thus, the refid of the first client on the tracking list won't necessarily be set if it wasn't the first to actually connect. We know that at least one local client must exist since someone asked for the direct modex info, so search the list until we find one that has connected. We have to look for someone who connected as that is the only way we know which GDS component to use for that namespace. Signed-off-by: Ralph Castain <[email protected]>
1 parent eda31e0 commit 60b45ef

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/server/pmix_server_get.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static void _process_dmdx_reply(int sd, short args, void *cbdata)
951951
pmix_dmdx_reply_caddy_t *caddy = (pmix_dmdx_reply_caddy_t *) cbdata;
952952
pmix_server_caddy_t *cd;
953953
pmix_peer_t *peer;
954-
pmix_rank_info_t *rinfo;
954+
pmix_rank_info_t *rinfo, *rptr;
955955
int32_t cnt;
956956
pmix_kval_t *kv;
957957
pmix_namespace_t *ns, *nptr;
@@ -966,8 +966,10 @@ static void _process_dmdx_reply(int sd, short args, void *cbdata)
966966
PMIX_ACQUIRE_OBJECT(caddy);
967967
PMIX_HIDE_UNUSED_PARAMS(sd, args);
968968

969-
pmix_output_verbose(2, pmix_server_globals.get_output, "[%s:%d] process dmdx reply from %s:%u",
970-
__FILE__, __LINE__, caddy->lcd->proc.nspace, caddy->lcd->proc.rank);
969+
pmix_output_verbose(2, pmix_server_globals.get_output,
970+
"[%s:%d] process dmdx reply from %s:%u",
971+
__FILE__, __LINE__,
972+
caddy->lcd->proc.nspace, caddy->lcd->proc.rank);
971973

972974
/* find the nspace object for the proc whose data is being received */
973975
nptr = NULL;
@@ -1033,7 +1035,13 @@ static void _process_dmdx_reply(int sd, short args, void *cbdata)
10331035
peer = pmix_globals.mypeer;
10341036
} else {
10351037
/* there must be at least one local proc */
1036-
rinfo = (pmix_rank_info_t *) pmix_list_get_first(&nm->ns->ranks);
1038+
rinfo = NULL;
1039+
PMIX_LIST_FOREACH(rptr, &nm->ns->ranks, pmix_rank_info_t) {
1040+
if (0 <= rptr->peerid) {
1041+
rinfo = rptr;
1042+
break;
1043+
}
1044+
}
10371045
if (NULL == rinfo) {
10381046
PMIX_ERROR_LOG(PMIX_ERR_NOT_FOUND);
10391047
goto complete;

0 commit comments

Comments
 (0)