Skip to content

Commit 6f45063

Browse files
committed
pmix/external: fix misc missing conversion and type issues
1 parent 2ede47c commit 6f45063

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

opal/mca/pmix/external/pmix_ext.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
4-
* Copyright (c) 2014-2015 Research Organization for Information Science
4+
* Copyright (c) 2014-2016 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
77
* All rights reserved.
@@ -36,6 +36,7 @@
3636

3737
#include "pmix_ext.h"
3838
#include "opal/mca/pmix/base/base.h"
39+
#include "opal/mca/pmix/pmix_types.h"
3940

4041
#include "pmix_common.h"
4142

@@ -269,6 +270,19 @@ int pmix1_convert_rc(pmix_status_t rc)
269270
}
270271
}
271272

273+
pmix_scope_t pmix1_convert_opalscope(opal_pmix_scope_t scope) {
274+
switch(scope) {
275+
case OPAL_PMIX_LOCAL:
276+
return PMIX_LOCAL;
277+
case OPAL_PMIX_REMOTE:
278+
return PMIX_REMOTE;
279+
case OPAL_PMIX_GLOBAL:
280+
return PMIX_GLOBAL;
281+
default:
282+
return PMIX_SCOPE_UNDEF;
283+
}
284+
}
285+
272286
void pmix1_value_load(pmix_value_t *v,
273287
opal_value_t *kv)
274288
{

opal/mca/pmix/external/pmix_ext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
33
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
44
* All rights reserved.
5+
* Copyright (c) 2016 Research Organization for Information Science
6+
* and Technology (RIST). All rights reserved.
57
* $COPYRIGHT$
68
*
79
* Additional copyrights may follow
@@ -163,6 +165,7 @@ OPAL_MODULE_DECLSPEC int pmix1_server_notify_error(int status,
163165
/**** COMPONENT UTILITY FUNCTIONS ****/
164166
OPAL_MODULE_DECLSPEC pmix_status_t pmix1_convert_opalrc(int rc);
165167
OPAL_MODULE_DECLSPEC int pmix1_convert_rc(pmix_status_t rc);
168+
OPAL_MODULE_DECLSPEC pmix_scope_t pmix1_convert_opalscope(opal_pmix_scope_t scope);
166169
OPAL_MODULE_DECLSPEC void pmix1_value_load(pmix_value_t *v,
167170
opal_value_t *kv);
168171
OPAL_MODULE_DECLSPEC int pmix1_value_unload(opal_value_t *kv,

opal/mca/pmix/external/pmix_ext_client.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
4-
* Copyright (c) 2014-2015 Research Organization for Information Science
4+
* Copyright (c) 2014-2016 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
77
* All rights reserved.
@@ -161,13 +161,10 @@ int pmix1_client_finalize(void)
161161

162162
int pmix1_initialized(void)
163163
{
164-
pmix_status_t rc;
165-
166164
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
167165
"PMIx_client initialized");
168166

169-
rc = PMIx_Initialized();
170-
return pmix1_convert_rc(rc);
167+
return PMIx_Initialized();
171168
}
172169

173170
int pmix1_abort(int flag, const char *msg,
@@ -396,10 +393,11 @@ int pmix1_fencenb(opal_list_t *procs, int collect_data,
396393

397394
}
398395

399-
int pmix1_put(opal_pmix_scope_t scope,
396+
int pmix1_put(opal_pmix_scope_t opal_scope,
400397
opal_value_t *val)
401398
{
402399
pmix_value_t kv;
400+
pmix_scope_t pmix_scope = pmix1_convert_opalscope(opal_scope);
403401
pmix_status_t rc;
404402

405403
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
@@ -408,7 +406,7 @@ int pmix1_put(opal_pmix_scope_t scope,
408406
PMIX_VALUE_CONSTRUCT(&kv);
409407
pmix1_value_load(&kv, val);
410408

411-
rc = PMIx_Put(scope, val->key, &kv);
409+
rc = PMIx_Put(pmix_scope, val->key, &kv);
412410
PMIX_VALUE_DESTRUCT(&kv);
413411
return pmix1_convert_rc(rc);
414412
}

0 commit comments

Comments
 (0)