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.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* 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$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/constants.h"
|
|
|
|
#include "orte/types.h"
|
|
|
|
|
2008-06-18 07:15:56 +04:00
|
|
|
#if !ORTE_DISABLE_FULL_SUPPORT
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "opal/util/argv.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2006-09-15 01:29:51 +04:00
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
2008-06-09 18:53:58 +04:00
|
|
|
#include "orte/util/show_help.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
#include "orte/mca/plm/plm.h"
|
|
|
|
#include "orte/mca/plm/base/plm_private.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2008-06-18 07:15:56 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "orte/mca/plm/base/base.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
|
|
|
* module's public mca_base_module_t struct.
|
|
|
|
*/
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/mca/plm/base/static-components.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2008-06-18 07:15:56 +04:00
|
|
|
#if ORTE_DISABLE_FULL_SUPPORT
|
|
|
|
/* have to include a bogus function here so that
|
|
|
|
* the build system sees at least one function
|
|
|
|
* in the library
|
|
|
|
*/
|
|
|
|
int orte_plm_base_open(void)
|
|
|
|
{
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
/*
|
|
|
|
* Global public variables
|
|
|
|
*/
|
|
|
|
orte_plm_base_t orte_plm_base;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/*
|
2008-02-28 04:57:57 +03:00
|
|
|
* Global variables for use within PLM frameworks
|
2005-03-14 23:57:21 +03:00
|
|
|
*/
|
2008-02-28 04:57:57 +03:00
|
|
|
orte_plm_globals_t orte_plm_globals;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
/*
|
|
|
|
* The default module
|
|
|
|
*/
|
2008-02-28 04:57:57 +03:00
|
|
|
orte_plm_base_module_t orte_plm = {
|
|
|
|
orte_plm_proxy_init,
|
|
|
|
NULL, /* cannot set hnp name in a proxy */
|
|
|
|
orte_plm_proxy_spawn,
|
2008-04-14 22:26:08 +04:00
|
|
|
NULL, /* cannot remotely spawn by default */
|
2008-02-28 04:57:57 +03:00
|
|
|
NULL, /* cannot terminate job from a proxy */
|
|
|
|
NULL, /* cannot terminate orteds from a proxy */
|
|
|
|
NULL, /* cannot signal job from a proxy */
|
|
|
|
orte_plm_proxy_finalize
|
|
|
|
};
|
2006-09-15 01:29:51 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function for finding and opening either all MCA modules, or the one
|
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
2008-02-28 04:57:57 +03:00
|
|
|
int orte_plm_base_open(void)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2006-10-02 02:37:30 +04:00
|
|
|
/* Debugging / verbose output. Always have stream open, with
|
|
|
|
verbose set by the mca open system... */
|
2008-06-09 18:53:58 +04:00
|
|
|
orte_plm_globals.output = opal_output_open(NULL);
|
2006-09-29 16:45:50 +04:00
|
|
|
|
|
|
|
/* init selected to be false */
|
2008-02-28 04:57:57 +03:00
|
|
|
orte_plm_base.selected = false;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-11-14 00:51:34 +03:00
|
|
|
/* initialize the condition variables for orted comm */
|
2008-02-28 04:57:57 +03:00
|
|
|
OBJ_CONSTRUCT(&orte_plm_globals.orted_cmd_lock, opal_mutex_t);
|
|
|
|
OBJ_CONSTRUCT(&orte_plm_globals.orted_cmd_cond, opal_condition_t);
|
|
|
|
|
|
|
|
/* init the next jobid */
|
|
|
|
orte_plm_globals.next_jobid = 0;
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/* Open up all the components that we can find */
|
|
|
|
|
|
|
|
if (ORTE_SUCCESS !=
|
2008-02-28 04:57:57 +03:00
|
|
|
mca_base_components_open("plm", orte_plm_globals.output,
|
|
|
|
mca_plm_base_static_components,
|
|
|
|
&orte_plm_base.available_components, true)) {
|
2005-03-14 23:57:21 +03:00
|
|
|
return ORTE_ERROR;
|
|
|
|
}
|
2006-10-02 02:37:30 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
2008-06-18 07:15:56 +04:00
|
|
|
|
|
|
|
#endif
|