1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2004-2008 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-2015 Los Alamos National Security, LLC. All rights
14 * reserved.
15 * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
16 * Copyright (c) 2010 Oracle and/or its affiliates. All rights
17 * reserved.
18 * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
19 * Copyright (c) 2011 IBM Corporation. All rights reserved.
20 * Copyright (c) 2014 Intel, Inc. All rights reserved.
21 * $COPYRIGHT$
22 *
23 * Additional copyrights may follow
24 *
25 * $HEADER$
26 *
27 * These symbols are in a file by themselves to provide nice linker
28 * semantics. Since linkers generally pull in symbols by object
29 * files, keeping these symbols as the only symbols in this file
30 * prevents utility programs such as "ompi_info" from having to import
31 * entire components just to query their version and parameters.
32 */
33
34 #include "orte_config.h"
35 #include "orte/constants.h"
36
37 #include <stdlib.h>
38 #ifdef HAVE_UNISTD_H
39 #include <unistd.h>
40 #endif
41 #include <ctype.h>
42
43 #include "orte/runtime/orte_globals.h"
44
45 #include "orte/mca/plm/plm.h"
46 #include "orte/mca/plm/isolated/plm_isolated.h"
47
48 /*
49 * Public string showing the plm ompi_isolated component version number
50 */
51 const char *mca_plm_isolated_component_version_string =
52 "Open MPI isolated plm MCA component version " ORTE_VERSION;
53
54
55 static int isolated_component_open(void);
56 static int isolated_component_query(mca_base_module_t **module, int *priority);
57 static int isolated_component_close(void);
58
59 /*
60 * Instantiate the public struct with all of our public information
61 * and pointers to our public functions in it
62 */
63
64 orte_plm_base_component_t mca_plm_isolated_component = {
65 .base_version = {
66 ORTE_PLM_BASE_VERSION_2_0_0,
67
68 /* Component name and version */
69 .mca_component_name = "isolated",
70 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
71 ORTE_RELEASE_VERSION),
72
73 /* Component open and close functions */
74 .mca_open_component = isolated_component_open,
75 .mca_close_component = isolated_component_close,
76 .mca_query_component = isolated_component_query,
77 },
78 .base_data = {
79 /* The component is checkpoint ready */
80 MCA_BASE_METADATA_PARAM_CHECKPOINT
81 },
82 };
83
84 static int isolated_component_open(void)
85 {
86 return ORTE_SUCCESS;
87 }
88
89
90 static int isolated_component_query(mca_base_module_t **module, int *priority)
91 {
92 /* make ourselves available at a very low priority */
93 if (ORTE_PROC_IS_HNP) {
94 *priority = 0;
95 *module = (mca_base_module_t *) &orte_plm_isolated_module;
96 return ORTE_SUCCESS;
97 }
98 *module = NULL;
99 return ORTE_ERROR;
100 }
101
102
103 static int isolated_component_close(void)
104 {
105 return ORTE_SUCCESS;
106 }
107