1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
4 * University Research and Technology
5 * Corporation. All rights reserved.
6 * Copyright (c) 2004-2006 The University of Tennessee and The University
7 * of Tennessee Research Foundation. All rights
8 * reserved.
9 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 * University of Stuttgart. All rights reserved.
11 * Copyright (c) 2004-2005 The Regents of the University of California.
12 * All rights reserved.
13 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
14 * Copyright (c) 2015 Los Alamos National Security, LLC. All rights
15 * reserved.
16 * $COPYRIGHT$
17 *
18 * Additional copyrights may follow
19 *
20 * $HEADER$
21 */
22
23 #include "orte_config.h"
24
25 #include "opal/mca/base/base.h"
26
27 #include "orte/util/proc_info.h"
28
29 #include "iof_orted.h"
30
31 /*
32 * Local functions
33 */
34 static int orte_iof_orted_open(void);
35 static int orte_iof_orted_close(void);
36 static int orte_iof_orted_query(mca_base_module_t **module, int *priority);
37
38
39 /*
40 * Public string showing the iof orted component version number
41 */
42 const char *mca_iof_orted_component_version_string =
43 "Open MPI orted iof MCA component version " ORTE_VERSION;
44
45
46 orte_iof_orted_component_t mca_iof_orted_component = {
47 {
48 .iof_version = {
49 ORTE_IOF_BASE_VERSION_2_0_0,
50
51 .mca_component_name = "orted",
52 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
53 ORTE_RELEASE_VERSION),
54
55 /* Component open, close, and query functions */
56 .mca_open_component = orte_iof_orted_open,
57 .mca_close_component = orte_iof_orted_close,
58 .mca_query_component = orte_iof_orted_query,
59 },
60 .iof_data = {
61 /* The component is checkpoint ready */
62 MCA_BASE_METADATA_PARAM_CHECKPOINT
63 },
64 }
65 };
66
67 /**
68 * component open/close/init function
69 */
70 static int orte_iof_orted_open(void)
71 {
72 /* Nothing to do */
73 return ORTE_SUCCESS;
74 }
75
76 static int orte_iof_orted_close(void)
77 {
78 return ORTE_SUCCESS;
79 }
80
81
82 static int orte_iof_orted_query(mca_base_module_t **module, int *priority)
83 {
84 /* if we are not a daemon, then don't use this module */
85 if (!ORTE_PROC_IS_DAEMON) {
86 *module = NULL;
87 *priority = -1;
88 return ORTE_ERROR;
89 }
90
91 *priority = 80;
92 *module = (mca_base_module_t *) &orte_iof_orted_module;
93
94 return ORTE_SUCCESS;
95 }
96