11/*
2- * Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
2+ * Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
33 * Copyright (c) 2014-2017 Research Organization for Information Science
44 * and Technology (RIST). All rights reserved.
55 * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
2121#include "opal/constants.h"
2222#include "opal/class/opal_list.h"
2323#include "opal/util/proc.h"
24+ #include "opal/util/show_help.h"
2425#include "opal/mca/pmix/pmix.h"
2526#include "pmix1x.h"
2627
@@ -45,39 +46,48 @@ static int external_component_query(mca_base_module_t **module, int *priority);
4546
4647mca_pmix_ext1x_component_t mca_pmix_ext1x_component = {
4748 {
48- /* First, the mca_component_t struct containing meta information
49- about the component itself */
49+ /* First, the mca_component_t struct containing meta information
50+ * about the component itself */
5051
51- .base_version = {
52- /* Indicate that we are a pmix v1.1.0 component (which also
53- implies a specific MCA version) */
52+ .base_version = {
53+ /* Indicate that we are a pmix v1.1.0 component (which also
54+ * implies a specific MCA version) */
5455
55- OPAL_PMIX_BASE_VERSION_2_0_0 ,
56+ OPAL_PMIX_BASE_VERSION_2_0_0 ,
5657
57- /* Component name and version */
58+ /* Component name and version */
5859
59- .mca_component_name = "ext1x" ,
60- MCA_BASE_MAKE_VERSION (component , OPAL_MAJOR_VERSION , OPAL_MINOR_VERSION ,
61- OPAL_RELEASE_VERSION ),
60+ .mca_component_name = "ext1x" ,
61+ MCA_BASE_MAKE_VERSION (component , OPAL_MAJOR_VERSION , OPAL_MINOR_VERSION ,
62+ OPAL_RELEASE_VERSION ),
6263
63- /* Component open and close functions */
64+ /* Component open and close functions */
6465
65- .mca_open_component = external_open ,
66- .mca_close_component = external_close ,
67- .mca_query_component = external_component_query ,
68- },
69- /* Next the MCA v1.0.0 component meta data */
70- .base_data = {
71- /* The component is checkpoint ready */
72- MCA_BASE_METADATA_PARAM_CHECKPOINT
73- }
66+ .mca_open_component = external_open ,
67+ .mca_close_component = external_close ,
68+ .mca_query_component = external_component_query ,
69+ },
70+ /* Next the MCA v1.0.0 component meta data */
71+ .base_data = {
72+ /* The component is checkpoint ready */
73+ MCA_BASE_METADATA_PARAM_CHECKPOINT
74+ }
7475 },
7576 .native_launch = false
7677};
7778
7879static int external_open (void )
7980{
81+ const char * version ;
82+
8083 OBJ_CONSTRUCT (& mca_pmix_ext1x_component .jobids , opal_list_t );
84+
85+ version = PMIx_Get_version ();
86+ if (0 != strncmp (version , "1.2" , 3 )) {
87+ opal_show_help ("help-pmix-base.txt" ,
88+ "old-pmix" , true, version , "v1.2" );
89+ return OPAL_ERROR ;
90+ }
8191 return OPAL_SUCCESS ;
8292}
8393
@@ -94,12 +104,12 @@ static int external_component_query(mca_base_module_t **module, int *priority)
94104
95105 /* see if a PMIx server is present */
96106 if (NULL != (t = getenv ("PMIX_SERVER_URI" )) ||
97- NULL != (id = getenv ("PMIX_ID" ))) {
98- /* if PMIx is present, then we are a client and need to use it */
99- * priority = 100 ;
107+ NULL != (id = getenv ("PMIX_ID" ))) {
108+ /* if PMIx is present, then we are a client and need to use it */
109+ * priority = 100 ;
100110 } else {
101- /* we could be a server, so we still need to be considered */
102- * priority = 5 ;
111+ /* we could be a server, so we still need to be considered */
112+ * priority = 5 ;
103113 }
104114 * module = (mca_base_module_t * )& opal_pmix_ext1x_module ;
105115 return OPAL_SUCCESS ;
0 commit comments