pmix/external: fix misc missing conversion and type issues
Этот коммит содержится в:
родитель
2ede47c462
Коммит
6f450630d8
16
opal/mca/pmix/external/pmix_ext.c
поставляемый
16
opal/mca/pmix/external/pmix_ext.c
поставляемый
@ -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-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
#include "pmix_ext.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "opal/mca/pmix/pmix_types.h"
|
||||
|
||||
#include "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)
|
||||
{
|
||||
|
3
opal/mca/pmix/external/pmix_ext.h
поставляемый
3
opal/mca/pmix/external/pmix_ext.h
поставляемый
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -163,6 +165,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,
|
||||
|
12
opal/mca/pmix/external/pmix_ext_client.c
поставляемый
12
opal/mca/pmix/external/pmix_ext_client.c
поставляемый
@ -1,7 +1,7 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2016 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-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
@ -161,13 +161,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,
|
||||
@ -396,10 +393,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,
|
||||
@ -408,7 +406,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);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user