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.
This commit is contained in:
Ralph Castain 2014-02-17 01:40:56 +00:00
parent 86e40c568a
commit c3df744a3b
6 changed files with 29 additions and 7 deletions

View File

@ -57,9 +57,11 @@ typedef orte_ns_cmp_bitmask_t ompi_rte_cmp_bitmask_t;
#define OMPI_NAME ORTE_NAME
#define OMPI_PROCESS_NAME_HTON ORTE_PROCESS_NAME_HTON
#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_HOST_ID ORTE_DB_HOSTID
/* database keys */
#define OMPI_RTE_NODE_ID ORTE_DB_DAEMON_VPID
#define OMPI_RTE_HOST_ID ORTE_DB_HOSTID
/* Collective objects and operations */
#define ompi_rte_collective_t orte_grpcomm_collective_t

View File

@ -27,6 +27,9 @@ BEGIN_C_DECLS
#define OPAL_DB_LOCALITY "opal.locality"
#define OPAL_DB_CPUSET "opal.cpuset"
#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

View File

@ -12,7 +12,7 @@
* Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -240,6 +240,24 @@ int orte_ess_base_app_setup(bool db_restrict_local)
proc-specific session directory. */
opal_output_set_output_file_info(orte_process_info.proc_session_dir,
"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 */

View File

@ -376,7 +376,7 @@ static int rte_init(void)
goto error;
}
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))) {
error = "db store local rank";
goto error;

View File

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

View File

@ -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 */
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);
goto cleanup;
}