Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions opal/mca/pmix/pmix.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ extern int opal_pmix_base_exchange(opal_value_t *info,
OPAL_ERROR_LOG((r)); \
} \
} \
/* do not destruct the keyval as we don't own */ \
/* the data - the caller will take care of the */ \
/* key and value storage, and the kv itself has none */ \
/* opal_value_load makes a copy of the data, so release it */ \
_kv.key = NULL; \
OBJ_DESTRUCT(&(_kv)); \
} while(0);

/**
Expand Down
7 changes: 7 additions & 0 deletions opal/mca/pmix/pmix1xx/pmix/src/server/pmix_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,16 @@ PMIX_CLASS_INSTANCE(pmix_usock_queue_t,
static void scon(pmix_shift_caddy_t *p)
{
p->active = false;
p->kv = NULL;
p->relfn = NULL;
p->relcbd = NULL;
}
static void scdes(pmix_shift_caddy_t *p)
{
if (NULL != p->kv) {
PMIX_RELEASE(p->kv);
}
}
PMIX_CLASS_INSTANCE(pmix_shift_caddy_t,
pmix_object_t,
scon, NULL);
Expand Down
31 changes: 23 additions & 8 deletions opal/mca/pmix/pmix1xx/pmix1_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ int pmix1_abort(int flag, const char *msg,
pmix_proc_t *parray=NULL;
size_t n, cnt=0;
opal_namelist_t *ptr;
char *tmp;

opal_output_verbose(1, opal_pmix_base_framework.framework_output,
"PMIx_client abort");
Expand All @@ -141,7 +142,9 @@ int pmix1_abort(int flag, const char *msg,
PMIX_PROC_CREATE(parray, cnt);
n=0;
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
(void)strncpy(parray[n].nspace, opal_convert_jobid_to_string(ptr->name.jobid), PMIX_MAX_NSLEN);
tmp = opal_convert_jobid_to_string(ptr->name.jobid);
(void)strncpy(parray[n].nspace, tmp, PMIX_MAX_NSLEN);
free(tmp);
parray[n].rank = ptr->name.vpid;
++n;
}
Expand Down Expand Up @@ -181,6 +184,7 @@ int pmix1_fence(opal_list_t *procs, int collect_data)
size_t n, cnt=0;
opal_namelist_t *ptr;
pmix_info_t info, *iptr;
char *tmp;

opal_output_verbose(1, opal_pmix_base_framework.framework_output,
"PMIx_client fence");
Expand All @@ -191,7 +195,9 @@ int pmix1_fence(opal_list_t *procs, int collect_data)
PMIX_PROC_CREATE(parray, cnt);
n=0;
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
(void)strncpy(parray[n].nspace, opal_convert_jobid_to_string(ptr->name.jobid), PMIX_MAX_NSLEN);
tmp = opal_convert_jobid_to_string(ptr->name.jobid);
(void)strncpy(parray[n].nspace, tmp, PMIX_MAX_NSLEN);
free(tmp);
parray[n].rank = ptr->name.vpid;
++n;
}
Expand Down Expand Up @@ -230,6 +236,7 @@ int pmix1_fencenb(opal_list_t *procs, int collect_data,
opal_namelist_t *ptr;
pmix1_opcaddy_t *op;
pmix_info_t info, *iptr;
char *tmp;

opal_output_verbose(1, opal_pmix_base_framework.framework_output,
"PMIx_client fence_nb");
Expand All @@ -240,7 +247,9 @@ int pmix1_fencenb(opal_list_t *procs, int collect_data,
PMIX_PROC_CREATE(parray, cnt);
n=0;
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
(void)strncpy(parray[n].nspace, opal_convert_jobid_to_string(ptr->name.jobid), PMIX_MAX_NSLEN);
tmp = opal_convert_jobid_to_string(ptr->name.jobid);
(void)strncpy(parray[n].nspace, tmp, PMIX_MAX_NSLEN);
free(tmp);
parray[n].rank = ptr->name.vpid;
++n;
}
Expand Down Expand Up @@ -300,6 +309,7 @@ int pmix1_get(const opal_process_name_t *proc, const char *key,
size_t ninfo, n;
pmix_info_t *pinfo;
opal_value_t *ival;
char *tmp;

opal_output_verbose(1, opal_pmix_base_framework.framework_output,
"%s PMIx_client get on proc %s key %s",
Expand All @@ -310,7 +320,9 @@ int pmix1_get(const opal_process_name_t *proc, const char *key,
*val = NULL;
if (NULL != proc) {
/* convert the process jobid */
(void)strncpy(p.nspace, opal_convert_jobid_to_string(proc->jobid), PMIX_MAX_NSLEN);
tmp = opal_convert_jobid_to_string(proc->jobid);
(void)strncpy(p.nspace, tmp, PMIX_MAX_NSLEN);
free(tmp);
p.rank = proc->vpid;
pptr = &p;
} else {
Expand Down Expand Up @@ -918,6 +930,7 @@ int pmix1_disconnect(opal_list_t *procs)
pmix_proc_t *parray=NULL;
size_t n, cnt=0;
opal_namelist_t *ptr;
char *tmp;

/* protect against bozo error */
if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) {
Expand All @@ -929,7 +942,9 @@ int pmix1_disconnect(opal_list_t *procs)
PMIX_PROC_CREATE(parray, cnt);
n=0;
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
(void)strncpy(parray[n].nspace, opal_convert_jobid_to_string(ptr->name.jobid), PMIX_MAX_NSLEN);
tmp = opal_convert_jobid_to_string(ptr->name.jobid);
(void)strncpy(parray[n].nspace, tmp, PMIX_MAX_NSLEN);
free(tmp);
if (OPAL_VPID_WILDCARD == ptr->name.vpid) {
parray[n].rank = PMIX_RANK_WILDCARD;
} else {
Expand Down Expand Up @@ -1004,6 +1019,9 @@ int pmix1_resolve_peers(const char *nodename, opal_jobid_t jobid,
}

ret = PMIx_Resolve_peers(nodename, nspace, &array, &nprocs);
if (NULL != nspace) {
free(nspace);
}
rc = pmix1_convert_rc(ret);

if (NULL != array && 0 < nprocs) {
Expand All @@ -1012,9 +1030,6 @@ int pmix1_resolve_peers(const char *nodename, opal_jobid_t jobid,
opal_list_append(procs, &nm->super);
rc = opal_convert_string_to_jobid(&nm->name.jobid, array[n].nspace);
if (OPAL_SUCCESS != rc) {
if (NULL != nspace) {
free(nspace);
}
PMIX_PROC_FREE(array, nprocs);
return rc;
}
Expand Down
2 changes: 1 addition & 1 deletion opal/mca/pmix/pmix1xx/pmix_pmix1.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void pmix1_value_load(pmix_value_t *v,
default:
/* silence warnings */
break;
}
}
}

int pmix1_value_unload(opal_value_t *kv,
Expand Down
2 changes: 1 addition & 1 deletion orte/mca/ess/base/ess_base_std_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int orte_ess_base_app_setup(bool db_restrict_local)
* do so here */
if (ORTE_PROC_NON_MPI) {
orte_process_info.super.proc_name = *(opal_process_name_t*)ORTE_PROC_MY_NAME;
orte_process_info.super.proc_hostname = strdup(orte_process_info.nodename);
orte_process_info.super.proc_hostname = orte_process_info.nodename;
orte_process_info.super.proc_flags = OPAL_PROC_ALL_LOCAL;
orte_process_info.super.proc_arch = opal_local_arch;
opal_proc_local_set(&orte_process_info.super);
Expand Down
1 change: 1 addition & 0 deletions orte/mca/ess/pmi/ess_pmi_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ static int rte_init(void)
}

/* retrieve our topology */
val = NULL;
OPAL_MODEX_RECV_VALUE_OPTIONAL(ret, OPAL_PMIX_LOCAL_TOPO,
ORTE_PROC_MY_NAME, &val, OPAL_STRING);
if (OPAL_SUCCESS == ret && NULL != val) {
Expand Down
5 changes: 5 additions & 0 deletions orte/util/proc_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ int orte_proc_info_finalize(void)
orte_process_info.nodename = NULL;
}

if (NULL != orte_process_info.cpuset) {
free(orte_process_info.cpuset);
orte_process_info.cpuset = NULL;
}

if (NULL != orte_process_info.sock_stdin) {
free(orte_process_info.sock_stdin);
orte_process_info.sock_stdin = NULL;
Expand Down