2015-01-06 01:25:13 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-06-28 01:21:15 +04:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2009-04-10 20:44:37 +04:00
|
|
|
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-06-28 01:21:15 +04:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2015-01-06 01:25:13 +03:00
|
|
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2005-06-28 01:21:15 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-28 01:21:15 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-28 01:21:15 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2011-06-20 21:59:37 +04:00
|
|
|
#ifndef MCA_BTL_TEMPLATE_H
|
|
|
|
#define MCA_BTL_TEMPLATE_H
|
2005-06-28 01:21:15 +04: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 04:47:28 +04:00
|
|
|
#include "opal_config.h"
|
2005-06-28 01:21:15 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/* Open MPI includes */
|
Update libevent to the 2.0 series, currently at 2.0.7rc. We will update to their final release when it becomes available. Currently known errors exist in unused portions of the libevent code. This revision passes the IBM test suite on a Linux machine and on a standalone Mac.
This is a fairly intrusive change, but outside of the moving of opal/event to opal/mca/event, the only changes involved (a) changing all calls to opal_event functions to reflect the new framework instead, and (b) ensuring that all opal_event_t objects are properly constructed since they are now true opal_objects.
Note: Shiqing has just returned from vacation and has not yet had a chance to complete the Windows integration. Thus, this commit almost certainly breaks Windows support on the trunk. However, I want this to have a chance to soak for as long as possible before I become less available a week from today (going to be at a class for 5 days, and thus will only be sparingly available) so we can find and fix any problems.
Biggest change is moving the libevent code from opal/event to a new opal/mca/event framework. This was done to make it much easier to update libevent in the future. New versions can be inserted as a new component and tested in parallel with the current version until validated, then we can remove the earlier version if we so choose. This is a statically built framework ala installdirs, so only one component will build at a time. There is no selection logic - the sole compiled component simply loads its function pointers into the opal_event struct.
I have gone thru the code base and converted all the libevent calls I could find. However, I cannot compile nor test every environment. It is therefore quite likely that errors remain in the system. Please keep an eye open for two things:
1. compile-time errors: these will be obvious as calls to the old functions (e.g., opal_evtimer_new) must be replaced by the new framework APIs (e.g., opal_event.evtimer_new)
2. run-time errors: these will likely show up as segfaults due to missing constructors on opal_event_t objects. It appears that it became a typical practice for people to "init" an opal_event_t by simply using memset to zero it out. This will no longer work - you must either OBJ_NEW or OBJ_CONSTRUCT an opal_event_t. I tried to catch these cases, but may have missed some. Believe me, you'll know when you hit it.
There is also the issue of the new libevent "no recursion" behavior. As I described on a recent email, we will have to discuss this and figure out what, if anything, we need to do.
This commit was SVN r23925.
2010-10-24 22:35:54 +04:00
|
|
|
#include "opal/mca/event/event.h"
|
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 04:47:28 +04:00
|
|
|
#include "opal/mca/btl/btl.h"
|
|
|
|
#include "opal/mca/btl/base/base.h"
|
2015-06-24 06:59:57 +03:00
|
|
|
#include "opal/mca/mpool/mpool.h"
|
2005-06-28 01:21:15 +04:00
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
BEGIN_C_DECLS
|
2005-06-28 01:21:15 +04:00
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
#define MCA_BTL_HAS_MPOOL 1
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/**
|
2005-06-30 09:50:55 +04:00
|
|
|
* Infiniband (TEMPLATE) BTL component.
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_template_component_t {
|
2015-01-06 01:25:13 +03:00
|
|
|
mca_btl_base_component_3_0_0_t super; /**< base BTL component */
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
uint32_t template_num_btls;
|
2005-06-28 01:21:15 +04:00
|
|
|
/**< number of hcas available to the TEMPLATE component */
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_template_module_t *template_btls;
|
|
|
|
/**< array of available BTL modules */
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
int template_free_list_num;
|
|
|
|
/**< initial size of free lists */
|
|
|
|
|
|
|
|
int template_free_list_max;
|
|
|
|
/**< maximum size of free lists */
|
|
|
|
|
|
|
|
int template_free_list_inc;
|
|
|
|
/**< number of elements to alloc when growing free lists */
|
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t template_procs;
|
2005-06-28 01:21:15 +04:00
|
|
|
/**< list of template proc structures */
|
|
|
|
|
2005-07-04 02:45:48 +04:00
|
|
|
opal_mutex_t template_lock;
|
2005-06-28 01:21:15 +04:00
|
|
|
/**< lock for accessing module state */
|
|
|
|
|
2015-06-24 06:59:57 +03:00
|
|
|
char* template_mpool_name;
|
|
|
|
/**< name of memory pool */
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
bool leave_pinned;
|
|
|
|
/**< pin memory on first use and leave pinned */
|
2015-06-24 06:59:57 +03:00
|
|
|
};
|
2005-06-30 09:50:55 +04:00
|
|
|
typedef struct mca_btl_template_component_t mca_btl_template_component_t;
|
2005-06-28 01:21:15 +04: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 04:47:28 +04:00
|
|
|
OPAL_MODULE_DECLSPEC extern mca_btl_template_component_t mca_btl_template_component;
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/**
|
2005-06-30 09:50:55 +04:00
|
|
|
* BTL Module Interface
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_template_module_t {
|
|
|
|
mca_btl_base_module_t super; /**< base BTL interface */
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/* free list of fragment descriptors */
|
2015-02-19 23:41:41 +03:00
|
|
|
opal_free_list_t template_frag_eager;
|
|
|
|
opal_free_list_t template_frag_max;
|
|
|
|
opal_free_list_t template_frag_user;
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/* lock for accessing module state */
|
2005-07-04 02:45:48 +04:00
|
|
|
opal_mutex_t template_lock;
|
2005-06-28 01:21:15 +04:00
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
#if MCA_BTL_HAS_MPOOL
|
2005-06-28 01:21:15 +04:00
|
|
|
struct mca_mpool_base_module_t* template_mpool;
|
|
|
|
#endif
|
2015-06-24 06:59:57 +03:00
|
|
|
};
|
2005-06-30 09:50:55 +04:00
|
|
|
typedef struct mca_btl_template_module_t mca_btl_template_module_t;
|
|
|
|
extern mca_btl_template_module_t mca_btl_template_module;
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TEMPLATE component initialization.
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param num_btl_modules (OUT) Number of BTLs returned in BTL array.
|
|
|
|
* @param allow_multi_user_threads (OUT) Flag indicating wether BTL supports user threads (TRUE)
|
|
|
|
* @param have_hidden_threads (OUT) Flag indicating wether BTL uses threads (TRUE)
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
2005-06-30 09:50:55 +04:00
|
|
|
extern mca_btl_base_module_t** mca_btl_template_component_init(
|
2015-06-24 06:59:57 +03:00
|
|
|
int *num_btl_modules,
|
2005-06-28 01:21:15 +04:00
|
|
|
bool allow_multi_user_threads,
|
|
|
|
bool have_hidden_threads
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TEMPLATE component progress.
|
|
|
|
*/
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_component_progress(void);
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-06-30 09:50:55 +04:00
|
|
|
* Cleanup any resources held by the BTL.
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl BTL instance.
|
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 04:47:28 +04:00
|
|
|
* @return OPAL_SUCCESS or error status on failure.
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_finalize(
|
|
|
|
struct mca_btl_base_module_t* btl
|
2005-06-28 01:21:15 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-06-30 09:50:55 +04:00
|
|
|
* PML->BTL notification of change in the process list.
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN)
|
2005-06-28 01:21:15 +04:00
|
|
|
* @param nprocs (IN) Number of processes
|
|
|
|
* @param procs (IN) Set of processes
|
|
|
|
* @param peers (OUT) Set of (optional) peer addressing info.
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param peers (IN/OUT) Set of processes that are reachable via this BTL.
|
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 04:47:28 +04:00
|
|
|
* @return OPAL_SUCCESS or error status on failure.
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_add_procs(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
2005-06-28 01:21:15 +04:00
|
|
|
size_t nprocs,
|
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 04:47:28 +04:00
|
|
|
struct opal_proc_t **procs,
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_base_endpoint_t** peers,
|
2009-03-04 01:25:13 +03:00
|
|
|
opal_bitmap_t* reachable
|
2005-06-28 01:21:15 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2005-06-30 09:50:55 +04:00
|
|
|
* PML->BTL notification of change in the process list.
|
2005-06-28 01:21:15 +04:00
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL instance
|
2005-06-28 01:21:15 +04:00
|
|
|
* @param nproc (IN) Number of processes.
|
|
|
|
* @param procs (IN) Set of processes.
|
|
|
|
* @param peers (IN) Set of peer data structures.
|
|
|
|
* @return Status indicating if cleanup was successful
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_del_procs(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
2005-06-28 01:21:15 +04:00
|
|
|
size_t nprocs,
|
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 04:47:28 +04:00
|
|
|
struct opal_proc_t **procs,
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_base_endpoint_t** peers
|
2005-06-28 01:21:15 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate an asynchronous send.
|
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL addressing information
|
2005-06-28 01:21:15 +04:00
|
|
|
* @param descriptor (IN) Description of the data to be transfered
|
|
|
|
* @param tag (IN) The tag value used to notify the peer.
|
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_send(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* btl_peer,
|
2015-06-24 06:59:57 +03:00
|
|
|
struct mca_btl_base_descriptor_t* descriptor,
|
2005-06-30 09:50:55 +04:00
|
|
|
mca_btl_base_tag_t tag
|
2005-06-28 01:21:15 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate an asynchronous put.
|
2015-01-06 01:25:13 +03:00
|
|
|
* Completion Semantics: if this function returns a 1 then the operation
|
|
|
|
* is complete. a return of OPAL_SUCCESS indicates
|
|
|
|
* the put operation has been queued with the
|
|
|
|
* network. the local_handle can not be deregistered
|
|
|
|
* until all outstanding operations on that handle
|
|
|
|
* have been completed.
|
2005-06-28 01:21:15 +04:00
|
|
|
*
|
2015-01-06 01:25:13 +03:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL addressing information
|
|
|
|
* @param local_address (IN) Local address to put from (registered)
|
|
|
|
* @param remote_address (IN) Remote address to put to (registered remotely)
|
|
|
|
* @param local_handle (IN) Registration handle for region containing
|
|
|
|
* (local_address, local_address + size)
|
|
|
|
* @param remote_handle (IN) Remote registration handle for region containing
|
|
|
|
* (remote_address, remote_address + size)
|
|
|
|
* @param size (IN) Number of bytes to put
|
|
|
|
* @param flags (IN) Flags for this put operation
|
|
|
|
* @param order (IN) Ordering
|
|
|
|
* @param cbfunc (IN) Function to call on completion (if queued)
|
|
|
|
* @param cbcontext (IN) Context for the callback
|
|
|
|
* @param cbdata (IN) Data for callback
|
|
|
|
*
|
|
|
|
* @retval OPAL_SUCCESS The descriptor was successfully queued for a put
|
|
|
|
* @retval OPAL_ERROR The descriptor was NOT successfully queued for a put
|
|
|
|
* @retval OPAL_ERR_OUT_OF_RESOURCE Insufficient resources to queue the put
|
|
|
|
* operation. Try again later
|
|
|
|
* @retval OPAL_ERR_NOT_AVAILABLE Put can not be performed due to size or
|
|
|
|
* alignment restrictions.
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
2015-01-06 01:25:13 +03:00
|
|
|
int mca_btl_template_put (struct mca_btl_base_module_t *btl,
|
|
|
|
struct mca_btl_base_endpoint_t *endpoint, void *local_address,
|
|
|
|
uint64_t remote_address, struct mca_btl_base_registration_handle_t *local_handle,
|
|
|
|
struct mca_btl_base_registration_handle_t *remote_handle, size_t size, int flags,
|
|
|
|
int order, mca_btl_base_rdma_completion_fn_t cbfunc, void *cbcontext, void *cbdata);
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate an asynchronous get.
|
2015-01-06 01:25:13 +03:00
|
|
|
* Completion Semantics: if this function returns a 1 then the operation
|
|
|
|
* is complete. a return of OPAL_SUCCESS indicates
|
|
|
|
* the get operation has been queued with the
|
|
|
|
* network. the local_handle can not be deregistered
|
|
|
|
* until all outstanding operations on that handle
|
|
|
|
* have been completed.
|
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL addressing information
|
|
|
|
* @param local_address (IN) Local address to put from (registered)
|
|
|
|
* @param remote_address (IN) Remote address to put to (registered remotely)
|
|
|
|
* @param local_handle (IN) Registration handle for region containing
|
|
|
|
* (local_address, local_address + size)
|
|
|
|
* @param remote_handle (IN) Remote registration handle for region containing
|
|
|
|
* (remote_address, remote_address + size)
|
|
|
|
* @param size (IN) Number of bytes to put
|
|
|
|
* @param flags (IN) Flags for this put operation
|
|
|
|
* @param order (IN) Ordering
|
|
|
|
* @param cbfunc (IN) Function to call on completion (if queued)
|
|
|
|
* @param cbcontext (IN) Context for the callback
|
|
|
|
* @param cbdata (IN) Data for callback
|
|
|
|
*
|
|
|
|
* @retval OPAL_SUCCESS The descriptor was successfully queued for a put
|
|
|
|
* @retval OPAL_ERROR The descriptor was NOT successfully queued for a put
|
|
|
|
* @retval OPAL_ERR_OUT_OF_RESOURCE Insufficient resources to queue the put
|
|
|
|
* operation. Try again later
|
|
|
|
* @retval OPAL_ERR_NOT_AVAILABLE Put can not be performed due to size or
|
|
|
|
* alignment restrictions.
|
|
|
|
*/
|
|
|
|
int mca_btl_template_get (struct mca_btl_base_module_t *btl,
|
|
|
|
struct mca_btl_base_endpoint_t *endpoint, void *local_address,
|
|
|
|
uint64_t remote_address, struct mca_btl_base_registration_handle_t *local_handle,
|
|
|
|
struct mca_btl_base_registration_handle_t *remote_handle, size_t size, int flags,
|
|
|
|
int order, mca_btl_base_rdma_completion_fn_t cbfunc, void *cbcontext, void *cbdata);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Register a memory region for put/get/atomic operations.
|
2005-06-28 01:21:15 +04:00
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL module
|
2015-01-06 01:25:13 +03:00
|
|
|
* @param endpoint(IN) BTL addressing information (or NULL for all endpoints)
|
|
|
|
* @param base (IN) Pointer to start of region
|
|
|
|
* @param size (IN) Size of region
|
|
|
|
* @param flags (IN) Flags indicating what operation will be performed. Valid
|
|
|
|
* values are MCA_BTL_DES_FLAGS_PUT, MCA_BTL_DES_FLAGS_GET,
|
|
|
|
* and MCA_BTL_DES_FLAGS_ATOMIC
|
|
|
|
*
|
|
|
|
* @returns a memory registration handle valid for both local and remote operations
|
|
|
|
* @returns NULL if the region could not be registered
|
|
|
|
*
|
|
|
|
* This function registers the specified region with the hardware for use with
|
|
|
|
* the btl_put, btl_get, btl_atomic_cas, btl_atomic_op, and btl_atomic_fop
|
|
|
|
* functions. Care should be taken to not hold an excessive number of registrations
|
|
|
|
* as they may use limited system/NIC resources.
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
2015-01-06 01:25:13 +03:00
|
|
|
struct mca_btl_base_registration_handle_t *mca_btl_template_register_mem (
|
|
|
|
struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t *endpoint, void *base,
|
|
|
|
size_t size, uint32_t flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Deregister a memory region
|
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module region was registered with
|
|
|
|
* @param handle (IN) BTL registration handle to deregister
|
|
|
|
*
|
|
|
|
* This function deregisters the memory region associated with the specified handle. Care
|
|
|
|
* should be taken to not perform any RDMA or atomic operation on this memory region
|
|
|
|
* after it is deregistered. It is erroneous to specify a memory handle associated with
|
|
|
|
* a remote node.
|
|
|
|
*/
|
|
|
|
int mca_btl_template_deregister_mem (struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_registration_handle_t *handle);
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register a callback function that is called on receipt
|
|
|
|
* of a fragment.
|
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL module
|
2005-06-28 01:21:15 +04:00
|
|
|
* @return Status indicating if registration was successful
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_register(
|
2015-06-24 06:59:57 +03:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
mca_btl_base_tag_t tag,
|
|
|
|
mca_btl_base_module_recv_cb_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
|
|
|
|
2005-06-28 01:21:15 +04:00
|
|
|
/**
|
|
|
|
* Allocate a descriptor with a segment of the requested size.
|
2005-06-30 09:50:55 +04:00
|
|
|
* Note that the BTL layer may choose to return a smaller size
|
2005-06-28 01:21:15 +04:00
|
|
|
* if it cannot support the request.
|
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL module
|
2005-06-28 01:21:15 +04:00
|
|
|
* @param size (IN) Request segment size.
|
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern mca_btl_base_descriptor_t* mca_btl_template_alloc(
|
2007-12-09 17:00:42 +03:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
2007-05-24 23:51:26 +04:00
|
|
|
uint8_t order,
|
2007-12-09 17:08:01 +03:00
|
|
|
size_t size,
|
2015-06-24 06:59:57 +03:00
|
|
|
uint32_t flags);
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-06-30 09:50:55 +04:00
|
|
|
* Return a segment allocated by this BTL.
|
2005-06-28 01:21:15 +04:00
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL module
|
2005-06-28 01:21:15 +04:00
|
|
|
* @param descriptor (IN) Allocated descriptor.
|
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
extern int mca_btl_template_free(
|
2015-06-24 06:59:57 +03:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
mca_btl_base_descriptor_t* des);
|
|
|
|
|
2005-06-28 01:21:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepare a descriptor for send/rdma using the supplied
|
|
|
|
* convertor. If the convertor references data that is contigous,
|
|
|
|
* the descriptor may simply point to the user buffer. Otherwise,
|
|
|
|
* this routine is responsible for allocating buffer space and
|
|
|
|
* packing if required.
|
|
|
|
*
|
2005-06-30 09:50:55 +04:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL peer addressing
|
2005-06-28 01:21:15 +04:00
|
|
|
* @param convertor (IN) Data type convertor
|
|
|
|
* @param reserve (IN) Additional bytes requested by upper layer to precede user data
|
2015-06-24 06:59:57 +03:00
|
|
|
* @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT)
|
2005-06-28 01:21:15 +04:00
|
|
|
*/
|
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
mca_btl_base_descriptor_t* mca_btl_template_prepare_src(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* peer,
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
|
|
|
struct opal_convertor_t* convertor,
|
2007-05-24 23:51:26 +04:00
|
|
|
uint8_t order,
|
2005-06-28 01:21:15 +04:00
|
|
|
size_t reserve,
|
2007-12-09 17:08:01 +03:00
|
|
|
size_t* size,
|
|
|
|
uint32_t flags
|
2005-06-28 01:21:15 +04:00
|
|
|
);
|
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/**
|
|
|
|
* Fault Tolerance Event Notification Function
|
|
|
|
* @param state Checkpoint Stae
|
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 04:47:28 +04:00
|
|
|
* @return OPAL_SUCCESS or failure status
|
2007-03-17 02:11:45 +03:00
|
|
|
*/
|
|
|
|
int mca_btl_template_ft_event(int state);
|
2005-06-28 01:21:15 +04:00
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
END_C_DECLS
|
2005-06-28 01:21:15 +04:00
|
|
|
#endif
|