552c9ca5a0
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.
112 строки
2.8 KiB
C
112 строки
2.8 KiB
C
/*
|
|
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
|
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef MCA_ML_ALLOC_H
|
|
#define MCA_ML_ALLOC_H
|
|
|
|
#include "ompi_config.h"
|
|
#include "ompi/include/ompi/constants.h"
|
|
#include "ompi/communicator/communicator.h"
|
|
#include "ompi/mca/coll/coll.h"
|
|
#include "ompi/mca/bcol/base/base.h"
|
|
#include "opal/sys/atomic.h"
|
|
#include "opal/mca/mpool/base/base.h"
|
|
#include "coll_ml_lmngr.h"
|
|
|
|
/*
|
|
Returns a block of memory from mpool
|
|
|
|
ARGS:
|
|
IN ml_component: component descriptor
|
|
OUT ml_memblock: block_addr - Starting address of the memory block
|
|
size - Size of the block
|
|
register_info - Register information passed from the mpool
|
|
|
|
Return
|
|
On Sucess : Returns size of memory block
|
|
On Failure: Returns -1
|
|
|
|
*/
|
|
|
|
struct mca_coll_ml_component_t;
|
|
struct mca_coll_ml_module_t;
|
|
|
|
mca_bcol_base_memory_block_desc_t *mca_coll_ml_allocate_block(
|
|
struct mca_coll_ml_component_t *ml_component,
|
|
struct mca_bcol_base_memory_block_desc_t *ml_memblock
|
|
);
|
|
/* Allocate the memory from mpool */
|
|
/* Register the memory block with bcols */
|
|
|
|
void mca_coll_ml_free_block(
|
|
mca_bcol_base_memory_block_desc_t *ml_memblock
|
|
);
|
|
|
|
|
|
|
|
|
|
/*
|
|
Initialize the memory block and map into buffers and memory banks, and
|
|
also buffer descriptors are initialized.
|
|
|
|
IN ml_memblock: Memory block descriptor
|
|
IN num_buffers: number of buffers
|
|
IN num_banks: number of banks
|
|
Return
|
|
On Sucess: OMPI_SUCCESS
|
|
On Failure: OMPI_ERROR
|
|
*/
|
|
int mca_coll_ml_initialize_block(
|
|
mca_bcol_base_memory_block_desc_t *ml_memblock,
|
|
uint32_t num_buffers,
|
|
uint32_t num_banks,
|
|
uint32_t buffer_size,
|
|
int32_t data_offset,
|
|
opal_list_t *bcols_in_use
|
|
);
|
|
/* Map blocks into buffers and banks */
|
|
/* Initialize the descriptors */
|
|
|
|
|
|
|
|
/*
|
|
Allocate a memory buffer from the block
|
|
IN ml_memblock: Memory block descriptor
|
|
OUT ml_membuffer: Buffer allocated for data from the block
|
|
|
|
Return
|
|
On Sucess: OMPI_SUCCESS
|
|
On Failure: OMPI_ERROR
|
|
*/
|
|
mca_bcol_base_payload_buffer_desc_t *mca_coll_ml_alloc_buffer(
|
|
struct mca_coll_ml_module_t *module);
|
|
|
|
int mca_coll_ml_free_buffer(
|
|
mca_bcol_base_memory_block_desc_t *ml_memblock,
|
|
struct mca_bcol_base_payload_buffer_desc_t *ml_membuffer
|
|
);
|
|
|
|
/*
|
|
Register the memory block with bcol component
|
|
|
|
IN ml_memblock: Memory block descriptor
|
|
OUT registerations (ml_memblock)
|
|
|
|
Return
|
|
On Sucess: OMPI_SUCCESS
|
|
On Failure: OMPI_ERROR
|
|
|
|
*/
|
|
int mca_coll_ml_register_block_bcol(
|
|
mca_bcol_base_memory_block_desc_t *ml_memblock
|
|
);
|
|
|
|
#endif /* MCA_ML_ALLOC_H */
|