aec5cd08bd
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.
134 строки
3.7 KiB
C
134 строки
3.7 KiB
C
/*
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
* University Research and Technology
|
|
* Corporation. All rights reserved.
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
* of Tennessee Research Foundation. All rights
|
|
* reserved.
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
* University of Stuttgart. All rights reserved.
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
|
* All rights reserved.
|
|
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
|
|
#include "orte_config.h"
|
|
#include "orte/constants.h"
|
|
|
|
#include "opal/mca/mca.h"
|
|
#include "opal/util/output.h"
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "orte/mca/rml/rml.h"
|
|
#include "orte/mca/state/state.h"
|
|
|
|
#include "orte/mca/grpcomm/base/base.h"
|
|
|
|
|
|
/*
|
|
* The following file was created by configure. It contains extern
|
|
* statements and the definition of an array of pointers to each
|
|
* component's public mca_base_component_t struct.
|
|
*/
|
|
|
|
#include "orte/mca/grpcomm/base/static-components.h"
|
|
|
|
/*
|
|
* Global variables
|
|
*/
|
|
orte_grpcomm_base_t orte_grpcomm_base;
|
|
|
|
orte_grpcomm_API_module_t orte_grpcomm = {
|
|
orte_grpcomm_API_xcast,
|
|
orte_grpcomm_API_allgather
|
|
};
|
|
|
|
static bool recv_issued = false;
|
|
|
|
static int orte_grpcomm_base_close(void)
|
|
{
|
|
orte_grpcomm_base_active_t *active;
|
|
|
|
if (recv_issued) {
|
|
orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_XCAST);
|
|
recv_issued = false;
|
|
}
|
|
|
|
/* Close the active modules */
|
|
OPAL_LIST_FOREACH(active, &orte_grpcomm_base.actives, orte_grpcomm_base_active_t) {
|
|
if (NULL != active->module->finalize) {
|
|
active->module->finalize();
|
|
}
|
|
}
|
|
OPAL_LIST_DESTRUCT(&orte_grpcomm_base.actives);
|
|
OPAL_LIST_DESTRUCT(&orte_grpcomm_base.ongoing);
|
|
|
|
return mca_base_framework_components_close(&orte_grpcomm_base_framework, NULL);
|
|
}
|
|
|
|
/**
|
|
* Function for finding and opening either all MCA components, or the one
|
|
* that was specifically requested via a MCA parameter.
|
|
*/
|
|
static int orte_grpcomm_base_open(mca_base_open_flag_t flags)
|
|
{
|
|
OBJ_CONSTRUCT(&orte_grpcomm_base.actives, opal_list_t);
|
|
OBJ_CONSTRUCT(&orte_grpcomm_base.ongoing, opal_list_t);
|
|
|
|
return mca_base_framework_components_open(&orte_grpcomm_base_framework, flags);
|
|
}
|
|
|
|
MCA_BASE_FRAMEWORK_DECLARE(orte, grpcomm, NULL, NULL, orte_grpcomm_base_open, orte_grpcomm_base_close,
|
|
mca_grpcomm_base_static_components, 0);
|
|
|
|
OBJ_CLASS_INSTANCE(orte_grpcomm_base_active_t,
|
|
opal_list_item_t,
|
|
NULL, NULL);
|
|
|
|
static void scon(orte_grpcomm_signature_t *p)
|
|
{
|
|
p->signature = NULL;
|
|
p->sz = 0;
|
|
}
|
|
static void sdes(orte_grpcomm_signature_t *p)
|
|
{
|
|
if (NULL != p->signature) {
|
|
free(p->signature);
|
|
}
|
|
}
|
|
OBJ_CLASS_INSTANCE(orte_grpcomm_signature_t,
|
|
opal_object_t,
|
|
scon, sdes);
|
|
|
|
static void ccon(orte_grpcomm_coll_t *p)
|
|
{
|
|
p->sig = NULL;
|
|
OBJ_CONSTRUCT(&p->bucket, opal_buffer_t);
|
|
p->dmns = NULL;
|
|
p->ndmns = 0;
|
|
p->nreported = 0;
|
|
p->cbfunc = NULL;
|
|
p->cbdata = NULL;
|
|
}
|
|
static void cdes(orte_grpcomm_coll_t *p)
|
|
{
|
|
if (NULL != p->sig) {
|
|
OBJ_RELEASE(p->sig);
|
|
}
|
|
OBJ_DESTRUCT(&p->bucket);
|
|
if (NULL != p->dmns) {
|
|
free(p->dmns);
|
|
}
|
|
}
|
|
OBJ_CLASS_INSTANCE(orte_grpcomm_coll_t,
|
|
opal_list_item_t,
|
|
ccon, cdes);
|