PML V and vprotocol framework management of customizable wait/test. This is still a fast and dirty implementation (cleanup of the customized request functions is not totally correct if several component modify them out of order).
This commit was SVN r16890.
Этот коммит содержится в:
родитель
859169214c
Коммит
6190c97ee9
@ -13,16 +13,18 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/request/request.h"
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct mca_pml_v_t {
|
||||
mca_pml_base_component_t host_pml_component;
|
||||
mca_pml_base_module_t host_pml;
|
||||
size_t host_pml_req_recv_size;
|
||||
size_t host_pml_req_send_size;
|
||||
mca_pml_base_component_t host_pml_component;
|
||||
mca_pml_base_module_t host_pml;
|
||||
ompi_request_fns_t host_request_fns;
|
||||
size_t host_pml_req_recv_size;
|
||||
size_t host_pml_req_send_size;
|
||||
};
|
||||
typedef struct mca_pml_v_t mca_pml_v_t;
|
||||
|
||||
|
@ -93,6 +93,7 @@ static int mca_pml_v_component_close(void)
|
||||
/* Save original PML before making any changes */
|
||||
mca_pml_v.host_pml_component = mca_pml_base_selected_component;
|
||||
mca_pml_v.host_pml = mca_pml;
|
||||
mca_pml_v.host_request_fns = ompi_request_functions;
|
||||
|
||||
/* Do not load anything if no FT protocol is selected */
|
||||
if(! mca_vprotocol_base_include_list[0])
|
||||
@ -232,6 +233,8 @@ static int mca_pml_v_enable(bool enable)
|
||||
/* Disable */
|
||||
mca_pml = mca_pml_v.host_pml;
|
||||
mca_pml.pml_enable = mca_pml_v_enable;
|
||||
/* /!\ This is incorrect if another component also changed the requests */
|
||||
ompi_request_functions = mca_pml_v.host_request_fns;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,21 @@ int mca_vprotocol_base_parasite(void) {
|
||||
mca_pml.pml_start = mca_vprotocol.start;
|
||||
if(mca_vprotocol.dump)
|
||||
mca_pml.pml_dump = mca_vprotocol.dump;
|
||||
|
||||
if(mca_vprotocol.wait)
|
||||
ompi_request_functions.req_wait = mca_vprotocol.wait;
|
||||
if(mca_vprotocol.wait_all)
|
||||
ompi_request_functions.req_wait_all = mca_vprotocol.wait_all;
|
||||
if(mca_vprotocol.wait_any)
|
||||
ompi_request_functions.req_wait_any = mca_vprotocol.wait_any;
|
||||
if(mca_vprotocol.wait_some)
|
||||
ompi_request_functions.req_wait_some = mca_vprotocol.wait_some;
|
||||
if(mca_vprotocol.test)
|
||||
ompi_request_functions.req_test = mca_vprotocol.test;
|
||||
if(mca_vprotocol.test_all)
|
||||
ompi_request_functions.req_test_all = mca_vprotocol.test_all;
|
||||
if(mca_vprotocol.test_any)
|
||||
ompi_request_functions.req_test_any = mca_vprotocol.test_any;
|
||||
if(mca_vprotocol.test_some)
|
||||
ompi_request_functions.req_test_some = mca_vprotocol.test_some;
|
||||
return mca_vprotocol_base_request_parasite();
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "ompi_config.h"
|
||||
#include "opal/mca/mca.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/request/request.h"
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
@ -57,22 +58,31 @@ typedef mca_vprotocol_base_component_1_0_0_t mca_vprotocol_base_component_t;
|
||||
typedef struct mca_vprotocol_base_module_1_0_0_t
|
||||
{
|
||||
/* PML module stuff */
|
||||
mca_pml_base_module_add_procs_fn_t add_procs;
|
||||
mca_pml_base_module_del_procs_fn_t del_procs;
|
||||
mca_pml_base_module_enable_fn_t enable;
|
||||
mca_pml_base_module_progress_fn_t progress;
|
||||
mca_pml_base_module_add_comm_fn_t add_comm;
|
||||
mca_pml_base_module_del_comm_fn_t del_comm;
|
||||
mca_pml_base_module_irecv_init_fn_t irecv_init;
|
||||
mca_pml_base_module_irecv_fn_t irecv;
|
||||
mca_pml_base_module_recv_fn_t recv;
|
||||
mca_pml_base_module_isend_init_fn_t isend_init;
|
||||
mca_pml_base_module_isend_fn_t isend;
|
||||
mca_pml_base_module_send_fn_t send;
|
||||
mca_pml_base_module_iprobe_fn_t iprobe;
|
||||
mca_pml_base_module_probe_fn_t probe;
|
||||
mca_pml_base_module_start_fn_t start;
|
||||
mca_pml_base_module_dump_fn_t dump;
|
||||
mca_pml_base_module_add_procs_fn_t add_procs;
|
||||
mca_pml_base_module_del_procs_fn_t del_procs;
|
||||
mca_pml_base_module_enable_fn_t enable;
|
||||
mca_pml_base_module_progress_fn_t progress;
|
||||
mca_pml_base_module_add_comm_fn_t add_comm;
|
||||
mca_pml_base_module_del_comm_fn_t del_comm;
|
||||
mca_pml_base_module_irecv_init_fn_t irecv_init;
|
||||
mca_pml_base_module_irecv_fn_t irecv;
|
||||
mca_pml_base_module_recv_fn_t recv;
|
||||
mca_pml_base_module_isend_init_fn_t isend_init;
|
||||
mca_pml_base_module_isend_fn_t isend;
|
||||
mca_pml_base_module_send_fn_t send;
|
||||
mca_pml_base_module_iprobe_fn_t iprobe;
|
||||
mca_pml_base_module_probe_fn_t probe;
|
||||
mca_pml_base_module_start_fn_t start;
|
||||
mca_pml_base_module_dump_fn_t dump;
|
||||
/* Request wait/test stuff */
|
||||
ompi_request_test_fn_t test;
|
||||
ompi_request_test_any_fn_t test_any;
|
||||
ompi_request_test_all_fn_t test_all;
|
||||
ompi_request_test_some_fn_t test_some;
|
||||
ompi_request_wait_fn_t wait;
|
||||
ompi_request_wait_any_fn_t wait_any;
|
||||
ompi_request_wait_all_fn_t wait_all;
|
||||
ompi_request_wait_some_fn_t wait_some;
|
||||
|
||||
/* Custom requests classes to add extra data at end of pml requests */
|
||||
opal_class_t * req_recv_class;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user