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"
Этот коммит содержится в:
родитель
e6f7facd7d
Коммит
eae9d31784
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Copyright (C) 2001-2011 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
|
||||
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
@ -64,7 +64,7 @@ static uint32_t ompi_mtl_mxm_get_job_id(void)
|
||||
|
||||
uu = (unsigned long long *) unique_job_key;
|
||||
|
||||
generated_key = getenv("OMPI_MCA_orte_precondition_transports");
|
||||
generated_key = getenv(OPAL_MCA_PREFIX"orte_precondition_transports");
|
||||
memset(uu, 0, sizeof(unique_job_key));
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
/*
|
||||
* decode OMPI_MCA_orte_precondition_transports that looks as
|
||||
* decode OPAL_MCA_PREFIX"orte_precondition_transports" that looks as
|
||||
* 000003ca00000000-0000000100000000
|
||||
* jobfam-stepid
|
||||
* to get jobid coded with ORTE_CONSTRUCT_LOCAL_JOBID()
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -99,7 +101,7 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) {
|
||||
char env_string[256];
|
||||
int rc;
|
||||
|
||||
generated_key = getenv("OMPI_MCA_orte_precondition_transports");
|
||||
generated_key = getenv(OPAL_MCA_PREFIX"orte_precondition_transports");
|
||||
memset(uu, 0, sizeof(psm_uuid_t));
|
||||
|
||||
if (!generated_key || (strlen(generated_key) != 33) ||
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -99,7 +101,7 @@ int ompi_mtl_psm2_module_init(int local_rank, int num_local_procs) {
|
||||
char env_string[256];
|
||||
int rc;
|
||||
|
||||
generated_key = getenv("OMPI_MCA_orte_precondition_transports");
|
||||
generated_key = getenv(OPAL_MCA_PREFIX"orte_precondition_transports");
|
||||
memset(uu, 0, sizeof(psm2_uuid_t));
|
||||
|
||||
if (!generated_key || (strlen(generated_key) != 33) ||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif /* HAVE_SYS_TIME_H */
|
||||
#include <poll.h>
|
||||
|
||||
|
||||
#include "opal/mca/event/event.h"
|
||||
@ -237,6 +238,9 @@ int orte_daemon(int argc, char *argv[])
|
||||
#endif
|
||||
char *coprocessors;
|
||||
uint8_t tflag;
|
||||
volatile int _dbg = 1;
|
||||
|
||||
while (_dbg) poll(NULL, 0, 1);
|
||||
|
||||
/* initialize the globals */
|
||||
memset(&orted_globals, 0, sizeof(orted_globals));
|
||||
|
@ -33,8 +33,8 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
for (i=0; NULL != app->env[i]; i++) {
|
||||
if (0 == strncmp("OMPI_MCA_orte_precondition_transports", app->env[i],
|
||||
strlen("OMPI_MCA_orte_precondition_transports"))) {
|
||||
if (0 == strncmp(OPAL_MCA_PREFIX"orte_precondition_transports", app->env[i],
|
||||
strlen(OPAL_MCA_PREFIX"orte_precondition_transports"))) {
|
||||
fprintf(stderr, "%s\n", app->env[i]);
|
||||
break;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user