1
1

- mods to support daemon command line parameters

- check return value correctly when posting non-blocking recvs
- use any values that have been set in the global structs as the
  defaults when registering mca parameters - this prevents any
  values that have been set in the structs from the command line
  parser from being overwritten

This commit was SVN r5011.
Этот коммит содержится в:
Tim Woodall 2005-03-24 15:45:44 +00:00
родитель 1f6b5be155
Коммит 805095986c
17 изменённых файлов: 59 добавлений и 429 удалений

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

@ -35,6 +35,7 @@
#include "mca/errmgr/errmgr.h" #include "mca/errmgr/errmgr.h"
#include "mca/oob/oob_types.h" #include "mca/oob/oob_types.h"
#include "mca/rml/rml.h" #include "mca/rml/rml.h"
#include "mca/errmgr/errmgr.h"
#include "gpr_proxy.h" #include "gpr_proxy.h"
@ -249,7 +250,13 @@ orte_gpr_proxy_component_init(bool *allow_multi_user_threads, bool *have_hidden_
int orte_gpr_proxy_module_init(void) int orte_gpr_proxy_module_init(void)
{ {
/* issue the non-blocking receive */ /* issue the non-blocking receive */
return orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_GPR_NOTIFY, 0, orte_gpr_proxy_notify_recv, NULL); int rc;
rc = orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_GPR_NOTIFY, 0, orte_gpr_proxy_notify_recv, NULL);
if(rc < 0) {
ORTE_ERROR_LOG(rc);
return rc;
}
return ORTE_SUCCESS;
} }

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

@ -251,7 +251,7 @@ int orte_gpr_replica_add_values(orte_gpr_notify_data_t **data,
orte_gpr_replica_subscribed_data_t *sptr) orte_gpr_replica_subscribed_data_t *sptr)
{ {
int i, rc, j, k, n, m, matches, num_tokens, num_keys, cnt; int i, rc, j, k, n, m, matches, num_tokens, num_keys, cnt;
orte_gpr_value_t **values, **data_values; orte_gpr_value_t **values = NULL, **data_values;
orte_gpr_keyval_t **kptr; orte_gpr_keyval_t **kptr;
/* get the data off the registry */ /* get the data off the registry */
@ -403,10 +403,9 @@ MOVEON:
} }
OBJ_RELEASE(values[i]); OBJ_RELEASE(values[i]);
} /* for i */ } /* for i */
if (NULL != values) { if (NULL != values) {
free(values); free(values);
} }
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }

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

@ -34,6 +34,7 @@
#include "gpr_replica.h" #include "gpr_replica.h"
#include "mca/gpr/replica/api_layer/gpr_replica_api.h" #include "mca/gpr/replica/api_layer/gpr_replica_api.h"
#include "mca/gpr/replica/communications/gpr_replica_comm.h" #include "mca/gpr/replica/communications/gpr_replica_comm.h"
#include "mca/errmgr/errmgr.h"
/* /*
@ -547,7 +548,11 @@ int orte_gpr_replica_module_init(void)
{ {
/* issue the non-blocking receive */ /* issue the non-blocking receive */
if (!orte_gpr_replica_globals.isolate) { if (!orte_gpr_replica_globals.isolate) {
return orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_GPR, 0, orte_gpr_replica_recv, NULL); int rc = orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_GPR, 0, orte_gpr_replica_recv, NULL);
if(rc < 0) {
ORTE_ERROR_LOG(rc);
return rc;
}
} }
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }

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

@ -234,12 +234,18 @@ mca_ns_base_module_t* orte_ns_replica_init(int *priority)
int orte_ns_replica_module_init(void) int orte_ns_replica_module_init(void)
{ {
int rc;
if (orte_ns_replica_isolate) { if (orte_ns_replica_isolate) {
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
/* issue non-blocking receive for call_back function */ /* issue non-blocking receive for call_back function */
return orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_NS, 0, orte_ns_replica_recv, NULL); rc = orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_NS, 0, orte_ns_replica_recv, NULL);
if(rc < 0) {
ORTE_ERROR_LOG(rc);
return rc;
}
return ORTE_SUCCESS;
} }

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

