1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3  * Copyright (c) 2016      Intel, Inc.  All rights reserved.
4  * $COPYRIGHT$
5  *
6  * Additional copyrights may follow
7  *
8  * $HEADER$
9  */
10 
11 #include "orte_config.h"
12 #include "orte/types.h"
13 #include "opal/types.h"
14 
15 #include "opal/util/show_help.h"
16 
17 #include "orte/mca/schizo/schizo.h"
18 #include "schizo_alps.h"
19 
20 static int component_query(mca_base_module_t **module, int *priority);
21 
22 /*
23  * Struct of function pointers and all that to let us be initialized
24  */
25 orte_schizo_base_component_t mca_schizo_alps_component = {
26     .base_version = {
27         MCA_SCHIZO_BASE_VERSION_1_0_0,
28         .mca_component_name = "alps",
29         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
30                               ORTE_RELEASE_VERSION),
31         .mca_query_component = component_query,
32     },
33     .base_data = {
34         /* The component is checkpoint ready */
35         MCA_BASE_METADATA_PARAM_CHECKPOINT
36     },
37 };
38 
component_query(mca_base_module_t ** module,int * priority)39 static int component_query(mca_base_module_t **module, int *priority)
40 {
41     /* if we are not an app, then don't bother */
42     if (!ORTE_PROC_IS_APP) {
43         *priority = 0;
44         *module = NULL;
45         return ORTE_ERROR;
46     }
47 
48     /* since we were built, assume we are on an alps system */
49     *priority = 90;
50     *module = (mca_base_module_t *)&orte_schizo_alps_module;
51     return ORTE_SUCCESS;
52 }
53 
54