Skip to content

Commit a87baec

Browse files
author
Ralph Castain
committed
Cleanup the MPI_Finalize_c/f tests
Fix a few errors: * copy the key across for calls to PMIx job_control * re-initialize orte_process_info.aliases in case someone foolishly re-calls orte_init * protect the ompi errcodes in case someone foolishly re-calls MPI_Init Signed-off-by: Ralph Castain <[email protected]>
1 parent d371b6c commit a87baec

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

ompi/errhandler/errcode-internal.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
1515
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
1616
* reserved.
17+
* Copyright (c) 2018 Intel, Inc. All rights reserved.
1718
* $COPYRIGHT$
1819
*
1920
* Additional copyrights may follow
@@ -69,7 +70,7 @@ static inline int ompi_errcode_get_mpi_code(int errcode)
6970
it */
7071
for (i = 0; i < ompi_errcode_intern_lastused; i++) {
7172
errc = (ompi_errcode_intern_t *)opal_pointer_array_get_item(&ompi_errcodes_intern, i);
72-
if (errc->code == errcode) {
73+
if (NULL != errc && errc->code == errcode) {
7374
ret = errc->mpi_code;
7475
break;
7576
}

opal/mca/pmix/pmix2x/pmix2x_server_north.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
44
* Copyright (c) 2014-2017 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
@@ -1243,6 +1243,7 @@ static pmix_status_t server_job_control(const pmix_proc_t *proct,
12431243
for (n=0; n < ndirs; n++) {
12441244
oinfo = OBJ_NEW(opal_value_t);
12451245
opal_list_append(&opalcaddy->info, &oinfo->super);
1246+
oinfo->key = strdup(directives[n].key);
12461247
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &directives[n].value))) {
12471248
OBJ_RELEASE(opalcaddy);
12481249
return pmix2x_convert_opalrc(rc);

orte/orted/pmix/pmix_server_gen.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* All rights reserved.
1414
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
16-
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
1818
* All rights reserved.
1919
* Copyright (c) 2014 Research Organization for Information Science
@@ -863,7 +863,6 @@ int pmix_server_job_ctrl_fn(const opal_process_name_t *requestor,
863863
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
864864
continue;
865865
}
866-
867866
if (0 == strcmp(val->key, OPAL_PMIX_JOB_CTRL_KILL)) {
868867
/* convert the list of targets to a pointer array */
869868
if (NULL == targets) {

orte/util/proc_info.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2012 Los Alamos National Security, LLC.
1414
* All rights reserved.
15-
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
15+
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
1616
* Copyright (c) 2016 IBM Corporation. All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -327,6 +327,7 @@ int orte_proc_info_finalize(void)
327327
orte_process_info.proc_type = ORTE_PROC_TYPE_NONE;
328328

329329
opal_argv_free(orte_process_info.aliases);
330+
orte_process_info.aliases = NULL;
330331

331332
init = false;
332333
return ORTE_SUCCESS;

0 commit comments

Comments
 (0)