1
1

Shift the orte_db_localrank key to the opal level. Add the job and proc-level session directory names to the database using opal_db keys.

This commit was SVN r30746.
Этот коммит содержится в:
Ralph Castain 2014-02-17 01:40:56 +00:00
родитель 86e40c568a
Коммит c3df744a3b
6 изменённых файлов: 29 добавлений и 7 удалений

Просмотреть файл

@ -57,8 +57,10 @@ typedef orte_ns_cmp_bitmask_t ompi_rte_cmp_bitmask_t;
#define OMPI_NAME ORTE_NAME #define OMPI_NAME ORTE_NAME
#define OMPI_PROCESS_NAME_HTON ORTE_PROCESS_NAME_HTON #define OMPI_PROCESS_NAME_HTON ORTE_PROCESS_NAME_HTON
#define OMPI_PROCESS_NAME_NTOH ORTE_PROCESS_NAME_NTOH #define OMPI_PROCESS_NAME_NTOH ORTE_PROCESS_NAME_NTOH
#define OMPI_RTE_NODE_ID ORTE_DB_DAEMON_VPID
#define OMPI_RTE_MY_NODEID ORTE_PROC_MY_DAEMON->vpid #define OMPI_RTE_MY_NODEID ORTE_PROC_MY_DAEMON->vpid
/* database keys */
#define OMPI_RTE_NODE_ID ORTE_DB_DAEMON_VPID
#define OMPI_RTE_HOST_ID ORTE_DB_HOSTID #define OMPI_RTE_HOST_ID ORTE_DB_HOSTID
/* Collective objects and operations */ /* Collective objects and operations */

Просмотреть файл

@ -27,6 +27,9 @@ BEGIN_C_DECLS
#define OPAL_DB_LOCALITY "opal.locality" #define OPAL_DB_LOCALITY "opal.locality"
#define OPAL_DB_CPUSET "opal.cpuset" #define OPAL_DB_CPUSET "opal.cpuset"
#define OPAL_DB_CREDENTIAL "opal.cred" #define OPAL_DB_CREDENTIAL "opal.cred"
#define OPAL_DB_JOB_SDIR "opal.job.session.dir"
#define OPAL_DB_MY_SDIR "opal.my.session.dir"
#define OPAL_DB_LOCALRANK "opal.local.rank"
END_C_DECLS END_C_DECLS

Просмотреть файл

@ -12,7 +12,7 @@
* Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -240,6 +240,24 @@ int orte_ess_base_app_setup(bool db_restrict_local)
proc-specific session directory. */ proc-specific session directory. */
opal_output_set_output_file_info(orte_process_info.proc_session_dir, opal_output_set_output_file_info(orte_process_info.proc_session_dir,
"output-", NULL, NULL); "output-", NULL, NULL);
/* store the session directory location in the database */
if (OPAL_SUCCESS != (ret = opal_db.store((opal_identifier_t*)ORTE_PROC_MY_NAME,
OPAL_SCOPE_INTERNAL,
OPAL_DB_JOB_SDIR,
orte_process_info.job_session_dir, OPAL_STRING))) {
ORTE_ERROR_LOG(ret);
error = "store job session dir";
goto error;
}
if (OPAL_SUCCESS != (ret = opal_db.store((opal_identifier_t*)ORTE_PROC_MY_NAME,
OPAL_SCOPE_INTERNAL,
OPAL_DB_MY_SDIR,
orte_process_info.proc_session_dir, OPAL_STRING))) {
ORTE_ERROR_LOG(ret);
error = "store job session dir";
goto error;
}
} }
/* setup the routed info */ /* setup the routed info */

Просмотреть файл

@ -376,7 +376,7 @@ static int rte_init(void)
goto error; goto error;
} }
if (ORTE_SUCCESS != (ret = opal_db.store((opal_identifier_t*)ORTE_PROC_MY_NAME, if (ORTE_SUCCESS != (ret = opal_db.store((opal_identifier_t*)ORTE_PROC_MY_NAME,
OPAL_SCOPE_GLOBAL, ORTE_DB_LOCALRANK, OPAL_SCOPE_GLOBAL, OPAL_DB_LOCALRANK,
&orte_process_info.my_local_rank, ORTE_LOCAL_RANK))) { &orte_process_info.my_local_rank, ORTE_LOCAL_RANK))) {
error = "db store local rank"; error = "db store local rank";
goto error; goto error;

Просмотреть файл

@ -13,7 +13,7 @@
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. * Copyright (c) 2011-2013 Los Alamos National Security, LLC.
* All rights reserved. * All rights reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved * Copyright (c) 2013-2014 Intel, Inc. All rights reserved
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -124,7 +124,6 @@ ORTE_DECLSPEC extern int orte_exit_status;
#define ORTE_DB_HOSTNAME "orte.hostname" #define ORTE_DB_HOSTNAME "orte.hostname"
#define ORTE_DB_DAEMON_VPID "orte.daemon.vpid" #define ORTE_DB_DAEMON_VPID "orte.daemon.vpid"
#define ORTE_DB_NODERANK "orte.node.rank" #define ORTE_DB_NODERANK "orte.node.rank"
#define ORTE_DB_LOCALRANK "orte.local.rank"
#define ORTE_DB_ARCH "orte.arch" #define ORTE_DB_ARCH "orte.arch"
#define ORTE_DB_NPROCS "orte.nprocs" #define ORTE_DB_NPROCS "orte.nprocs"
#define ORTE_DB_NPROC_OFFSET "orte.nproc.offset" #define ORTE_DB_NPROC_OFFSET "orte.nproc.offset"

Просмотреть файл

@ -1014,7 +1014,7 @@ int orte_util_decode_pidmap(opal_byte_object_t *bo)
} }
/* store the values in the database - again, these are for our own internal use */ /* store the values in the database - again, these are for our own internal use */
if (ORTE_SUCCESS != (rc = opal_db.store((opal_identifier_t*)&proc, OPAL_SCOPE_INTERNAL, if (ORTE_SUCCESS != (rc = opal_db.store((opal_identifier_t*)&proc, OPAL_SCOPE_INTERNAL,
ORTE_DB_LOCALRANK, &local_rank, ORTE_LOCAL_RANK))) { OPAL_DB_LOCALRANK, &local_rank, ORTE_LOCAL_RANK))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto cleanup; goto cleanup;
} }