2005-06-30 21:28:35 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2011-02-25 00:36:08 +00:00
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2008-01-21 12:11:18 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-06-30 21:28:35 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2015-06-18 09:53:20 -07:00
|
|
|
* Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
|
2007-09-24 10:11:52 +00:00
|
|
|
* Copyright (c) 2006-2007 Voltaire All rights reserved.
|
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
|
|
|
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
2015-12-25 16:31:35 +09:00
|
|
|
* Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2015-12-30 00:12:19 +06:00
|
|
|
* Copyright (c) 2015 Mellanox Technologies. All rights reserved.
|
|
|
|
*
|
2005-06-30 21:28:35 +00:00
|
|
|
* $COPYRIGHT$
|
2008-01-21 12:11:18 +00:00
|
|
|
*
|
2005-06-30 21:28:35 +00:00
|
|
|
* Additional copyrights may follow
|
2008-01-21 12:11:18 +00:00
|
|
|
*
|
2005-06-30 21:28:35 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
#include "opal_config.h"
|
2005-06-30 21:28:35 +00:00
|
|
|
|
2008-04-17 20:43:56 +00:00
|
|
|
#include "opal/util/arch.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/mca/pmix/pmix.h"
|
2008-04-17 20:43:56 +00:00
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
#include "btl_openib.h"
|
|
|
|
#include "btl_openib_proc.h"
|
2008-05-02 11:52:33 +00:00
|
|
|
#include "connect/base.h"
|
|
|
|
#include "connect/connect.h"
|
2005-06-30 21:28:35 +00:00
|
|
|
|
2015-12-24 17:22:55 +06:00
|
|
|
static void mca_btl_openib_proc_btl_construct(mca_btl_openib_proc_btlptr_t* elem);
|
|
|
|
static void mca_btl_openib_proc_btl_destruct(mca_btl_openib_proc_btlptr_t* elem);
|
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_openib_proc_btlptr_t,
|
|
|
|
opal_list_item_t, mca_btl_openib_proc_btl_construct,
|
|
|
|
mca_btl_openib_proc_btl_destruct);
|
|
|
|
|
|
|
|
static void mca_btl_openib_proc_btl_construct(mca_btl_openib_proc_btlptr_t* elem)
|
|
|
|
{
|
|
|
|
elem->openib_btl = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void mca_btl_openib_proc_btl_destruct(mca_btl_openib_proc_btlptr_t* elem)
|
|
|
|
{
|
|
|
|
elem->openib_btl = NULL;
|
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
static void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc);
|
|
|
|
static void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc);
|
|
|
|
|
2008-01-21 12:11:18 +00:00
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_openib_proc_t,
|
|
|
|
opal_list_item_t, mca_btl_openib_proc_construct,
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_btl_openib_proc_destruct);
|
|
|
|
|
2009-01-05 14:14:38 +00:00
|
|
|
void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* ib_proc)
|
2005-06-30 21:28:35 +00:00
|
|
|
{
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
ib_proc->proc_opal = 0;
|
|
|
|
ib_proc->proc_ports = NULL;
|
|
|
|
ib_proc->proc_port_count = 0;
|
|
|
|
ib_proc->proc_endpoints = 0;
|
2009-01-05 14:14:38 +00:00
|
|
|
ib_proc->proc_endpoint_count = 0;
|
|
|
|
OBJ_CONSTRUCT(&ib_proc->proc_lock, opal_mutex_t);
|
2015-12-24 17:22:55 +06:00
|
|
|
OBJ_CONSTRUCT(&ib_proc->openib_btls, opal_list_t);
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Cleanup ib proc instance
|
|
|
|
*/
|
|
|
|
|
2009-01-05 14:14:38 +00:00
|
|
|
void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* ib_proc)
|
2005-06-30 21:28:35 +00:00
|
|
|
{
|
2015-12-24 17:22:55 +06:00
|
|
|
mca_btl_openib_proc_btlptr_t* elem;
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
/* release resources */
|
2009-01-05 14:14:38 +00:00
|
|
|
if(NULL != ib_proc->proc_endpoints) {
|
|
|
|
free(ib_proc->proc_endpoints);
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
2009-01-05 14:14:38 +00:00
|
|
|
if (NULL != ib_proc->proc_ports) {
|
2008-05-02 11:52:33 +00:00
|
|
|
int i, j;
|
2009-01-05 14:14:38 +00:00
|
|
|
for (i = 0; i < ib_proc->proc_port_count; ++i) {
|
|
|
|
for (j = 0; j < ib_proc->proc_ports[i].pm_cpc_data_count; ++j) {
|
|
|
|
if (NULL != ib_proc->proc_ports[i].pm_cpc_data[j].cbm_modex_message) {
|
|
|
|
free(ib_proc->proc_ports[i].pm_cpc_data[j].cbm_modex_message);
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-01-05 14:14:38 +00:00
|
|
|
free(ib_proc->proc_ports);
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
2009-01-05 14:14:38 +00:00
|
|
|
OBJ_DESTRUCT(&ib_proc->proc_lock);
|
2015-12-24 17:22:55 +06:00
|
|
|
|
|
|
|
elem = (mca_btl_openib_proc_btlptr_t*)opal_list_remove_first(&ib_proc->openib_btls);
|
|
|
|
while( NULL != elem ){
|
|
|
|
OBJ_RELEASE(elem);
|
|
|
|
elem = (mca_btl_openib_proc_btlptr_t*)opal_list_remove_first(&ib_proc->openib_btls);
|
|
|
|
}
|
|
|
|
OBJ_DESTRUCT(&ib_proc->openib_btls);
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Look for an existing IB process instances based on the associated
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
* opal_proc_t instance.
|
2005-06-30 21:28:35 +00:00
|
|
|
*/
|
2015-12-21 09:34:11 +06:00
|
|
|
static mca_btl_openib_proc_t* ibproc_lookup_no_lock(opal_proc_t* proc)
|
2005-06-30 21:28:35 +00:00
|
|
|
{
|
|
|
|
mca_btl_openib_proc_t* ib_proc;
|
|
|
|
|
|
|
|
for(ib_proc = (mca_btl_openib_proc_t*)
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_get_first(&mca_btl_openib_component.ib_procs);
|
2005-06-30 21:28:35 +00:00
|
|
|
ib_proc != (mca_btl_openib_proc_t*)
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_get_end(&mca_btl_openib_component.ib_procs);
|
|
|
|
ib_proc = (mca_btl_openib_proc_t*)opal_list_get_next(ib_proc)) {
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
if(ib_proc->proc_opal == proc) {
|
2005-06-30 21:28:35 +00:00
|
|
|
return ib_proc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-12-21 09:34:11 +06:00
|
|
|
static mca_btl_openib_proc_t* ibproc_lookup_and_lock(opal_proc_t* proc)
|
2015-12-20 10:16:33 +06:00
|
|
|
{
|
|
|
|
mca_btl_openib_proc_t* ib_proc;
|
|
|
|
|
2015-12-21 09:34:11 +06:00
|
|
|
/* get the process from the list */
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_lock(&mca_btl_openib_component.ib_lock);
|
2015-12-21 09:34:11 +06:00
|
|
|
ib_proc = ibproc_lookup_no_lock(proc);
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_unlock(&mca_btl_openib_component.ib_lock);
|
2015-12-21 09:34:11 +06:00
|
|
|
if( NULL != ib_proc ){
|
|
|
|
/* if we were able to find it - lock it.
|
|
|
|
* NOTE: we want to lock it outside of list locked region */
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_lock(&ib_proc->proc_lock);
|
2015-12-21 09:34:11 +06:00
|
|
|
}
|
2015-12-20 10:16:33 +06:00
|
|
|
return ib_proc;
|
|
|
|
}
|
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
static void inline unpack8(char **src, uint8_t *value)
|
|
|
|
{
|
|
|
|
/* Copy one character */
|
|
|
|
*value = (uint8_t) **src;
|
|
|
|
/* Most the src ahead one */
|
|
|
|
++*src;
|
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
/*
|
|
|
|
* Create a IB process structure. There is a one-to-one correspondence
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
* between a opal_proc_t and a mca_btl_openib_proc_t instance. We
|
2008-05-02 11:52:33 +00:00
|
|
|
* cache additional data (specifically the list of
|
|
|
|
* mca_btl_openib_endpoint_t instances, and published addresses)
|
|
|
|
* associated w/ a given destination on this datastructure.
|
2005-06-30 21:28:35 +00:00
|
|
|
*/
|
|
|
|
|
2015-12-24 17:22:55 +06:00
|
|
|
mca_btl_openib_proc_t* mca_btl_openib_proc_get_locked(opal_proc_t* proc)
|
2005-06-30 21:28:35 +00:00
|
|
|
{
|
2015-12-20 10:16:33 +06:00
|
|
|
mca_btl_openib_proc_t *ib_proc = NULL, *ib_proc_ret = NULL;
|
2008-01-14 23:22:03 +00:00
|
|
|
size_t msg_size;
|
|
|
|
uint32_t size;
|
2008-05-02 11:52:33 +00:00
|
|
|
int rc, i, j;
|
2008-01-14 23:22:03 +00:00
|
|
|
void *message;
|
|
|
|
char *offset;
|
2008-05-02 11:52:33 +00:00
|
|
|
int modex_message_size;
|
|
|
|
mca_btl_openib_modex_message_t dummy;
|
2015-12-24 17:22:55 +06:00
|
|
|
bool is_new = false;
|
2008-01-21 12:11:18 +00:00
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
/* Check if we have already created a IB proc
|
|
|
|
* structure for this ompi process */
|
2015-12-21 09:34:11 +06:00
|
|
|
ib_proc = ibproc_lookup_and_lock(proc);
|
2015-12-20 10:16:33 +06:00
|
|
|
if (NULL != ib_proc) {
|
2005-06-30 21:28:35 +00:00
|
|
|
/* Gotcha! */
|
2015-12-20 10:16:33 +06:00
|
|
|
return ib_proc;
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
|
|
|
|
2015-12-20 10:16:33 +06:00
|
|
|
/* All initialization has to be an atomic operation. we do the following assumption:
|
|
|
|
* - we let all concurent threads to try to do the initialization;
|
|
|
|
* - when one has finished it locks ib_lock and checks if corresponding
|
|
|
|
* process is still missing;
|
|
|
|
* - if so - new proc is added, otherwise - initialized proc struct is released.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* First time, gotta create a new IB proc
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
* out of the opal_proc ... */
|
2015-12-20 10:16:33 +06:00
|
|
|
ib_proc = OBJ_NEW(mca_btl_openib_proc_t);
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
/* Initialize number of peer */
|
2015-12-20 10:16:33 +06:00
|
|
|
ib_proc->proc_endpoint_count = 0;
|
|
|
|
ib_proc->proc_opal = proc;
|
2005-06-30 21:28:35 +00:00
|
|
|
|
2008-01-21 12:11:18 +00:00
|
|
|
/* query for the peer address info */
|
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_MODEX_RECV(rc, &mca_btl_openib_component.super.btl_version,
|
2015-06-18 09:53:20 -07:00
|
|
|
&proc->proc_name, &message, &msg_size);
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
if (OPAL_SUCCESS != rc) {
|
2014-09-10 17:02:16 +00:00
|
|
|
BTL_VERBOSE(("[%s:%d] opal_modex_recv failed for peer %s",
|
2007-10-15 17:53:02 +00:00
|
|
|
__FILE__, __LINE__,
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
OPAL_NAME_PRINT(proc->proc_name)));
|
2015-12-20 10:16:33 +06:00
|
|
|
goto err_exit;
|
2005-09-30 22:58:09 +00:00
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
if (0 == msg_size) {
|
2015-12-20 10:16:33 +06:00
|
|
|
goto err_exit;
|
2005-09-30 22:58:09 +00:00
|
|
|
}
|
2005-06-30 21:28:35 +00:00
|
|
|
|
2008-01-14 23:22:03 +00:00
|
|
|
/* Message was packed in btl_openib_component.c; the format is
|
|
|
|
listed in a comment in that file */
|
2008-05-02 11:52:33 +00:00
|
|
|
modex_message_size = ((char *) &(dummy.end)) - ((char*) &dummy);
|
|
|
|
|
|
|
|
/* Unpack the number of modules in the message */
|
2010-07-12 16:17:56 +00:00
|
|
|
offset = (char *) message;
|
2015-12-20 10:16:33 +06:00
|
|
|
unpack8(&offset, &(ib_proc->proc_port_count));
|
|
|
|
BTL_VERBOSE(("unpack: %d btls", ib_proc->proc_port_count));
|
|
|
|
if (ib_proc->proc_port_count > 0) {
|
|
|
|
ib_proc->proc_ports = (mca_btl_openib_proc_modex_t *)
|
2011-07-04 14:00:41 +00:00
|
|
|
malloc(sizeof(mca_btl_openib_proc_modex_t) *
|
2015-12-20 10:16:33 +06:00
|
|
|
ib_proc->proc_port_count);
|
2008-05-02 11:52:33 +00:00
|
|
|
} else {
|
2015-12-20 10:16:33 +06:00
|
|
|
ib_proc->proc_ports = NULL;
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
|
|
|
|
/* Loop over unpacking all the ports */
|
2015-12-20 10:16:33 +06:00
|
|
|
for (i = 0; i < ib_proc->proc_port_count; i++) {
|
2008-01-14 23:22:03 +00:00
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
/* Unpack the modex comment message struct */
|
|
|
|
size = modex_message_size;
|
2015-12-20 10:16:33 +06:00
|
|
|
memcpy(&(ib_proc->proc_ports[i].pm_port_info), offset, size);
|
2009-05-06 20:11:28 +00:00
|
|
|
#if !defined(WORDS_BIGENDIAN) && OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2015-12-25 16:31:35 +09:00
|
|
|
MCA_BTL_OPENIB_MODEX_MSG_NTOH(ib_proc->proc_ports[i].pm_port_info);
|
2008-01-14 23:22:03 +00:00
|
|
|
#endif
|
2008-05-02 11:52:33 +00:00
|
|
|
offset += size;
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacked btl %d: modex message, offset now %d",
|
|
|
|
i, (int)(offset-((char*)message))));
|
2008-01-14 23:22:03 +00:00
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
/* Unpack the number of CPCs that follow */
|
2015-12-20 10:16:33 +06:00
|
|
|
unpack8(&offset, &(ib_proc->proc_ports[i].pm_cpc_data_count));
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacked btl %d: number of cpcs to follow %d (offset now %d)",
|
2015-12-20 10:16:33 +06:00
|
|
|
i, ib_proc->proc_ports[i].pm_cpc_data_count,
|
2008-06-25 20:16:34 +00:00
|
|
|
(int)(offset-((char*)message))));
|
2015-12-20 10:16:33 +06:00
|
|
|
ib_proc->proc_ports[i].pm_cpc_data = (opal_btl_openib_connect_base_module_data_t *)
|
|
|
|
calloc(ib_proc->proc_ports[i].pm_cpc_data_count,
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
sizeof(opal_btl_openib_connect_base_module_data_t));
|
2015-12-20 10:16:33 +06:00
|
|
|
if (NULL == ib_proc->proc_ports[i].pm_cpc_data) {
|
|
|
|
goto err_exit;
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Unpack the CPCs */
|
2015-12-20 10:16:33 +06:00
|
|
|
for (j = 0; j < ib_proc->proc_ports[i].pm_cpc_data_count; ++j) {
|
2008-05-02 11:52:33 +00:00
|
|
|
uint8_t u8;
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
opal_btl_openib_connect_base_module_data_t *cpcd;
|
2015-12-20 10:16:33 +06:00
|
|
|
cpcd = ib_proc->proc_ports[i].pm_cpc_data + j;
|
2008-05-02 11:52:33 +00:00
|
|
|
unpack8(&offset, &u8);
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacked btl %d: cpc %d: index %d (offset now %d)",
|
|
|
|
i, j, u8, (int)(offset-(char*)message)));
|
2011-07-04 14:00:41 +00:00
|
|
|
cpcd->cbm_component =
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
opal_btl_openib_connect_base_get_cpc_byindex(u8);
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacked btl %d: cpc %d: component %s",
|
|
|
|
i, j, cpcd->cbm_component->cbc_name));
|
2011-07-04 14:00:41 +00:00
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
unpack8(&offset, &cpcd->cbm_priority);
|
|
|
|
unpack8(&offset, &cpcd->cbm_modex_message_len);
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacked btl %d: cpc %d: priority %d, msg len %d (offset now %d)",
|
2011-07-04 14:00:41 +00:00
|
|
|
i, j, cpcd->cbm_priority,
|
2008-06-25 20:16:34 +00:00
|
|
|
cpcd->cbm_modex_message_len,
|
|
|
|
(int)(offset-(char*)message)));
|
2008-05-02 11:52:33 +00:00
|
|
|
if (cpcd->cbm_modex_message_len > 0) {
|
|
|
|
cpcd->cbm_modex_message = malloc(cpcd->cbm_modex_message_len);
|
|
|
|
if (NULL == cpcd->cbm_modex_message) {
|
|
|
|
BTL_ERROR(("Failed to malloc"));
|
2015-12-20 10:16:33 +06:00
|
|
|
goto err_exit;
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
2011-07-04 14:00:41 +00:00
|
|
|
memcpy(cpcd->cbm_modex_message, offset,
|
2008-05-02 11:52:33 +00:00
|
|
|
cpcd->cbm_modex_message_len);
|
|
|
|
offset += cpcd->cbm_modex_message_len;
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacked btl %d: cpc %d: blob unpacked %d %x (offset now %d)",
|
|
|
|
i, j,
|
|
|
|
((uint32_t*)cpcd->cbm_modex_message)[0],
|
|
|
|
((uint32_t*)cpcd->cbm_modex_message)[1],
|
|
|
|
(int)(offset-((char*)message))));
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
}
|
|
|
|
}
|
2007-01-03 22:35:41 +00:00
|
|
|
|
2015-12-20 10:16:33 +06:00
|
|
|
if (0 == ib_proc->proc_port_count) {
|
|
|
|
ib_proc->proc_endpoints = NULL;
|
2005-09-30 22:58:09 +00:00
|
|
|
} else {
|
2015-12-24 17:22:55 +06:00
|
|
|
ib_proc->proc_endpoints = (volatile mca_btl_base_endpoint_t**)
|
2015-12-20 10:16:33 +06:00
|
|
|
malloc(ib_proc->proc_port_count *
|
2008-05-02 11:52:33 +00:00
|
|
|
sizeof(mca_btl_base_endpoint_t*));
|
2005-09-30 22:58:09 +00:00
|
|
|
}
|
2015-12-20 10:16:33 +06:00
|
|
|
if (NULL == ib_proc->proc_endpoints) {
|
|
|
|
goto err_exit;
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
2008-05-02 11:52:33 +00:00
|
|
|
|
2008-06-25 20:16:34 +00:00
|
|
|
BTL_VERBOSE(("unpacking done!"));
|
2015-12-20 10:16:33 +06:00
|
|
|
|
|
|
|
/* Finally add this process to the initialized procs list */
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_lock(&mca_btl_openib_component.ib_lock);
|
2015-12-20 10:16:33 +06:00
|
|
|
|
2015-12-21 09:34:11 +06:00
|
|
|
ib_proc_ret = ibproc_lookup_no_lock(proc);
|
2015-12-20 10:16:33 +06:00
|
|
|
if (NULL == ib_proc_ret) {
|
2015-12-21 09:34:11 +06:00
|
|
|
/* if process can't be found in this list - insert it locked
|
|
|
|
* it is safe to lock ib_proc here because this thread is
|
|
|
|
* the only one who knows about it so far */
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_lock(&ib_proc->proc_lock);
|
2015-12-20 10:16:33 +06:00
|
|
|
opal_list_append(&mca_btl_openib_component.ib_procs, &ib_proc->super);
|
|
|
|
ib_proc_ret = ib_proc;
|
2015-12-24 17:22:55 +06:00
|
|
|
is_new = true;
|
2015-12-20 10:16:33 +06:00
|
|
|
} else {
|
|
|
|
/* otherwise - release module_proc */
|
|
|
|
OBJ_RELEASE(ib_proc);
|
|
|
|
}
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_unlock(&mca_btl_openib_component.ib_lock);
|
2015-12-20 10:16:33 +06:00
|
|
|
|
2015-12-21 09:34:11 +06:00
|
|
|
/* if we haven't insert the process - lock it here so we
|
|
|
|
* won't lock mca_btl_openib_component.ib_lock */
|
2015-12-24 17:22:55 +06:00
|
|
|
if( !is_new ){
|
2015-12-21 18:23:40 +06:00
|
|
|
opal_mutex_lock(&ib_proc_ret->proc_lock);
|
2015-12-21 09:34:11 +06:00
|
|
|
}
|
|
|
|
|
2015-12-20 10:16:33 +06:00
|
|
|
return ib_proc_ret;
|
|
|
|
|
|
|
|
err_exit:
|
|
|
|
|
|
|
|
fprintf(stderr,"%d: error exit from mca_btl_openib_proc_create\n", OPAL_PROC_MY_NAME.vpid);
|
|
|
|
if( NULL != ib_proc ){
|
|
|
|
OBJ_RELEASE(ib_proc);
|
|
|
|
}
|
|
|
|
return NULL;
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
int mca_btl_openib_proc_remove(opal_proc_t *proc,
|
2008-05-02 11:52:33 +00:00
|
|
|
mca_btl_base_endpoint_t *endpoint)
|
|
|
|
{
|
|
|
|
size_t i;
|
|
|
|
mca_btl_openib_proc_t* ib_proc = NULL;
|
|
|
|
|
|
|
|
/* Remove endpoint from the openib BTL version of the proc as
|
|
|
|
well */
|
2015-12-21 09:34:11 +06:00
|
|
|
ib_proc = ibproc_lookup_and_lock(proc);
|
2008-05-02 11:52:33 +00:00
|
|
|
if (NULL != ib_proc) {
|
|
|
|
for (i = 0; i < ib_proc->proc_endpoint_count; ++i) {
|
|
|
|
if (ib_proc->proc_endpoints[i] == endpoint) {
|
|
|
|
ib_proc->proc_endpoints[i] = NULL;
|
|
|
|
if (i == ib_proc->proc_endpoint_count - 1) {
|
|
|
|
--ib_proc->proc_endpoint_count;
|
|
|
|
}
|
2015-12-21 18:39:50 +06:00
|
|
|
opal_mutex_unlock(&ib_proc->proc_lock);
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
return OPAL_SUCCESS;
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
return OPAL_ERR_NOT_FOUND;
|
2008-05-02 11:52:33 +00:00
|
|
|
}
|
2005-06-30 21:28:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Note that this routine must be called with the lock on the process
|
2008-01-21 12:11:18 +00:00
|
|
|
* already held. Insert a btl instance into the proc array and assign
|
2005-06-30 21:28:35 +00:00
|
|
|
* it an address.
|
|
|
|
*/
|
2008-01-21 12:11:18 +00:00
|
|
|
int mca_btl_openib_proc_insert(mca_btl_openib_proc_t* module_proc,
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_btl_base_endpoint_t* module_endpoint)
|
|
|
|
{
|
|
|
|
/* insert into endpoint array */
|
2008-01-21 12:11:18 +00:00
|
|
|
|
|
|
|
|
2007-01-12 23:14:45 +00:00
|
|
|
#ifndef WORDS_BIGENDIAN
|
|
|
|
/* if we are little endian and our peer is not so lucky, then we
|
|
|
|
need to put all information sent to him in big endian (aka
|
|
|
|
Network Byte Order) and expect all information received to
|
|
|
|
be in NBO. Since big endian machines always send and receive
|
|
|
|
in NBO, we don't care so much about that case. */
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
if (module_proc->proc_opal->proc_arch & OPAL_ARCH_ISBIGENDIAN) {
|
2007-01-12 23:14:45 +00:00
|
|
|
module_endpoint->nbo = true;
|
|
|
|
}
|
|
|
|
#endif
|
2008-01-21 12:11:18 +00:00
|
|
|
|
2007-01-12 23:14:45 +00:00
|
|
|
/* only allow eager rdma if the peers agree on the size of a long */
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
if((module_proc->proc_opal->proc_arch & OPAL_ARCH_LONGISxx) !=
|
|
|
|
(opal_proc_local_get()->proc_arch & OPAL_ARCH_LONGISxx)) {
|
2007-01-12 23:14:45 +00:00
|
|
|
module_endpoint->use_eager_rdma = false;
|
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
module_endpoint->endpoint_proc = module_proc;
|
|
|
|
module_proc->proc_endpoints[module_proc->proc_endpoint_count++] = module_endpoint;
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
|
|
|
return OPAL_SUCCESS;
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
2015-12-24 17:22:55 +06:00
|
|
|
|
|
|
|
int mca_btl_openib_proc_reg_btl(mca_btl_openib_proc_t* ib_proc,
|
|
|
|
mca_btl_openib_module_t* openib_btl)
|
|
|
|
{
|
|
|
|
mca_btl_openib_proc_btlptr_t* elem;
|
|
|
|
|
|
|
|
|
|
|
|
for(elem = (mca_btl_openib_proc_btlptr_t*)opal_list_get_first(&ib_proc->openib_btls);
|
|
|
|
elem != (mca_btl_openib_proc_btlptr_t*)opal_list_get_end(&ib_proc->openib_btls);
|
|
|
|
elem = (mca_btl_openib_proc_btlptr_t*)opal_list_get_next(elem)) {
|
|
|
|
if(elem->openib_btl == openib_btl) {
|
|
|
|
/* this is normal return meaning that this BTL has already touched this ib_proc */
|
|
|
|
return OPAL_ERR_RESOURCE_BUSY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
elem = OBJ_NEW(mca_btl_openib_proc_btlptr_t);
|
|
|
|
if( NULL == elem ){
|
|
|
|
return OPAL_ERR_OUT_OF_RESOURCE;
|
|
|
|
}
|
|
|
|
elem->openib_btl = openib_btl;
|
|
|
|
opal_list_append(&ib_proc->openib_btls, &elem->super);
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|