2014-05-15 15:59:41 +00:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2014-04-29 21:49:23 +00:00
|
|
|
/*
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
2014-04-29 21:49:23 +00:00
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2014-05-15 15:59:41 +00:00
|
|
|
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
2014-11-11 17:00:42 -08:00
|
|
|
* reserved.
|
2015-06-18 09:53:20 -07:00
|
|
|
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
2014-11-11 17:00:42 -08:00
|
|
|
* Copyright (c) 2014 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2014-05-15 15:59:41 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2014-04-29 21:49:23 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2014-04-29 21:49:23 +00:00
|
|
|
* $HEADER$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "opal_config.h"
|
|
|
|
#include "opal/constants.h"
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "opal_stdint.h"
|
|
|
|
#include "opal/class/opal_hash_table.h"
|
|
|
|
#include "opal/class/opal_pointer_array.h"
|
|
|
|
#include "opal/dss/dss_types.h"
|
|
|
|
#include "opal/util/error.h"
|
|
|
|
#include "opal/util/output.h"
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
#include "opal/util/proc.h"
|
2014-04-29 21:49:23 +00:00
|
|
|
#include "opal/util/show_help.h"
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
#include "opal/mca/pmix/base/base.h"
|
|
|
|
#include "opal/mca/pmix/base/pmix_base_hash.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Data for a particular opal process
|
|
|
|
* The name association is maintained in the
|
|
|
|
* proc_data hash table.
|
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
/** Structure can be put on lists (including in hash tables) */
|
|
|
|
opal_list_item_t super;
|
|
|
|
bool loaded;
|
|
|
|
/* List of opal_value_t structures containing all data
|
|
|
|
received from this process, sorted by key. */
|
|
|
|
opal_list_t data;
|
|
|
|
} opal_pmix_proc_data_t;
|
|
|
|
static void proc_data_construct(opal_pmix_proc_data_t *ptr)
|
|
|
|
{
|
|
|
|
ptr->loaded = false;
|
|
|
|
OBJ_CONSTRUCT(&ptr->data, opal_list_t);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void proc_data_destruct(opal_pmix_proc_data_t *ptr)
|
|
|
|
{
|
|
|
|
OPAL_LIST_DESTRUCT(&ptr->data);
|
|
|
|
}
|
|
|
|
OBJ_CLASS_INSTANCE(opal_pmix_proc_data_t,
|
|
|
|
opal_list_item_t,
|
|
|
|
proc_data_construct,
|
|
|
|
proc_data_destruct);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find data for a given key in a given proc_data_t
|
|
|
|
* container.
|
|
|
|
*/
|
|
|
|
static opal_value_t* lookup_keyval(opal_pmix_proc_data_t *proc_data,
|
|
|
|
const char *key)
|
|
|
|
{
|
|
|
|
opal_value_t *kv;
|
|
|
|
|
|
|
|
OPAL_LIST_FOREACH(kv, &proc_data->data, opal_value_t) {
|
|
|
|
if (0 == strcmp(key, kv->key)) {
|
|
|
|
return kv;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find proc_data_t container associated with given
|
|
|
|
* opal_process_name_t.
|
|
|
|
*/
|
|
|
|
static opal_pmix_proc_data_t* lookup_proc(opal_proc_table_t *ptable,
|
|
|
|
opal_process_name_t id, bool create)
|
|
|
|
{
|
|
|
|
opal_pmix_proc_data_t *proc_data = NULL;
|
|
|
|
|
|
|
|
opal_proc_table_get_value(ptable, id, (void**)&proc_data);
|
|
|
|
if (NULL == proc_data && create) {
|
|
|
|
proc_data = OBJ_NEW(opal_pmix_proc_data_t);
|
|
|
|
if (NULL == proc_data) {
|
|
|
|
opal_output(0, "pmix:hash:lookup_proc: unable to allocate proc_data_t\n");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
opal_proc_table_set_value(ptable, id, proc_data);
|
2014-04-29 21:49:23 +00:00
|
|
|
}
|
2015-06-18 09:53:20 -07:00
|
|
|
|
|
|
|
return proc_data;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static opal_proc_table_t ptable;
|
2014-04-29 21:49:23 +00:00
|
|
|
|
|
|
|
/* Initialize our hash table */
|
2015-06-18 09:53:20 -07:00
|
|
|
void opal_pmix_base_hash_init(void)
|
2014-04-29 21:49:23 +00:00
|
|
|
{
|
2015-06-18 09:53:20 -07:00
|
|
|
OBJ_CONSTRUCT(&ptable, opal_proc_table_t);
|
|
|
|
opal_proc_table_init(&ptable, 16, 256);
|
2014-04-29 21:49:23 +00:00
|
|
|
}
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
void opal_pmix_base_hash_finalize(void)
|
2014-04-29 21:49:23 +00:00
|
|
|
{
|
2015-06-18 09:53:20 -07:00
|
|
|
opal_pmix_proc_data_t *proc_data;
|
2014-11-11 17:00:42 -08:00
|
|
|
opal_process_name_t key;
|
|
|
|
void *node1, *node2;
|
2014-04-29 21:49:23 +00:00
|
|
|
|
|
|
|
/* to assist in getting a clean valgrind, cycle thru the hash table
|
|
|
|
* and release all data stored in it
|
|
|
|
*/
|
2015-06-18 09:53:20 -07:00
|
|
|
if (OPAL_SUCCESS == opal_proc_table_get_first_key(&ptable, &key,
|
2014-11-11 17:00:42 -08:00
|
|
|
(void**)&proc_data,
|
|
|
|
&node1, &node2)) {
|
2014-04-29 21:49:23 +00:00
|
|
|
if (NULL != proc_data) {
|
|
|
|
OBJ_RELEASE(proc_data);
|
|
|
|
}
|
2015-06-18 09:53:20 -07:00
|
|
|
while (OPAL_SUCCESS == opal_proc_table_get_next_key(&ptable, &key,
|
2014-11-11 17:00:42 -08:00
|
|
|
(void**)&proc_data,
|
|
|
|
node1, &node1,
|
|
|
|
node2, &node2)) {
|
2014-04-29 21:49:23 +00:00
|
|
|
if (NULL != proc_data) {
|
|
|
|
OBJ_RELEASE(proc_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-06-18 09:53:20 -07:00
|
|
|
OBJ_DESTRUCT(&ptable);
|
2014-04-29 21:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
int opal_pmix_base_store(const opal_process_name_t *id,
|
|
|
|
opal_value_t *val)
|
2014-04-29 21:49:23 +00:00
|
|
|
{
|
2015-06-18 09:53:20 -07:00
|
|
|
opal_pmix_proc_data_t *proc_data;
|
2014-04-29 21:49:23 +00:00
|
|
|
opal_value_t *kv;
|
|
|
|
int rc;
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix:hash:store storing data for proc %s",
|
2014-11-11 17:00:42 -08:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(*id));
|
2014-04-29 21:49:23 +00:00
|
|
|
|
|
|
|
/* lookup the proc data object for this proc */
|
2015-06-18 09:53:20 -07:00
|
|
|
if (NULL == (proc_data = lookup_proc(&ptable, *id, true))) {
|
2014-04-29 21:49:23 +00:00
|
|
|
/* unrecoverable error */
|
2015-06-18 09:53:20 -07:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix:hash:store: storing data for proc %s unrecoverably failed",
|
2014-11-11 17:00:42 -08:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(*id)));
|
2014-04-29 21:49:23 +00:00
|
|
|
return OPAL_ERR_OUT_OF_RESOURCE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* see if we already have this key in the data - means we are updating
|
|
|
|
* a pre-existing value
|
|
|
|
*/
|
2015-06-18 09:53:20 -07:00
|
|
|
kv = lookup_keyval(proc_data, val->key);
|
2014-05-15 15:59:41 +00:00
|
|
|
#if OPAL_ENABLE_DEBUG
|
|
|
|
char *_data_type = opal_dss.lookup_data_type(val->type);
|
2015-06-18 09:53:20 -07:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix:hash:store: %s key %s[%s] for proc %s",
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
2014-04-29 21:49:23 +00:00
|
|
|
(NULL == kv ? "storing" : "updating"),
|
2014-11-11 17:00:42 -08:00
|
|
|
val->key, _data_type, OPAL_NAME_PRINT(*id)));
|
2014-05-15 15:59:41 +00:00
|
|
|
free (_data_type);
|
|
|
|
#endif
|
|
|
|
|
2014-04-29 21:49:23 +00:00
|
|
|
if (NULL != kv) {
|
|
|
|
opal_list_remove_item(&proc_data->data, &kv->super);
|
|
|
|
OBJ_RELEASE(kv);
|
|
|
|
}
|
|
|
|
/* create the copy */
|
|
|
|
if (OPAL_SUCCESS != (rc = opal_dss.copy((void**)&kv, val, OPAL_VALUE))) {
|
|
|
|
OPAL_ERROR_LOG(rc);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
opal_list_append(&proc_data->data, &kv->super);
|
|
|
|
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
int opal_pmix_base_fetch(const opal_process_name_t *id,
|
|
|
|
const char *key, opal_list_t *kvs)
|
2014-04-29 21:49:23 +00:00
|
|
|
{
|
2015-06-18 09:53:20 -07:00
|
|
|
opal_pmix_proc_data_t *proc_data;
|
2014-04-29 21:49:23 +00:00
|
|
|
opal_value_t *kv, *knew;
|
|
|
|
int rc;
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix:hash:fetch: searching for key %s on proc %s",
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
2014-11-11 17:00:42 -08:00
|
|
|
(NULL == key) ? "NULL" : key, OPAL_NAME_PRINT(*id)));
|
2014-04-29 21:49:23 +00:00
|
|
|
|
|
|
|
/* lookup the proc data object for this proc */
|
2015-06-18 09:53:20 -07:00
|
|
|
if (NULL == (proc_data = lookup_proc(&ptable, *id, true))) {
|
|
|
|
OPAL_OUTPUT_VERBOSE((5, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix_hash:fetch data for proc %s not found",
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
2014-11-11 17:00:42 -08:00
|
|
|
OPAL_NAME_PRINT(*id)));
|
2014-04-29 21:49:23 +00:00
|
|
|
return OPAL_ERR_NOT_FOUND;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if the key is NULL, that we want everything */
|
|
|
|
if (NULL == key) {
|
2015-05-06 08:20:19 -07:00
|
|
|
/* must provide an output list or this makes no sense */
|
|
|
|
if (NULL == kvs) {
|
|
|
|
OPAL_ERROR_LOG(OPAL_ERR_BAD_PARAM);
|
|
|
|
return OPAL_ERR_BAD_PARAM;
|
|
|
|
}
|
2014-04-29 21:49:23 +00:00
|
|
|
OPAL_LIST_FOREACH(kv, &proc_data->data, opal_value_t) {
|
|
|
|
/* copy the value */
|
|
|
|
if (OPAL_SUCCESS != (rc = opal_dss.copy((void**)&knew, kv, OPAL_VALUE))) {
|
|
|
|
OPAL_ERROR_LOG(rc);
|
|
|
|
return rc;
|
|
|
|
}
|
2015-06-18 09:53:20 -07:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix:hash:fetch: adding data for key %s on proc %s",
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
|
|
|
(NULL == kv->key) ? "NULL" : kv->key,
|
2014-11-11 17:00:42 -08:00
|
|
|
OPAL_NAME_PRINT(*id)));
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
|
2014-04-29 21:49:23 +00:00
|
|
|
/* add it to the output list */
|
|
|
|
opal_list_append(kvs, &knew->super);
|
|
|
|
}
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* find the value */
|
2015-06-18 09:53:20 -07:00
|
|
|
if (NULL == (kv = lookup_keyval(proc_data, key))) {
|
|
|
|
OPAL_OUTPUT_VERBOSE((5, opal_pmix_base_framework.framework_output,
|
2015-09-08 18:37:09 -07:00
|
|
|
"%s pmix_hash:fetch key %s for proc %s not found",
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
|
|
|
(NULL == key) ? "NULL" : key,
|
2014-11-11 17:00:42 -08:00
|
|
|
OPAL_NAME_PRINT(*id)));
|
2014-04-29 21:49:23 +00:00
|
|
|
return OPAL_ERR_NOT_FOUND;
|
|
|
|
}
|
|
|
|
|
2015-05-06 08:20:19 -07:00
|
|
|
/* if the user provided a NULL list object, then they
|
|
|
|
* just wanted to know if the key was present */
|
|
|
|
if (NULL == kvs) {
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
2015-06-23 20:59:57 -07:00
|
|
|
|
2014-04-29 21:49:23 +00:00
|
|
|
/* create the copy */
|
|
|
|
if (OPAL_SUCCESS != (rc = opal_dss.copy((void**)&knew, kv, OPAL_VALUE))) {
|
|
|
|
OPAL_ERROR_LOG(rc);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
/* add it to the output list */
|
|
|
|
opal_list_append(kvs, &knew->super);
|
|
|
|
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-06-18 09:53:20 -07:00
|
|
|
int opal_pmix_base_remove(const opal_process_name_t *id, const char *key)
|
2014-04-29 21:49:23 +00:00
|
|
|
{
|
2015-06-18 09:53:20 -07:00
|
|
|
opal_pmix_proc_data_t *proc_data;
|
2014-04-29 21:49:23 +00:00
|
|
|
opal_value_t *kv;
|
|
|
|
|
|
|
|
/* lookup the specified proc */
|
2015-06-18 09:53:20 -07:00
|
|
|
if (NULL == (proc_data = lookup_proc(&ptable, *id, false))) {
|
2014-04-29 21:49:23 +00:00
|
|
|
/* no data for this proc */
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if key is NULL, remove all data for this proc */
|
|
|
|
if (NULL == key) {
|
|
|
|
while (NULL != (kv = (opal_value_t *) opal_list_remove_first(&proc_data->data))) {
|
|
|
|
OBJ_RELEASE(kv);
|
|
|
|
}
|
|
|
|
/* remove the proc_data object itself from the jtable */
|
2015-06-18 09:53:20 -07:00
|
|
|
opal_proc_table_remove_value(&ptable, *id);
|
2014-04-29 21:49:23 +00:00
|
|
|
/* cleanup */
|
|
|
|
OBJ_RELEASE(proc_data);
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* remove this item */
|
|
|
|
OPAL_LIST_FOREACH(kv, &proc_data->data, opal_value_t) {
|
|
|
|
if (0 == strcmp(key, kv->key)) {
|
|
|
|
opal_list_remove_item(&proc_data->data, &kv->super);
|
|
|
|
OBJ_RELEASE(kv);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
|
|
|
|