2004-08-11 03:38:12 +04:00
|
|
|
/*
|
2004-11-22 04:38:40 +03:00
|
|
|
*Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
*Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
*Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
*Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
*$COPYRIGHT$
|
|
|
|
*
|
|
|
|
*Additional copyrights may follow
|
|
|
|
*
|
2004-08-11 03:38:12 +04:00
|
|
|
*$HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PTL_SELF_H_HAS_BEEN_INCLUDED
|
|
|
|
#define PTL_SELF_H_HAS_BEEN_INCLUDED
|
|
|
|
|
|
|
|
#include "class/ompi_free_list.h"
|
2005-07-04 03:09:55 +04:00
|
|
|
#include "opal/event/event.h"
|
2004-08-11 03:38:12 +04:00
|
|
|
#include "mca/pml/pml.h"
|
|
|
|
#include "mca/ptl/ptl.h"
|
2005-05-09 23:37:10 +04:00
|
|
|
#include "mca/ptl/base/ptl_base_sendreq.h"
|
|
|
|
#include "mca/ptl/base/ptl_base_recvreq.h"
|
2004-08-11 03:38:12 +04:00
|
|
|
#include "mca/ptl/base/ptl_base_recvfrag.h"
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-08-11 03:38:12 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SELF PTL component.
|
|
|
|
*/
|
|
|
|
struct mca_ptl_self_component_t {
|
|
|
|
mca_ptl_base_component_1_0_0_t super; /**< base PTL component */
|
2004-11-05 10:52:30 +03:00
|
|
|
uint32_t self_buf_size; /**< the size of the internal buffer used to pack/unpack the data */
|
|
|
|
uint32_t self_is_non_blocking; /**< how the memcopy operations are done segmented or not */
|
|
|
|
int32_t self_free_list_num; /**< initial size of free lists */
|
|
|
|
int32_t self_free_list_max; /**< maximum size of free lists */
|
|
|
|
int32_t self_free_list_inc; /**< number of elements to alloc when growing free lists */
|
|
|
|
ompi_free_list_t self_send_requests; /**< free list of self send requests -- sendreq + sendfrag */
|
|
|
|
struct ompi_proc_t* self_local; /**< the self proc instance corresponding to the local process */
|
2004-08-11 03:38:12 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_ptl_self_component_t mca_ptl_self_component_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Self send request derived type. The send request contains both the
|
|
|
|
* base send request, and the base receive fragment which will be used to do the match.
|
|
|
|
*/
|
|
|
|
struct mca_ptl_self_send_request_t {
|
2005-05-09 23:37:10 +04:00
|
|
|
mca_ptl_base_send_request_t req_ptl;
|
2004-08-11 03:38:12 +04:00
|
|
|
mca_ptl_base_recv_frag_t req_frag; /* first fragment */
|
|
|
|
};
|
|
|
|
typedef struct mca_ptl_self_send_request_t mca_ptl_self_send_request_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_ptl_self_send_request_t);
|
|
|
|
|
|
|
|
extern mca_ptl_self_component_t mca_ptl_self_component;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register SELF component parameters with the MCA framework
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_self_component_open(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Any final cleanup before being unloaded.
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_self_component_close(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SELF component initialization.
|
|
|
|
*
|
|
|
|
* @param num_ptls (OUT) Number of PTLs returned in PTL array.
|
|
|
|
* @param allow_multi_user_threads (OUT) Flag indicating wether PTL supports user threads (TRUE)
|
|
|
|
* @param have_hidden_threads (OUT) Flag indicating wether PTL uses threads (TRUE)
|
|
|
|
*
|
|
|
|
* (1) prepare the local buffering and initialize the SELF
|
|
|
|
* engine.
|
|
|
|
*/
|
|
|
|
extern mca_ptl_base_module_t** mca_ptl_self_component_init(
|
|
|
|
int *num_ptls,
|
2005-03-27 17:05:23 +04:00
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads
|
2004-08-11 03:38:12 +04:00
|
|
|
);
|
|
|
|
|
2004-11-05 10:52:30 +03:00
|
|
|
int mca_ptl_self_add_proc(struct mca_ptl_base_module_t* ptl, size_t nprocs, struct ompi_proc_t **ompi_proc, struct mca_ptl_base_peer_t** peer_ret, struct ompi_bitmap_t* reachable);
|
2004-08-11 03:38:12 +04:00
|
|
|
int mca_ptl_self_del_proc(struct mca_ptl_base_module_t* ptl, size_t nprocs, struct ompi_proc_t **proc, struct mca_ptl_base_peer_t** ptl_peer);
|
|
|
|
int mca_ptl_self_finalize(struct mca_ptl_base_module_t* ptl);
|
2005-05-09 23:37:10 +04:00
|
|
|
int mca_ptl_self_request_init(struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_send_request_t* request);
|
|
|
|
void mca_ptl_self_request_fini(struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_send_request_t* request);
|
|
|
|
int mca_ptl_self_send( struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_peer_t* ptl_base_peer, struct mca_ptl_base_send_request_t* request,
|
2004-08-11 03:38:12 +04:00
|
|
|
size_t offset, size_t size, int flags );
|
|
|
|
void mca_ptl_self_matched( mca_ptl_base_module_t* ptl, mca_ptl_base_recv_frag_t* frag );
|
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-08-11 03:38:12 +04:00
|
|
|
#endif /* PTL_SELF_H_HAS_BEEN_INCLUDED */
|
|
|
|
|