This source file includes following definitions.
- plm_lsf_open
- plm_lsf_close
- orte_plm_lsf_component_query
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 #include "orte_config.h"
32 #include "orte/constants.h"
33
34 #include <lsf/lsbatch.h>
35
36 #include "opal/util/output.h"
37
38
39 #include "orte/mca/plm/plm.h"
40 #include "orte/mca/plm/base/base.h"
41 #include "orte/mca/plm/base/plm_private.h"
42 #include "plm_lsf.h"
43
44
45
46
47
48 const char *mca_plm_lsf_component_version_string =
49 "Open MPI lsf plm MCA component version " ORTE_VERSION;
50
51
52
53
54
55
56 static int plm_lsf_open(void);
57 static int plm_lsf_close(void);
58 static int orte_plm_lsf_component_query(mca_base_module_t **module, int *priority);
59
60
61
62
63
64
65
66 orte_plm_lsf_component_t mca_plm_lsf_component = {
67 {
68
69
70
71 .base_version = {
72 ORTE_PLM_BASE_VERSION_2_0_0,
73
74
75 .mca_component_name = "lsf",
76 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
77 ORTE_RELEASE_VERSION),
78
79
80 .mca_open_component = plm_lsf_open,
81 .mca_close_component = plm_lsf_close,
82 .mca_query_component = orte_plm_lsf_component_query,
83 },
84 .base_data = {
85
86 MCA_BASE_METADATA_PARAM_CHECKPOINT
87 },
88 }
89 };
90
91
92 static int plm_lsf_open(void)
93 {
94 return ORTE_SUCCESS;
95 }
96
97
98 static int plm_lsf_close(void)
99 {
100 return ORTE_SUCCESS;
101 }
102
103
104 static int orte_plm_lsf_component_query(mca_base_module_t **module, int *priority)
105 {
106
107
108 if (NULL == getenv("LSB_JOBID") || getenv("CSM_ALLOCATION_ID") || lsb_init("ORTE launcher") < 0) {
109
110 opal_output_verbose(10, orte_plm_base_framework.framework_output,
111 "plm:lsf: NOT available for selection");
112 *module = NULL;
113 return ORTE_ERROR;
114 }
115
116 *priority = 75;
117 *module = (mca_base_module_t *) &orte_plm_lsf_module;
118 return ORTE_SUCCESS;
119 }