2015-10-19 10:39:35 -06:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-03-14 20:57:21 +00:00
|
|
|
/*
|
2008-05-06 18:08:45 +00:00
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
2005-11-05 19:57:48 +00:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2007-04-12 04:55:23 +00:00
|
|
|
* Copyright (c) 2004-2007 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-03-14 20:57:21 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2015-10-19 10:39:35 -06:00
|
|
|
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
|
2015-06-23 20:59:57 -07:00
|
|
|
* All rights reserved.
|
2015-10-19 10:39:35 -06:00
|
|
|
* Copyright (c) 2015 Intel, Inc. All rights reserved.
|
2005-03-14 20:57:21 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-03-14 20:57:21 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-03-14 20:57:21 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2008-02-28 01:57:57 +00:00
|
|
|
#include "orte/constants.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2015-03-05 20:50:44 -07:00
|
|
|
#include "orte/mca/mca.h"
|
2005-12-22 14:29:45 +00:00
|
|
|
#include "opal/mca/base/base.h"
|
2007-04-12 04:55:23 +00:00
|
|
|
#include "opal/mca/base/mca_base_component_repository.h"
|
2006-10-02 00:46:31 +00:00
|
|
|
|
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
|
2008-02-28 01:57:57 +00:00
|
|
|
#include "orte/mca/plm/base/plm_private.h"
|
|
|
|
#include "orte/mca/plm/base/base.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
|
2006-09-14 21:29:51 +00:00
|
|
|
/**
|
2015-09-24 07:16:48 -07:00
|
|
|
* Function for selecting one component from all those that are
|
2005-03-14 20:57:21 +00:00
|
|
|
* available.
|
|
|
|
*/
|
2005-03-31 23:25:24 +00:00
|
|
|
|
2008-02-28 01:57:57 +00:00
|
|
|
int orte_plm_base_select(void)
|
2005-03-14 20:57:21 +00:00
|
|
|
{
|
2015-09-24 07:16:48 -07:00
|
|
|
int rc;
|
2008-05-06 18:08:45 +00:00
|
|
|
orte_plm_base_component_t *best_component = NULL;
|
|
|
|
orte_plm_base_module_t *best_module = NULL;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2008-05-06 18:08:45 +00:00
|
|
|
/*
|
|
|
|
* Select the best component
|
2008-02-28 01:57:57 +00:00
|
|
|
*/
|
2015-09-24 07:16:48 -07:00
|
|
|
if (OPAL_SUCCESS == (rc = mca_base_select("plm", orte_plm_base_framework.framework_output,
|
|
|
|
&orte_plm_base_framework.framework_components,
|
|
|
|
(mca_base_module_t **) &best_module,
|
2015-10-19 10:39:35 -06:00
|
|
|
(mca_base_component_t **) &best_component, NULL))) {
|
2015-09-24 07:16:48 -07:00
|
|
|
/* Save the winner */
|
|
|
|
orte_plm = *best_module;
|
2005-03-31 23:25:24 +00:00
|
|
|
}
|
|
|
|
|
2015-09-24 07:16:48 -07:00
|
|
|
return rc;
|
2005-03-31 23:25:24 +00:00
|
|
|
}
|