* checkpoint. Nothing works, as I just realized my entire design was
based around PTL_MD_MAX_SIZE, which apparently isn't implemented in Cray's Portals implementation. Time to rethink that design :/ This commit was SVN r5576.
Этот коммит содержится в:
родитель
07e4cf840f
Коммит
cffb3d031e
@ -144,17 +144,9 @@ AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
[Use the Red Storm implementation or Portals])
|
||||
AM_CONDITIONAL([PTL_PORTALS_REDSTORM], [test "$PTL_PORTALS_REDSTORM" = "1"])
|
||||
|
||||
MCA_PTL_PORTALS_CONFIG_VAL([first-frag-table-id],
|
||||
[PTL_PORTALS_FIRST_FRAG_TABLE_ID], [1],
|
||||
[Portals table id to use for first fragment receive queue])
|
||||
|
||||
MCA_PTL_PORTALS_CONFIG_VAL([rndv-frag-table-id],
|
||||
[PTL_PORTALS_RNDV_FRAG_TABLE_ID], [2],
|
||||
[Portals table id to use for rndv fragment receive queue])
|
||||
|
||||
MCA_PTL_PORTALS_CONFIG_VAL([ack-table-id],
|
||||
[PTL_PORTALS_ACK_TABLE_ID], [3],
|
||||
[Portals table id to use for ack queue])
|
||||
MCA_PTL_PORTALS_CONFIG_VAL([frag-table-id],
|
||||
[PTL_PORTALS_FRAG_TABLE_ID], [1],
|
||||
[Portals table id to use for fragment receive queue])
|
||||
|
||||
MCA_PTL_PORTALS_CONFIG_VAL([debug-level],
|
||||
[PTL_PORTALS_DEFAULT_DEBUG_LEVEL], [1000],
|
||||
|
@ -59,10 +59,6 @@ mca_ptl_portals_module_t mca_ptl_portals_module = {
|
||||
NULL, /* PTL stack */
|
||||
NULL /* PML use */
|
||||
},
|
||||
|
||||
0, /* num first frag mds */
|
||||
0, /* size first frag md */
|
||||
0, /* ni handle */
|
||||
};
|
||||
|
||||
|
||||
@ -118,8 +114,82 @@ mca_ptl_portals_add_procs(struct mca_ptl_base_module_t* ptl,
|
||||
|
||||
int
|
||||
mca_ptl_portals_module_enable(struct mca_ptl_portals_module_t *ptl,
|
||||
int value)
|
||||
int enable)
|
||||
{
|
||||
/* need to do all the portals cleanup code here... */
|
||||
int i, ret;
|
||||
|
||||
if (enable == 0) {
|
||||
/* disable the unexpected receive queue */
|
||||
/* BWB - not really sure how - would have to track a lot more data... */
|
||||
} else {
|
||||
/* only do all the hard stuff if we haven't created the queue */
|
||||
if (ptl->frag_queues_created) return OMPI_SUCCESS;
|
||||
|
||||
/* create an event queue, then the match entries for the match
|
||||
entries */
|
||||
ret = PtlEQAlloc(ptl->ni_handle,
|
||||
ptl->first_frag_queue_size,
|
||||
PTL_EQ_HANDLER_NONE,
|
||||
&(ptl->frag_receive_eq_handle));
|
||||
|
||||
for (i = 0 ; i < ptl->first_frag_num_entries ; ++i) {
|
||||
ret = ptl_portals_new_frag_entry(ptl);
|
||||
if (OMPI_SUCCESS != ret) return ret;
|
||||
ptl->frag_queues_created = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ptl_portals_new_frag_entry(struct mca_ptl_portals_module_t *ptl)
|
||||
{
|
||||
ptl_handle_me_t me_handle;
|
||||
ptl_handle_md_t md_handle;
|
||||
ptl_md_t md;
|
||||
void *mem;
|
||||
int ret;
|
||||
ptl_process_id_t proc = { PTL_NID_ANY, PTL_PID_ANY };
|
||||
|
||||
|
||||
/* create match entry */
|
||||
ret = PtlMEAttach(ptl->ni_handle,
|
||||
PTL_PORTALS_FRAG_TABLE_ID,
|
||||
proc,
|
||||
0, /* match bits */
|
||||
0, /* ignore bits */
|
||||
PTL_UNLINK,
|
||||
PTL_INS_AFTER,
|
||||
&me_handle);
|
||||
if (PTL_OK != ret) return OMPI_ERROR;
|
||||
|
||||
/* and some memory */
|
||||
mem = malloc(ptl->first_frag_entry_size);
|
||||
if (NULL == mem) {
|
||||
PtlMEUnlink(me_handle);
|
||||
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* and the memory descriptor */
|
||||
md.start = mem;
|
||||
md.length = ptl->first_frag_entry_size;
|
||||
md.threshold = PTL_MD_THRESH_INF;
|
||||
md.max_size = md.length - ptl->super.ptl_first_frag_size;
|
||||
md.options = PTL_MD_OP_PUT | PTL_MD_MAX_SIZE;
|
||||
md.user_ptr = NULL;
|
||||
md.eventq = ptl->frag_receive_eq_handle;
|
||||
|
||||
ret = PtlMDAttach(me_handle,
|
||||
md,
|
||||
PTL_UNLINK,
|
||||
&md_handle);
|
||||
if (PTL_OK != ret) {
|
||||
PtlMEUnlink(me_handle);
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -148,9 +148,16 @@ struct mca_ptl_portals_module_t {
|
||||
mca_ptl_base_module_t super; /**< base PTL module interface */
|
||||
|
||||
/* number of mds for first frags */
|
||||
int first_frag_num_mds;
|
||||
int first_frag_num_entries;
|
||||
/* size of each md for first frags */
|
||||
int first_frag_md_size;
|
||||
int first_frag_entry_size;
|
||||
/* size for event queue */
|
||||
int first_frag_queue_size;
|
||||
|
||||
/* frag receive data */
|
||||
bool frag_queues_created;
|
||||
/* frag receive event queue */
|
||||
ptl_handle_eq_t frag_receive_eq_handle;
|
||||
|
||||
/** our portals network interface */
|
||||
ptl_handle_ni_t ni_handle;
|
||||
@ -369,5 +376,6 @@ extern int mca_ptl_portals_send_continue(
|
||||
|
||||
extern int mca_ptl_portals_module_enable(struct mca_ptl_portals_module_t *ptl,
|
||||
int value);
|
||||
extern int ptl_portals_new_frag_entry(struct mca_ptl_portals_module_t *ptl);
|
||||
|
||||
#endif
|
||||
|
@ -139,10 +139,10 @@ mca_ptl_portals_component_open(void)
|
||||
mca_ptl_portals_param_register_int("rndv_frag_max_size",
|
||||
PTL_PORTALS_DEFAULT_RNDV_FRAG_MAX_SIZE);
|
||||
|
||||
mca_ptl_portals_module.first_frag_num_mds =
|
||||
mca_ptl_portals_module.first_frag_num_entries =
|
||||
mca_ptl_portals_param_register_int("first_frag_num_entries",
|
||||
PTL_PORTALS_DEFAULT_FIRST_FRAG_NUM_ENTRIES);
|
||||
mca_ptl_portals_module.first_frag_md_size =
|
||||
mca_ptl_portals_module.first_frag_entry_size =
|
||||
mca_ptl_portals_param_register_int("first_frag_entry_size",
|
||||
PTL_PORTALS_DEFAULT_FIRST_FRAG_ENTRY_SIZE);
|
||||
|
||||
@ -193,7 +193,7 @@ mca_ptl_portals_component_init(int *num_ptls,
|
||||
*num_ptls = 0;
|
||||
|
||||
/* BWB - no support for progress threads */
|
||||
if (enable_progress_threads) return NULL;
|
||||
if (enable_progress_threads || enable_mpi_threads) return NULL;
|
||||
|
||||
ompi_output_verbose(100, mca_ptl_portals_component.portals_output,
|
||||
"mca_ptl_portals_component_init()");
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user