diff --git a/src/plugins/mpi/pmix/pmixp_dmdx.c b/src/plugins/mpi/pmix/pmixp_dmdx.c index d796480b1a49aac4be144265a7c9934ee28556e1..2bd44147e532124bf69362b389e545070b9f9447 100644 --- a/src/plugins/mpi/pmix/pmixp_dmdx.c +++ b/src/plugins/mpi/pmix/pmixp_dmdx.c @@ -259,6 +259,18 @@ int pmixp_dmdx_get(const char *nspace, int rank, /* store cur seq. num and move to the next request */ seq = _dmdx_seq_num++; + /* track this request */ + req = xmalloc(sizeof(dmdx_req_info_t)); + req->seq_num = seq; + req->cbfunc = cbfunc; + req->cbdata = cbdata; + req->ts = time(NULL); +#ifndef NDEBUG + strncpy(req->nspace, nspace, PMIX_MAX_NSLEN); + req->rank = rank; +#endif + list_append(_dmdx_requests, req); + /* send the request */ rc = pmixp_server_send(host, PMIXP_MSG_DMDX, seq, addr, get_buf_data(buf), get_buf_offset(buf)); @@ -274,17 +286,6 @@ int pmixp_dmdx_get(const char *nspace, int rank, return SLURM_ERROR; } - /* track this request */ - req = xmalloc(sizeof(dmdx_req_info_t)); - req->seq_num = seq; - req->cbfunc = cbfunc; - req->cbdata = cbdata; - req->ts = time(NULL); -#ifndef NDEBUG - strncpy(req->nspace, nspace, PMIX_MAX_NSLEN); - req->rank = rank; -#endif - list_append(_dmdx_requests, req); return rc; }