@ -1,25 +0,0 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University.
# All rights reserved.
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
# All rights reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
include $(top_ompi_srcdir)/config/Makefile.options
AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include
noinst_LTLIBRARIES = libmca_pls_bproc_proxy.la
libmca_pls_bproc_proxy_la_SOURCES = \
pls_bproc_proxy.h \
pls_bproc_proxy.c \
pls_bproc_proxy_component.c

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

@ -1,22 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University.
# All rights reserved.
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
# All rights reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
PARAM_INIT_FILE=pls_bproc_proxy.c
PARAM_CONFIG_HEADER_FILE="pls_bproc_proxy_config.h"
PARAM_CONFIG_FILES="Makefile"

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

@ -1,116 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University.
# All rights reserved.
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
# All rights reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# Main function. This will be invoked in the middle of the templated
# configure script.
#
AC_DEFUN([MCA_CONFIGURE_STUB],[
#
# Make a best effort to see if we are on a BPROC system. Also allow
# user to specify location to the bproc prefix, which will work just as
# well :).
#
OMPI_HAVE_BPROC=0
BPROC_LDFLAGS=""
#
AC_ARG_WITH(bproc,
AC_HELP_STRING([--with-bproc=DIR],
[directory where the bproc software was installed]))
#
# Case 1: --without-bproc specified - overrides autodetect
#
if test "$with_bproc" = "no"; then
OMPI_HAVE_BPROC=0
#
# Case 2: --with-bproc specified - look in generic places for bproc libs
#
elif test "$with_bproc" = "yes"; then
# See if we can find the bproc libraries...
LIBS_save="$LIBS"
AC_CHECK_LIB(bproc, bproc_numnodes,
OMPI_HAVE_BPROC=1,
AC_MSG_ERROR([*** Connot find working libbproc.]))
LIBS="$LIBS_save"
#
# Case 3: nothing specified - if it is there, go with it. If not, don't :)
#
elif test -z "$with_bproc"; then
LIBS_save="$LIBS"
AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1)
LIBS="$LIBS_save"
#
# Case 4: --with-bproc=<foo> specified - try where they said to find it
#
else
BPROC_DIR=$with_bproc
if test -n "$BPROC_DIR"; then
# Make the tests work...
OLDLDFLAGS="$LDFLAGS"
OLDCPPFLAGS="$CPPFLAGS"
BPROC_LDFLAGS="-L$BPROC_DIR/lib"
LDFLAGS="$LDFLAGS $BPROC_LDFLAGS"
CPPFLAGS="$CPPFLAGS -I$BPROC_DIR/include"
LIBS_save="$LIBS"
AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1,
AC_MSG_ERROR([*** Cannot find working libbproc.]))
# Since we are going to add the -L and -l to LIBOMPI_EXTRA_LIBS,
# we reset this to the start ...
LDFLAGS="$OLDLDFLAGS"
CPPFLAGS="$OLDCPPFLAGS"
LIBS="$LIBS_save"
else
AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1,
AC_MSG_ERROR([*** Cannot find working libbproc.]))
fi
fi
AC_MSG_CHECKING([if want BPROC support])
if test "$OMPI_HAVE_BPROC" = "1"; then
AC_MSG_RESULT([yes])
#
# Ok, we have bproc support. Add proper things to the various
# compiler flags..
#
WRAPPER_EXTRAN_LDFLAGS="$BPROC_LDFLAGS"
WRAPPER_EXTRA_LIBS="-lbproc"
LIBS="-lbproc"
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([*** Connot find working libbproc.])
LAM_HAVE_BPROC3_API=0
fi
AC_DEFINE_UNQUOTED(OMPI_HAVE_BPROC, $OMPI_HAVE_BPROC,
[Whether we have bproc support or not])
# Clean up
unset BPROC_LDFLAGS
])dnl

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

