2015-10-19 10:39:35 -06:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2007-03-16 23:11:45 +00:00
|
|
|
/*
|
2008-05-06 18:08:45 +00:00
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University.
|
2007-03-16 23:11:45 +00:00
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2007-03-16 23:11:45 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2015-10-19 10:39:35 -06:00
|
|
|
* Copyright (c) 2012-2015 Los Alamos National Security, LLC.
|
2012-08-23 13:52:06 +00:00
|
|
|
* All rights reserved
|
2007-03-16 23:11:45 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2007-03-16 23:11:45 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2007-03-16 23:11:45 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2009-03-13 02:10:32 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2008-02-28 01:57:57 +00:00
|
|
|
#include "orte/constants.h"
|
2007-03-16 23:11:45 +00:00
|
|
|
|
2015-03-05 20:50:44 -07:00
|
|
|
#include "orte/mca/mca.h"
|
2009-02-14 02:26:12 +00:00
|
|
|
#include "opal/util/output.h"
|
2007-03-16 23:11:45 +00:00
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
|
|
|
|
#include "orte/mca/filem/filem.h"
|
|
|
|
#include "orte/mca/filem/base/base.h"
|
|
|
|
|
|
|
|
|
|
|
|
int orte_filem_base_select(void)
|
|
|
|
{
|
2012-08-23 13:52:06 +00:00
|
|
|
int exit_status = ORTE_SUCCESS;
|
2008-05-06 18:08:45 +00:00
|
|
|
orte_filem_base_component_t *best_component = NULL;
|
|
|
|
orte_filem_base_module_t *best_module = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Select the best component
|
2007-03-16 23:11:45 +00:00
|
|
|
*/
|
2013-03-27 21:14:43 +00:00
|
|
|
if( OPAL_SUCCESS != mca_base_select("filem", orte_filem_base_framework.framework_output,
|
|
|
|
&orte_filem_base_framework.framework_components,
|
2008-06-06 14:38:41 +00:00
|
|
|
(mca_base_module_t **) &best_module,
|
2015-10-19 10:39:35 -06:00
|
|
|
(mca_base_component_t **) &best_component, NULL) ) {
|
2012-08-23 13:52:06 +00:00
|
|
|
/* It is okay to not select anything - we'll just retain
|
|
|
|
* the default none module
|
|
|
|
*/
|
|
|
|
return ORTE_SUCCESS;
|
2007-03-16 23:11:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Save the winner */
|
|
|
|
orte_filem = *best_module;
|
|
|
|
|
|
|
|
/* Initialize the winner */
|
2012-08-23 13:52:06 +00:00
|
|
|
if (NULL != orte_filem.filem_init) {
|
|
|
|
if (ORTE_SUCCESS != orte_filem.filem_init()) {
|
|
|
|
exit_status = ORTE_ERROR;
|
2007-03-16 23:11:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-05-06 18:08:45 +00:00
|
|
|
return exit_status;
|
2007-03-16 23:11:45 +00:00
|
|
|
}
|