pmix: fix misc missing conversion and type issues
Этот коммит содержится в:
родитель
a548232c6b
Коммит
2ede47c462
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -161,6 +163,7 @@ OPAL_MODULE_DECLSPEC int pmix1_server_notify_error(int status,
|
||||
/**** COMPONENT UTILITY FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC pmix_status_t pmix1_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int pmix1_convert_rc(pmix_status_t rc);
|
||||
OPAL_MODULE_DECLSPEC pmix_scope_t pmix1_convert_opalscope(opal_pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC void pmix1_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv);
|
||||
OPAL_MODULE_DECLSPEC int pmix1_value_unload(opal_value_t *kv,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
@ -156,13 +156,10 @@ int pmix1_client_finalize(void)
|
||||
|
||||
int pmix1_initialized(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
"PMIx_client initialized");
|
||||
|
||||
rc = PMIx_Initialized();
|
||||
return pmix1_convert_rc(rc);
|
||||
return PMIx_Initialized();
|
||||
}
|
||||
|
||||
int pmix1_abort(int flag, const char *msg,
|
||||
@ -391,10 +388,11 @@ int pmix1_fencenb(opal_list_t *procs, int collect_data,
|
||||
|
||||
}
|
||||
|
||||
int pmix1_put(opal_pmix_scope_t scope,
|
||||
int pmix1_put(opal_pmix_scope_t opal_scope,
|
||||
opal_value_t *val)
|
||||
{
|
||||
pmix_value_t kv;
|
||||
pmix_scope_t pmix_scope = pmix1_convert_opalscope(opal_scope);
|
||||
pmix_status_t rc;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
@ -403,7 +401,7 @@ int pmix1_put(opal_pmix_scope_t scope,
|
||||
PMIX_VALUE_CONSTRUCT(&kv);
|
||||
pmix1_value_load(&kv, val);
|
||||
|
||||
rc = PMIx_Put(scope, val->key, &kv);
|
||||
rc = PMIx_Put(pmix_scope, val->key, &kv);
|
||||
PMIX_VALUE_DESTRUCT(&kv);
|
||||
return pmix1_convert_rc(rc);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
#include "pmix1.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "opal/mca/pmix/pmix_types.h"
|
||||
|
||||
#include "opal/mca/pmix/pmix112/pmix/include/pmix/pmix_common.h"
|
||||
|
||||
@ -269,6 +270,19 @@ int pmix1_convert_rc(pmix_status_t rc)
|
||||
}
|
||||
}
|
||||
|
||||
pmix_scope_t pmix1_convert_opalscope(opal_pmix_scope_t scope) {
|
||||
switch(scope) {
|
||||
case OPAL_PMIX_LOCAL:
|
||||
return PMIX_LOCAL;
|
||||
case OPAL_PMIX_REMOTE:
|
||||
return PMIX_REMOTE;
|
||||
case OPAL_PMIX_GLOBAL:
|
||||
return PMIX_GLOBAL;
|
||||
default:
|
||||
return PMIX_SCOPE_UNDEF;
|
||||
}
|
||||
}
|
||||
|
||||
void pmix1_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv)
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -174,6 +176,7 @@ OPAL_MODULE_DECLSPEC int pmix120_server_notify_error(int status,
|
||||
/**** COMPONENT UTILITY FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC pmix_status_t pmix120_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int pmix120_convert_rc(pmix_status_t rc);
|
||||
OPAL_MODULE_DECLSPEC pmix_scope_t pmix120_convert_opalscope(opal_pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC void pmix120_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv);
|
||||
OPAL_MODULE_DECLSPEC int pmix120_value_unload(opal_value_t *kv,
|
||||
|
@ -95,13 +95,10 @@ int pmix120_client_finalize(void)
|
||||
|
||||
int pmix120_initialized(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
"PMIx_client initialized");
|
||||
|
||||
rc = PMIx_Initialized();
|
||||
return pmix120_convert_rc(rc);
|
||||
return PMIx_Initialized();
|
||||
}
|
||||
|
||||
int pmix120_abort(int flag, const char *msg,
|
||||
@ -333,10 +330,11 @@ int pmix120_fencenb(opal_list_t *procs, int collect_data,
|
||||
|
||||
}
|
||||
|
||||
int pmix120_put(opal_pmix_scope_t scope,
|
||||
int pmix120_put(opal_pmix_scope_t opal_scope,
|
||||
opal_value_t *val)
|
||||
{
|
||||
pmix_value_t kv;
|
||||
pmix_scope_t pmix_scope = pmix120_convert_opalscope(opal_scope);
|
||||
pmix_status_t rc;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
@ -345,7 +343,7 @@ int pmix120_put(opal_pmix_scope_t scope,
|
||||
PMIX_VALUE_CONSTRUCT(&kv);
|
||||
pmix120_value_load(&kv, val);
|
||||
|
||||
rc = PMIx_Put(scope, val->key, &kv);
|
||||
rc = PMIx_Put(pmix_scope, val->key, &kv);
|
||||
PMIX_VALUE_DESTRUCT(&kv);
|
||||
return pmix120_convert_rc(rc);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
@ -466,6 +466,20 @@ int pmix120_convert_rc(pmix_status_t rc)
|
||||
}
|
||||
}
|
||||
|
||||
pmix_scope_t pmix120_convert_opalscope(opal_pmix_scope_t scope) {
|
||||
switch(scope) {
|
||||
case OPAL_PMIX_LOCAL:
|
||||
return PMIX_LOCAL;
|
||||
case OPAL_PMIX_REMOTE:
|
||||
return PMIX_REMOTE;
|
||||
case OPAL_PMIX_GLOBAL:
|
||||
return PMIX_GLOBAL;
|
||||
default:
|
||||
return PMIX_SCOPE_UNDEF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pmix120_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -121,13 +121,13 @@ int pmix_server_publish_fn(opal_process_name_t *proc,
|
||||
pset = false;
|
||||
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
|
||||
if (0 == strcmp(iptr->key, OPAL_PMIX_RANGE)) {
|
||||
range = iptr->data.integer;
|
||||
range = (opal_pmix_data_range_t)iptr->data.integer;
|
||||
if (pset) {
|
||||
break;
|
||||
}
|
||||
rset = true;
|
||||
} else if (0 == strcmp(iptr->key, OPAL_PMIX_PERSISTENCE)) {
|
||||
persist = iptr->data.integer;
|
||||
persist = (opal_pmix_persistence_t)iptr->data.integer;
|
||||
if (rset) {
|
||||
break;
|
||||
}
|
||||
@ -214,7 +214,7 @@ int pmix_server_lookup_fn(opal_process_name_t *proc, char **keys,
|
||||
/* no help for it - need to search for range */
|
||||
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
|
||||
if (0 == strcmp(iptr->key, OPAL_PMIX_RANGE)) {
|
||||
range = iptr->data.integer;
|
||||
range = (opal_pmix_data_range_t)iptr->data.integer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -304,7 +304,7 @@ int pmix_server_unpublish_fn(opal_process_name_t *proc, char **keys,
|
||||
/* no help for it - need to search for range */
|
||||
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
|
||||
if (0 == strcmp(iptr->key, OPAL_PMIX_RANGE)) {
|
||||
range = iptr->data.integer;
|
||||
range = (opal_pmix_data_range_t)iptr->data.integer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user