@ -1,54 +0,0 @@
/* -*- C -*-
*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#include "ompi_config.h"
#include "mca/ns/base/base.h"
#include "mca/pls/base/base.h"
#include "pls_bproc_proxy.h"
int orte_pls_bproc_proxy_launch(orte_jobid_t jobid)
{
return ORTE_ERROR;
}
int orte_pls_bproc_proxy_terminate_job(orte_jobid_t jobid)
{
return ORTE_ERROR;
}
int orte_pls_bproc_proxy_terminate_proc(const orte_process_name_t* proc_name)
{
return ORTE_ERROR;
}
int orte_pls_bproc_proxy_finalize(void)
{
return ORTE_SUCCESS;
}
orte_pls_base_module_t orte_pls_bproc_proxy_module = {
orte_pls_bproc_proxy_launch,
orte_pls_bproc_proxy_terminate_job,
orte_pls_bproc_proxy_terminate_proc,
orte_pls_bproc_proxy_finalize
};

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

@ -1,57 +0,0 @@
/* -*- C -*-
*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*
*/
#ifndef ORTE_PLS_BPROC_PROXY_H_
#define ORTE_PLS_BPROC_PROXY_H_
#include "ompi_config.h"
#include "mca/pls/base/base.h"
#include <sys/bproc.h>
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* Module open / close
*/
int orte_pls_bproc_proxy_component_open(void);
int orte_pls_bproc_proxy_component_close(void);
/*
* Startup / Shutdown
*/
orte_pls_base_module_t* orte_pls_bproc_proxy_init(int *priority);
int orte_pls_bproc_proxy_finalize(void);
/*
* Interface
*/
int orte_pls_bproc_proxy_launch(orte_jobid_t);
int orte_pls_bproc_proxy_terminate_job(orte_jobid_t);
int orte_pls_bproc_proxy_terminate_proc(const orte_process_name_t* proc_name);
ORTE_DECLSPEC extern orte_pls_base_component_t mca_pls_bproc_proxy_component;
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_bproc_proxy_module;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* MCA_PCM_BPROCx_H_ */

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

@ -1,80 +0,0 @@
/* -*- C -*-
*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#include "ompi_config.h"
#include "include/orte_constants.h"
#include "include/types.h"
#include "class/ompi_list.h"
#include "util/proc_info.h"
#include "mca/mca.h"
#include "mca/base/mca_base_param.h"
#include "mca/pls/base/base.h"
#include "pls_bproc_proxy.h"
/*
* Struct of function pointers and all that to let us be initialized
*/
orte_pls_base_component_t mca_pls_bproc_proxy_component = {
{
ORTE_PLS_BASE_VERSION_1_0_0,
"bproc_proxy", /* MCA component name */
1, /* MCA component major version */
0, /* MCA component minor version */
0, /* MCA component release version */
orte_pls_bproc_proxy_component_open, /* component open */
orte_pls_bproc_proxy_component_close /* component close */
},
{
false /* checkpoint / restart */
},
orte_pls_bproc_proxy_init /* component init */
};
/*
* Module variables handles
*/
static int param_priority;
int orte_pls_bproc_proxy_component_open(void)
{
param_priority =
mca_base_param_register_int("pls", "bproc_proxy", "priority", NULL, 20);
return ORTE_SUCCESS;
}
int orte_pls_bproc_proxy_component_close(void)
{
return ORTE_SUCCESS;
}
orte_pls_base_module_t* orte_pls_bproc_proxy_init(
int *priority)
{
if(orte_process_info.seed)
return NULL;
/* initialize the priority */
mca_base_param_lookup_int(param_priority, priority);
return &orte_pls_bproc_proxy_module;
}

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

