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.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-03-14 23:57:21 +03:00
|
|
|
* 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.
|
2013-03-28 01:14:43 +04:00
|
|
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
2015-06-24 06:59:57 +03:00
|
|
|
* All rights reserved.
|
2015-05-08 03:17:00 +03:00
|
|
|
* Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/constants.h"
|
|
|
|
|
2009-02-14 05:26:12 +03:00
|
|
|
#include "opal/util/output.h"
|
2015-03-06 06:50:44 +03:00
|
|
|
#include "orte/mca/mca.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/base/base.h"
|
2006-09-15 01:29:51 +04:00
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/mca/plm/plm.h"
|
|
|
|
#include "orte/mca/plm/base/plm_private.h"
|
2008-06-18 07:15:56 +04:00
|
|
|
#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-02-28 04:57:57 +03:00
|
|
|
* Global variables for use within PLM frameworks
|
2005-03-14 23:57:21 +03:00
|
|
|
*/
|
2015-05-08 03:17:00 +03:00
|
|
|
orte_plm_globals_t orte_plm_globals = {0};
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
/*
|
|
|
|
* The default module
|
|
|
|
*/
|
2015-06-18 19:53:20 +03:00
|
|
|
orte_plm_base_module_t orte_plm = {0};
|
2006-09-15 01:29:51 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
static int orte_plm_base_close(void)
|
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
/* Close the selected component */
|
|
|
|
if( NULL != orte_plm.finalize ) {
|
|
|
|
orte_plm.finalize();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if we are the HNP, then stop our receive */
|
|
|
|
if (ORTE_PROC_IS_HNP) {
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_plm_base_comm_stop())) {
|
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return mca_base_framework_components_close(&orte_plm_base_framework, NULL);
|
|
|
|
}
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/**
|
2013-03-28 01:14:43 +04:00
|
|
|
* Function for finding and opening either all MCA components,
|
|
|
|
* or the one that was specifically requested via a MCA parameter.
|
2005-03-14 23:57:21 +03:00
|
|
|
*/
|
2013-03-28 01:14:43 +04:00
|
|
|
static int orte_plm_base_open(mca_base_open_flag_t flags)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2008-02-28 04:57:57 +03:00
|
|
|
/* init the next jobid */
|
2010-04-13 02:33:09 +04:00
|
|
|
orte_plm_globals.next_jobid = 1;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
Although we never really thought about it, we made an unconscious assumption in the mapper system - we assumed that the daemons would be placed on nodes in the order that the nodes appear in the allocation. In other words, we assumed that the launch environment would map processes in node order.
Turns out, this isn't necessarily true. The Cray, for example, launches processes in a toroidal pattern, thus causing the daemons to wind up somewhere other than what we thought. Other environments (e.g., slurm) are also capable of such behavior, depending upon the default mapping algorithm they are told to use.
Resolve this problem by making the daemon-to-node assignment in the affected environments when the daemon calls back and tells us what node it is on. Order the nodes in the mapping list so they are in daemon-vpid order as opposed to the order in which they show in the allocation. For environments that don't exhibit this mapping behavior (e.g., rsh), this won't have any impact.
Also, clean up the vm launch procedure a little bit so it more closely aligns with the state machine implementation that is coming, and remove some lingering "slave" code.
This commit was SVN r25551.
2011-11-30 23:58:24 +04:00
|
|
|
/* default to assigning daemons to nodes at launch */
|
|
|
|
orte_plm_globals.daemon_nodes_assigned_at_launch = true;
|
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
/* Open up all available components */
|
|
|
|
return mca_base_framework_components_open(&orte_plm_base_framework, flags);
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
2013-03-28 01:14:43 +04:00
|
|
|
|
|
|
|
MCA_BASE_FRAMEWORK_DECLARE(orte, plm, NULL, NULL, orte_plm_base_open, orte_plm_base_close,
|
|
|
|
mca_plm_base_static_components, 0);
|