Skip to content

Commit eae9d31

Browse files
committed
pre_condition_transports: code cleanup
replace hard coded "OMPI_MCA_orte_precondition_transports" environment variable name with macro'ed OPAL_MCA_PREFIX"orte_precondition_transports"
1 parent e6f7fac commit eae9d31

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

ompi/mca/mtl/mxm/mtl_mxm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Copyright (C) 2001-2011 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
44
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
5-
* Copyright (c) 2014 Research Organization for Information Science
5+
* Copyright (c) 2014-2016 Research Organization for Information Science
66
* and Technology (RIST). All rights reserved.
77
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
88
* reserved.
@@ -64,7 +64,7 @@ static uint32_t ompi_mtl_mxm_get_job_id(void)
6464

6565
uu = (unsigned long long *) unique_job_key;
6666

67-
generated_key = getenv("OMPI_MCA_orte_precondition_transports");
67+
generated_key = getenv(OPAL_MCA_PREFIX"orte_precondition_transports");
6868
memset(uu, 0, sizeof(unique_job_key));
6969

7070
if (!generated_key || (strlen(generated_key) != 33) || sscanf(generated_key, "%016llx-%016llx", &uu[0], &uu[1]) != 2) {
@@ -75,7 +75,7 @@ static uint32_t ompi_mtl_mxm_get_job_id(void)
7575
}
7676

7777
/*
78-
* decode OMPI_MCA_orte_precondition_transports that looks as
78+
* decode OPAL_MCA_PREFIX"orte_precondition_transports" that looks as
7979
* 000003ca00000000-0000000100000000
8080
* jobfam-stepid
8181
* to get jobid coded with ORTE_CONSTRUCT_LOCAL_JOBID()

ompi/mca/mtl/psm/mtl_psm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
1515
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
1616
* reserved.
17+
* Copyright (c) 2016 Research Organization for Information Science
18+
* and Technology (RIST). All rights reserved.
1719
* $COPYRIGHT$
1820
*
1921
* Additional copyrights may follow
@@ -99,7 +101,7 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) {
99101
char env_string[256];
100102
int rc;
101103

102-
generated_key = getenv("OMPI_MCA_orte_precondition_transports");
104+
generated_key = getenv(OPAL_MCA_PREFIX"orte_precondition_transports");
103105
memset(uu, 0, sizeof(psm_uuid_t));
104106

105107
if (!generated_key || (strlen(generated_key) != 33) ||

ompi/mca/mtl/psm2/mtl_psm2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
1515
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
1616
* reserved.
17+
* Copyright (c) 2016 Research Organization for Information Science
18+
* and Technology (RIST). All rights reserved.
1719
* $COPYRIGHT$
1820
*
1921
* Additional copyrights may follow
@@ -99,7 +101,7 @@ int ompi_mtl_psm2_module_init(int local_rank, int num_local_procs) {
99101
char env_string[256];
100102
int rc;
101103

102-
generated_key = getenv("OMPI_MCA_orte_precondition_transports");
104+
generated_key = getenv(OPAL_MCA_PREFIX"orte_precondition_transports");
103105
memset(uu, 0, sizeof(psm2_uuid_t));
104106

105107
if (!generated_key || (strlen(generated_key) != 33) ||

orte/orted/orted_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#ifdef HAVE_SYS_TIME_H
4949
#include <sys/time.h>
5050
#endif /* HAVE_SYS_TIME_H */
51+
#include <poll.h>
5152

5253

5354
#include "opal/mca/event/event.h"
@@ -237,6 +238,9 @@ int orte_daemon(int argc, char *argv[])
237238
#endif
238239
char *coprocessors;
239240
uint8_t tflag;
241+
volatile int _dbg = 1;
242+
243+
while (_dbg) poll(NULL, 0, 1);
240244

241245
/* initialize the globals */
242246
memset(&orted_globals, 0, sizeof(orted_globals));

orte/test/system/psm_keygen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ int main(int argc, char* argv[])
3333
}
3434

3535
for (i=0; NULL != app->env[i]; i++) {
36-
if (0 == strncmp("OMPI_MCA_orte_precondition_transports", app->env[i],
37-
strlen("OMPI_MCA_orte_precondition_transports"))) {
36+
if (0 == strncmp(OPAL_MCA_PREFIX"orte_precondition_transports", app->env[i],
37+
strlen(OPAL_MCA_PREFIX"orte_precondition_transports"))) {
3838
fprintf(stderr, "%s\n", app->env[i]);
3939
break;
4040
}

0 commit comments

Comments
 (0)