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:
parent
86e40c568a
commit
c3df744a3b
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user