Merge pull request #4232 from rhc54/topic/local
Implement support for "local" range when publishing data
Этот коммит содержится в:
Коммит
48bbf707c3
@ -41,6 +41,7 @@ int main(int argc, char **argv)
|
||||
uint32_t nprocs;
|
||||
pmix_info_t *info;
|
||||
pmix_pdata_t *pdata;
|
||||
pmix_data_range_t range = PMIX_RANGE_LOCAL;
|
||||
|
||||
/* init us */
|
||||
if (PMIX_SUCCESS != (rc = PMIx_Init(&myproc, NULL, 0))) {
|
||||
@ -69,14 +70,15 @@ int main(int argc, char **argv)
|
||||
|
||||
/* publish something */
|
||||
if (0 == myproc.rank) {
|
||||
PMIX_INFO_CREATE(info, 2);
|
||||
PMIX_INFO_CREATE(info, 3);
|
||||
(void)strncpy(info[0].key, "FOOBAR", PMIX_MAX_KEYLEN);
|
||||
info[0].value.type = PMIX_UINT8;
|
||||
info[0].value.data.uint8 = 1;
|
||||
(void)strncpy(info[1].key, "PANDA", PMIX_MAX_KEYLEN);
|
||||
info[1].value.type = PMIX_SIZE;
|
||||
info[1].value.data.size = 123456;
|
||||
if (PMIX_SUCCESS != (rc = PMIx_Publish(info, 2))) {
|
||||
PMIX_INFO_LOAD(&info[2], PMIX_RANGE, &range, PMIX_DATA_RANGE);
|
||||
if (PMIX_SUCCESS != (rc = PMIx_Publish(info, 3))) {
|
||||
fprintf(stderr, "Client ns %s rank %d: PMIx_Publish failed: %d\n", myproc.nspace, myproc.rank, rc);
|
||||
goto done;
|
||||
}
|
||||
|
@ -96,7 +96,6 @@
|
||||
#include "orte/runtime/orte_quit.h"
|
||||
#include "orte/runtime/orte_cr.h"
|
||||
#include "orte/runtime/orte_locks.h"
|
||||
#include "orte/runtime/orte_data_server.h"
|
||||
|
||||
#include "orte/mca/ess/ess.h"
|
||||
#include "orte/mca/ess/base/base.h"
|
||||
@ -622,13 +621,6 @@ static int rte_init(void)
|
||||
orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SHOW_HELP,
|
||||
ORTE_RML_PERSISTENT, orte_show_help_recv, NULL);
|
||||
|
||||
/* setup the data server */
|
||||
if (ORTE_SUCCESS != (ret = orte_data_server_init())) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
error = "orte_data_server_init";
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (orte_create_session_dirs) {
|
||||
/* set the opal_output hnp file location to be in the
|
||||
* proc-specific session directory. */
|
||||
@ -817,9 +809,6 @@ static int rte_finalize(void)
|
||||
/* shutdown the pmix server */
|
||||
pmix_server_finalize();
|
||||
(void) mca_base_framework_close(&opal_pmix_base_framework);
|
||||
/* cleanup our data server */
|
||||
orte_data_server_finalize();
|
||||
|
||||
(void) mca_base_framework_close(&orte_dfs_base_framework);
|
||||
(void) mca_base_framework_close(&orte_filem_base_framework);
|
||||
/* output any lingering stdout/err data */
|
||||
@ -921,8 +910,8 @@ static void clean_abort(int fd, short flags, void *arg)
|
||||
orte_odls.kill_local_procs(NULL);
|
||||
/* whack any lingering session directory files from our jobs */
|
||||
orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);
|
||||
/* cleanup our data server */
|
||||
orte_data_server_finalize();
|
||||
/* cleanup our pmix server */
|
||||
opal_pmix.finalize();
|
||||
/* exit with a non-zero status */
|
||||
exit(ORTE_ERROR_DEFAULT_EXIT_CODE);
|
||||
}
|
||||
@ -941,10 +930,6 @@ static void clean_abort(int fd, short flags, void *arg)
|
||||
* so need to tell them that!
|
||||
*/
|
||||
orte_execute_quiet = true;
|
||||
if (!orte_never_launched) {
|
||||
/* cleanup our data server */
|
||||
orte_data_server_finalize();
|
||||
}
|
||||
/* We are in an event handler; the job completed procedure
|
||||
will delete the signal handler that is currently running
|
||||
(which is a Bad Thing), so we can't call it directly.
|
||||
|
@ -70,6 +70,7 @@
|
||||
#include "orte/util/show_help.h"
|
||||
#include "orte/util/threads.h"
|
||||
#include "orte/runtime/orte_globals.h"
|
||||
#include "orte/runtime/orte_data_server.h"
|
||||
|
||||
#include "pmix_server.h"
|
||||
#include "pmix_server_internal.h"
|
||||
@ -293,6 +294,9 @@ int pmix_server_init(void)
|
||||
|
||||
void pmix_server_start(void)
|
||||
{
|
||||
/* setup our local data server */
|
||||
orte_data_server_init();
|
||||
|
||||
/* setup recv for direct modex requests */
|
||||
orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DIRECT_MODEX,
|
||||
ORTE_RML_PERSISTENT, pmix_server_dmdx_recv, NULL);
|
||||
@ -331,6 +335,9 @@ void pmix_server_finalize(void)
|
||||
orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DATA_CLIENT);
|
||||
orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_NOTIFICATION);
|
||||
|
||||
/* finalize our local data server */
|
||||
orte_data_server_finalize();
|
||||
|
||||
/* shutdown the local server */
|
||||
opal_pmix.server_finalize();
|
||||
|
||||
|
@ -187,8 +187,20 @@ static void execute(int sd, short args, void *cbdata)
|
||||
|
||||
/* if the range is SESSION, then set the target to the global server */
|
||||
if (OPAL_PMIX_RANGE_SESSION == req->range) {
|
||||
opal_output_verbose(1, orte_pmix_server_globals.output,
|
||||
"%s orted:pmix:server range SESSION",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
|
||||
target = &orte_pmix_server_globals.server;
|
||||
} else if (OPAL_PMIX_RANGE_LOCAL == req->range) {
|
||||
/* if the range is local, send it to myself */
|
||||
opal_output_verbose(1, orte_pmix_server_globals.output,
|
||||
"%s orted:pmix:server range LOCAL",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
|
||||
target = ORTE_PROC_MY_NAME;
|
||||
} else {
|
||||
opal_output_verbose(1, orte_pmix_server_globals.output,
|
||||
"%s orted:pmix:server range GLOBAL",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
|
||||
target = ORTE_PROC_MY_HNP;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user