2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-23 07:32:36 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*
|
|
|
|
* These symbols are in a file by themselves to provide nice linker
|
|
|
|
* semantics. Since linkers generally pull in symbols by object
|
|
|
|
* files, keeping these symbols as the only symbols in this file
|
|
|
|
* prevents utility programs such as "ompi_info" from having to import
|
|
|
|
* entire components just to query their version and parameters.
|
|
|
|
*/
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte_config.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/orte_constants.h"
|
|
|
|
#include "orte/mca/pls/pls.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "pls_poe.h"
|
2005-07-04 05:59:52 +04:00
|
|
|
#include "opal/util/path.h"
|
2005-07-04 04:13:44 +04:00
|
|
|
#include "opal/util/argv.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Public string showing the pls ompi_poe component version number
|
|
|
|
*/
|
|
|
|
const char *mca_pls_poe_component_version_string =
|
Major simplifications to component versioning:
- After long discussions and ruminations on how we run components in
LAM/MPI, made the decision that, by default, all components included
in Open MPI will use the version number of their parent project
(i.e., OMPI or ORTE). They are certaint free to use a different
number, but this simplification makes the common cases easy:
- components are only released when the parent project is released
- it is easy (trivial?) to distinguish which version component goes
with with version of the parent project
- removed all autogen/configure code for templating the version .h
file in components
- made all ORTE components use ORTE_*_VERSION for version numbers
- made all OMPI components use OMPI_*_VERSION for version numbers
- removed all VERSION files from components
- configure now displays OPAL, ORTE, and OMPI version numbers
- ditto for ompi_info
- right now, faking it -- OPAL and ORTE and OMPI will always have the
same version number (i.e., they all come from the same top-level
VERSION file). But this paves the way for the Great Configure
Reorganization, where, among other things, each project will have
its own version number.
So all in all, we went from a boatload of version numbers to
[effectively] three. That's pretty good. :-)
This commit was SVN r6344.
2005-07-05 00:12:36 +04:00
|
|
|
"Open MPI poe pls MCA component version " ORTE_VERSION;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variable
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Instantiate the public struct with all of our public information
|
|
|
|
* and pointers to our public functions in it
|
|
|
|
*/
|
|
|
|
|
2005-04-19 10:39:27 +04:00
|
|
|
orte_pls_poe_component_t mca_pls_poe_component = {
|
|
|
|
{
|
2005-03-14 23:57:21 +03:00
|
|
|
/* First, the mca_component_t struct containing meta information
|
|
|
|
about the component itself */
|
|
|
|
|
|
|
|
{
|
2006-09-15 01:29:51 +04:00
|
|
|
/* Indicate that we are a pls v1.3.0 component (which also
|
2005-03-14 23:57:21 +03:00
|
|
|
implies a specific MCA version) */
|
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
ORTE_PLS_BASE_VERSION_1_3_0,
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/* Component name and version */
|
|
|
|
|
|
|
|
"poe",
|
Major simplifications to component versioning:
- After long discussions and ruminations on how we run components in
LAM/MPI, made the decision that, by default, all components included
in Open MPI will use the version number of their parent project
(i.e., OMPI or ORTE). They are certaint free to use a different
number, but this simplification makes the common cases easy:
- components are only released when the parent project is released
- it is easy (trivial?) to distinguish which version component goes
with with version of the parent project
- removed all autogen/configure code for templating the version .h
file in components
- made all ORTE components use ORTE_*_VERSION for version numbers
- made all OMPI components use OMPI_*_VERSION for version numbers
- removed all VERSION files from components
- configure now displays OPAL, ORTE, and OMPI version numbers
- ditto for ompi_info
- right now, faking it -- OPAL and ORTE and OMPI will always have the
same version number (i.e., they all come from the same top-level
VERSION file). But this paves the way for the Great Configure
Reorganization, where, among other things, each project will have
its own version number.
So all in all, we went from a boatload of version numbers to
[effectively] three. That's pretty good. :-)
This commit was SVN r6344.
2005-07-05 00:12:36 +04:00
|
|
|
ORTE_MAJOR_VERSION,
|
|
|
|
ORTE_MINOR_VERSION,
|
|
|
|
ORTE_RELEASE_VERSION,
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/* Component open and close functions */
|
|
|
|
|
2005-04-19 10:39:27 +04:00
|
|
|
orte_pls_poe_component_open,
|
2005-03-14 23:57:21 +03:00
|
|
|
NULL
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Next the MCA v1.0.0 component meta data */
|
|
|
|
|
|
|
|
{
|
|
|
|
/* Whether the component is checkpointable or not */
|
|
|
|
|
|
|
|
false
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Initialization / querying functions */
|
|
|
|
|
2005-04-19 10:39:27 +04:00
|
|
|
orte_pls_poe_component_init
|
|
|
|
}
|
2005-03-14 23:57:21 +03:00
|
|
|
};
|
|
|
|
|
2005-05-08 02:48:29 +04:00
|
|
|
/**
|
|
|
|
orte_pls_poe_component_open - open component and register all parameters
|
|
|
|
@return error number
|
|
|
|
*/
|
|
|
|
int orte_pls_poe_component_open(void)
|
|
|
|
{
|
2005-05-08 07:06:36 +04:00
|
|
|
char *param;
|
2005-10-13 16:58:31 +04:00
|
|
|
mca_base_component_t *c = &mca_pls_poe_component.super.pls_version;
|
|
|
|
|
|
|
|
mca_base_param_reg_int(c, "mp_retry",
|
|
|
|
"specifies the interval (in seconds) to wait before repeating the node request",
|
|
|
|
true, false, 0, &mca_pls_poe_component.mp_retry);
|
|
|
|
mca_base_param_reg_int(c, "mp_retrycount",
|
|
|
|
"specifies the number of times the Partition Manager should make the request before returning",
|
|
|
|
true, false, 0, &mca_pls_poe_component.mp_retrycount);
|
|
|
|
mca_base_param_reg_int(c, "mp_infolevel",
|
|
|
|
"specify the level of messages you want from POE (0-6)",
|
|
|
|
true, false, 0, &mca_pls_poe_component.mp_infolevel);
|
|
|
|
mca_base_param_reg_string(c, "mp_labelio",
|
|
|
|
"Whether or not to label message output with task identifiers (yes or no)",
|
|
|
|
true, false, "no", &mca_pls_poe_component.mp_labelio);
|
|
|
|
mca_base_param_reg_string(c, "mp_stdoutmode",
|
|
|
|
"standard output mode (ordered, unordered or taskID)",
|
|
|
|
true, false, "unordered", &mca_pls_poe_component.mp_stdoutmode);
|
|
|
|
|
|
|
|
mca_base_param_reg_int(c, "debug",
|
|
|
|
"Whether or not to enable debugging output for the poe pls component (0 or 1)",
|
|
|
|
false, false, 0, &mca_pls_poe_component.debug);
|
|
|
|
mca_base_param_reg_int(c, "verbose",
|
|
|
|
"Verbose level",
|
|
|
|
true, false, 0, &mca_pls_poe_component.verbose);
|
|
|
|
mca_base_param_reg_int(c, "priority",
|
|
|
|
"Priority of the poe pls component",
|
|
|
|
false , false, 100, &mca_pls_poe_component.priority);
|
|
|
|
mca_base_param_reg_string(c, "orted",
|
|
|
|
"The command name that the poe pls component will invoke for the ORTE daemon",
|
|
|
|
false, false, "orted", &mca_pls_poe_component.orted);
|
|
|
|
mca_base_param_reg_string(c, "class",
|
|
|
|
"class (interactive or batch)",
|
|
|
|
true, false, "interactive", &mca_pls_poe_component.class);
|
|
|
|
mca_base_param_reg_string(c, "resource_allocation",
|
|
|
|
"resource_allocation mode (hostfile or automatic)",
|
|
|
|
false, false, "hostfile", &mca_pls_poe_component.resource_allocation);
|
|
|
|
mca_base_param_reg_string(c, "progenv",
|
|
|
|
"The command name that setup environment",
|
|
|
|
false, false, "env", &mca_pls_poe_component.env);
|
|
|
|
mca_base_param_reg_string(c, "progpoe",
|
|
|
|
"The POE command",
|
|
|
|
false, false, "poe", ¶m);
|
2005-07-04 04:13:44 +04:00
|
|
|
mca_pls_poe_component.argv = opal_argv_split(param, ' ');
|
|
|
|
mca_pls_poe_component.argc = opal_argv_count(mca_pls_poe_component.argv);
|
2005-05-08 07:06:36 +04:00
|
|
|
if (mca_pls_poe_component.argc > 0) {
|
|
|
|
mca_pls_poe_component.path = strdup(mca_pls_poe_component.argv[0]);
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
} else {
|
|
|
|
mca_pls_poe_component.path = NULL;
|
|
|
|
return ORTE_ERR_BAD_PARAM;
|
|
|
|
}
|
2005-10-13 16:58:31 +04:00
|
|
|
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2006-08-23 07:32:36 +04:00
|
|
|
#if !defined(__WINDOWS__)
|
|
|
|
extern char **environ;
|
|
|
|
#endif /* !defined(__WINDOWS__) */
|
|
|
|
|
2005-05-08 02:48:29 +04:00
|
|
|
/**
|
|
|
|
orte_pls_poe_component_init - initialize component, check if we can run on this machine.
|
|
|
|
@return error number
|
|
|
|
*/
|
2005-04-19 10:39:27 +04:00
|
|
|
orte_pls_base_module_t *orte_pls_poe_component_init(int *priority)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/* if we are NOT an HNP, then don't select us */
|
|
|
|
if (!orte_process_info.seed) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2005-07-04 05:59:52 +04:00
|
|
|
mca_pls_poe_component.path = opal_path_findv(mca_pls_poe_component.argv[0], 0, environ, NULL);
|
2005-04-19 10:39:27 +04:00
|
|
|
if (NULL == mca_pls_poe_component.path) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-07-04 05:59:52 +04:00
|
|
|
mca_pls_poe_component.env = opal_path_findv(mca_pls_poe_component.env, 0, environ, NULL);
|
2005-05-18 19:55:34 +04:00
|
|
|
if (NULL == mca_pls_poe_component.env) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-04-19 10:39:27 +04:00
|
|
|
*priority = mca_pls_poe_component.priority;
|
|
|
|
return &orte_pls_poe_module;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|