@ -54,7 +54,7 @@ static int orte_pls_fork_launch_threaded(orte_jobid_t);
orte_pls_base_module_1_0_0_t orte_pls_fork_module = { orte_pls_base_module_1_0_0_t orte_pls_fork_module = {
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
orte_pls_fork_launch_threaded, orte_pls_fork_launch_threaded,
#else #else
orte_pls_fork_launch, orte_pls_fork_launch,
@ -276,7 +276,7 @@ int orte_pls_fork_finalize(void)
* Handle threading issues. * Handle threading issues.
*/ */
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
struct orte_pls_fork_stack_t { struct orte_pls_fork_stack_t {
ompi_condition_t cond; ompi_condition_t cond;

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

@ -46,13 +46,13 @@
#define NUM_CONCURRENT 128 #define NUM_CONCURRENT 128
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
static int orte_pls_rsh_launch_threaded(orte_jobid_t jobid); static int orte_pls_rsh_launch_threaded(orte_jobid_t jobid);
#endif #endif
orte_pls_base_module_1_0_0_t orte_pls_rsh_module = { orte_pls_base_module_1_0_0_t orte_pls_rsh_module = {
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
orte_pls_rsh_launch_threaded, orte_pls_rsh_launch_threaded,
#else #else
orte_pls_rsh_launch, orte_pls_rsh_launch,
@ -346,7 +346,7 @@ int orte_pls_rsh_finalize(void)
* Handle threading issues. * Handle threading issues.
*/ */
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
struct orte_pls_rsh_stack_t { struct orte_pls_rsh_stack_t {
ompi_condition_t cond; ompi_condition_t cond;

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

@ -37,10 +37,9 @@ typedef uint32_t orte_rml_tag_t;
#define ORTE_RML_TAG_GPR_NOTIFY 3 #define ORTE_RML_TAG_GPR_NOTIFY 3
#define ORTE_RML_TAG_DAEMON 4 #define ORTE_RML_TAG_DAEMON 4
#define ORTE_RML_TAG_IOF_SVC 5 #define ORTE_RML_TAG_IOF_SVC 5
#define ORTE_RML_TAG_IOF_CLT 6 #define ORTE_RML_TAG_IOF_CLNT 6
#define ORTE_RML_TAG_XCAST 7 #define ORTE_RML_TAG_XCAST 7
#define ORTE_RML_TAG_BPROC_SVC 8 #define ORTE_RML_TAG_RMGR 8
#define ORTE_RML_TAG_BPROC_CLT 9
#define ORTE_RML_TAG_DYNAMIC 2000 #define ORTE_RML_TAG_DYNAMIC 2000
#define ORTE_RML_TAG_MAX UINT32_MAX #define ORTE_RML_TAG_MAX UINT32_MAX

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

@ -54,9 +54,6 @@ int orte_universe_exists()
orte_process_name_t proc={0,0,0}; orte_process_name_t proc={0,0,0};
/* bool ns_found=false, gpr_found=false; */ /* bool ns_found=false, gpr_found=false; */
/* ensure that system info has been populated */
orte_sys_info();
/* if both ns_replica and gpr_replica were provided, check for contact with them */ /* if both ns_replica and gpr_replica were provided, check for contact with them */
if (NULL != orte_process_info.ns_replica_uri && NULL != orte_process_info.gpr_replica_uri) { if (NULL != orte_process_info.ns_replica_uri && NULL != orte_process_info.gpr_replica_uri) {
orte_process_name_t name; orte_process_name_t name;

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

@ -96,6 +96,15 @@ ompi_cmd_line_init_t orte_cmd_line_opts[] = {
{ NULL, NULL, NULL, '\0', NULL, "nodename", 1, { NULL, NULL, NULL, '\0', NULL, "nodename", 1,
&orte_system_info.nodename, OMPI_CMD_LINE_TYPE_STRING, &orte_system_info.nodename, OMPI_CMD_LINE_TYPE_STRING,
"Node name as specified by host/resource description." }, "Node name as specified by host/resource description." },
{ "seed", NULL, NULL, '\0', NULL, "seed", 0,
&orte_process_info.seed, OMPI_CMD_LINE_TYPE_BOOL,
"seed"},
{ "universe", "persistence", NULL, '\0', NULL, "persistent", 0,
&orte_universe_info.persistence, OMPI_CMD_LINE_TYPE_BOOL,
"persistent"},
{ "universe", "scope", NULL, '\0', NULL, "scope", 1,
&orte_universe_info.scope, OMPI_CMD_LINE_TYPE_STRING,
"scope"},
/* End of list */ /* End of list */
{ NULL, NULL, NULL, '\0', NULL, NULL, 0, { NULL, NULL, NULL, '\0', NULL, NULL, 0,
NULL, OMPI_CMD_LINE_TYPE_NULL, NULL } NULL, OMPI_CMD_LINE_TYPE_NULL, NULL }
@ -138,9 +147,7 @@ int main(int argc, char *argv[])
* First, ensure the process info structure in instantiated and initialized * First, ensure the process info structure in instantiated and initialized
* and set the daemon flag to true * and set the daemon flag to true
*/ */
orte_proc_info();
orte_process_info.daemon = true; orte_process_info.daemon = true;
/* /*
* Attempt to parse the daemon name and save in proc_info * Attempt to parse the daemon name and save in proc_info
@ -155,11 +162,6 @@ int main(int argc, char *argv[])
} }
if (!orte_process_info.seed) { /* if I'm not the seed... */
/* start recording the compound command that starts us up */
/* orte_gpr.begin_compound_cmd(); */
}
/* detach from controlling terminal */ /* detach from controlling terminal */
if(orted_globals.debug == false) { if(orted_globals.debug == false) {
orte_daemon_init(NULL); orte_daemon_init(NULL);
@ -230,20 +232,6 @@ int main(int argc, char *argv[])
return ret; return ret;
} }
if (!orte_process_info.seed) { /* if I'm not the seed... */
/* execute the compound command - no return data requested
* we'll get it all from the startup message
*/
/* orte_gpr.exec_compound_cmd(); */
/* wait to receive startup message and info distributed */
/* if (ORTE_SUCCESS != (ret = orte_wait_startup_msg())) {
printf("ompid: failed to see all procs register\n");
return ret;
}
*/
}
/* if i'm the seed, get my contact info and write my setup file for others to find */ /* if i'm the seed, get my contact info and write my setup file for others to find */
if (orte_process_info.seed) { if (orte_process_info.seed) {
if (NULL != orte_universe_info.seed_uri) { if (NULL != orte_universe_info.seed_uri) {

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

@ -60,25 +60,17 @@ int orte_proc_info(void)
/* all other params are set elsewhere */ /* all other params are set elsewhere */
id = mca_base_param_register_int("seed", NULL, NULL, NULL, (int)false); id = mca_base_param_register_int("seed", NULL, NULL, NULL, orte_process_info.seed);
mca_base_param_lookup_int(id, &tmp); mca_base_param_lookup_int(id, &tmp);
if (tmp) { orte_process_info.seed = (tmp ? true : false);
orte_process_info.seed = true;
} else {
orte_process_info.seed = false;
}
if (NULL == orte_process_info.gpr_replica_uri) { id = mca_base_param_register_string("gpr", "replica", "uri", NULL, orte_process_info.gpr_replica_uri);
id = mca_base_param_register_string("gpr", "replica", "uri", NULL, NULL); mca_base_param_lookup_string(id, &(orte_process_info.gpr_replica_uri));
mca_base_param_lookup_string(id, &(orte_process_info.gpr_replica_uri));
}
if (NULL == orte_process_info.ns_replica_uri) { id = mca_base_param_register_string("ns", "replica", "uri", NULL, orte_process_info.ns_replica_uri);
id = mca_base_param_register_string("ns", "replica", "uri", NULL, NULL); mca_base_param_lookup_string(id, &(orte_process_info.ns_replica_uri));
mca_base_param_lookup_string(id, &(orte_process_info.ns_replica_uri));
}
id = mca_base_param_register_string("tmpdir", "base", NULL, NULL, NULL); id = mca_base_param_register_string("tmpdir", "base", NULL, NULL, orte_process_info.tmpdir_base);
mca_base_param_lookup_string(id, &(orte_process_info.tmpdir_base)); mca_base_param_lookup_string(id, &(orte_process_info.tmpdir_base));
/* get the process id */ /* get the process id */

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

@ -38,7 +38,7 @@
orte_universe_t orte_universe_info = { orte_universe_t orte_universe_info = {
/* .init = */ false, /* .init = */ false,
/* .path = */ NULL, /* .path = */ NULL,
/* .name = */ NULL, /* .name = */ "default-universe",
/* .host = */ NULL, /* .host = */ NULL,
/* .uid = */ NULL, /* .uid = */ NULL,
/* .persistence = */ false, /* .persistence = */ false,
@ -55,42 +55,33 @@ int orte_univ_info(void)
int id, tmp; int id, tmp;
if (!orte_universe_info.init) { if (!orte_universe_info.init) {
id = mca_base_param_register_string("universe", "path", NULL, NULL, NULL); id = mca_base_param_register_string("universe", "path", NULL, NULL, orte_universe_info.path);
mca_base_param_lookup_string(id, &(orte_universe_info.path)); mca_base_param_lookup_string(id, &(orte_universe_info.path));
id = mca_base_param_register_string("universe", "name", NULL, NULL, "default-universe"); id = mca_base_param_register_string("universe", "name", NULL, NULL, orte_universe_info.name);
mca_base_param_lookup_string(id, &(orte_universe_info.name)); mca_base_param_lookup_string(id, &(orte_universe_info.name));
id = mca_base_param_register_string("universe", "host", NULL, NULL, NULL); id = mca_base_param_register_string("universe", "host", NULL, NULL, orte_universe_info.host);
mca_base_param_lookup_string(id, &(orte_universe_info.host)); mca_base_param_lookup_string(id, &(orte_universe_info.host));
/* uid is not set via parameter, but is determined elsewhere */ /* uid is not set via parameter, but is determined elsewhere */
id = mca_base_param_register_int("universe", "persistence", NULL, NULL, (int)false); id = mca_base_param_register_int("universe", "persistence", NULL, NULL, orte_universe_info.persistence);
mca_base_param_lookup_int(id, &tmp); mca_base_param_lookup_int(id, &tmp);
if (tmp) { orte_universe_info.persistence = (tmp ? true : false);
orte_universe_info.persistence = true;
} else {
orte_universe_info.persistence = false;
}
id = mca_base_param_register_string("universe", "scope", NULL, NULL, NULL); id = mca_base_param_register_string("universe", "scope", NULL, NULL, orte_universe_info.scope);
mca_base_param_lookup_string(id, &(orte_universe_info.scope)); mca_base_param_lookup_string(id, &(orte_universe_info.scope));
id = mca_base_param_register_int("universe", "console", NULL, NULL, (int)false); id = mca_base_param_register_int("universe", "console", NULL, NULL, orte_universe_info.console);
mca_base_param_lookup_int(id, &tmp); mca_base_param_lookup_int(id, &tmp);
if (tmp) { orte_universe_info.console = (tmp ? true : false);
orte_universe_info.console = true;
} else {
orte_universe_info.console = false;
}
id = mca_base_param_register_string("universe", "uri", NULL, NULL, NULL); id = mca_base_param_register_string("universe", "uri", NULL, NULL, orte_universe_info.seed_uri);
mca_base_param_lookup_string(id, &(orte_universe_info.seed_uri)); mca_base_param_lookup_string(id, &(orte_universe_info.seed_uri));
/* console connected is set elsewhere */ /* console connected is set elsewhere */
id = mca_base_param_register_string("universe", "script", NULL, NULL, orte_universe_info.scriptfile);
id = mca_base_param_register_string("universe", "script", NULL, NULL, NULL);
mca_base_param_lookup_string(id, &(orte_universe_info.scriptfile)); mca_base_param_lookup_string(id, &(orte_universe_info.scriptfile));
orte_universe_info.init = true; orte_universe_info.init = true;