1
1

add a pointer to the sending ptl. Used to process acks. Can't assume

that ptl address on send and receive side is the same.  This is set
once by the constructor.  Can't do this on the recv side, since a
fragment can be used for multiple destinations.

This commit was SVN r3314.
Этот коммит содержится в:
Rich Graham 2004-10-25 18:02:46 +00:00
родитель 826b5ebdf6
Коммит de49778184
3 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -324,9 +324,6 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp)
header_ptr = (mca_ptl_sm_frag_t *)( (char *)header_ptr+ header_ptr = (mca_ptl_sm_frag_t *)( (char *)header_ptr+
mca_ptl_sm_component.sm_offset); mca_ptl_sm_component.sm_offset);
/* set the owning ptl */
header_ptr->super.frag_base.frag_owner=(mca_ptl_base_module_t *)
(&mca_ptl_sm);
/* figure out what type of message this is */ /* figure out what type of message this is */
switch switch
@ -334,6 +331,9 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp)
{ {
case MCA_PTL_HDR_TYPE_MATCH: case MCA_PTL_HDR_TYPE_MATCH:
/* set the owning ptl */
header_ptr->super.frag_base.frag_owner=
(mca_ptl_base_module_t *) (&mca_ptl_sm);
/* attempt match */ /* attempt match */
matching_header= &(header_ptr->super.frag_base. matching_header= &(header_ptr->super.frag_base.
frag_header.hdr_match); frag_header.hdr_match);
@ -349,6 +349,9 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp)
break; break;
case MCA_PTL_HDR_TYPE_FRAG: case MCA_PTL_HDR_TYPE_FRAG:
/* set the owning ptl */
header_ptr->super.frag_base.frag_owner=
(mca_ptl_base_module_t *) (&mca_ptl_sm);
/* second and beyond fragment - just need to deliver /* second and beyond fragment - just need to deliver
* the data, and ack */ * the data, and ack */
mca_ptl_sm_matched((mca_ptl_base_module_t *)&mca_ptl_sm, mca_ptl_sm_matched((mca_ptl_base_module_t *)&mca_ptl_sm,
@ -364,8 +367,9 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp)
* the shared memory buffers */ * the shared memory buffers */
base_send_req=header_ptr->super.frag_base.frag_header. base_send_req=header_ptr->super.frag_base.frag_header.
hdr_frag.hdr_src_ptr.pval; hdr_frag.hdr_src_ptr.pval;
((mca_ptl_base_recv_frag_t *)header_ptr)-> header_ptr->send_ptl->ptl_send_progress(
frag_base.frag_owner->ptl_send_progress( /*((mca_ptl_base_recv_frag_t *)header_ptr)->
frag_base.frag_owner->ptl_send_progress(*/
(mca_ptl_base_module_t *)&mca_ptl_sm, (mca_ptl_base_module_t *)&mca_ptl_sm,
base_send_req, base_send_req,
header_ptr->super.frag_base.frag_size); header_ptr->super.frag_base.frag_size);

Просмотреть файл

@ -44,6 +44,9 @@ static void mca_ptl_sm_first_frag_construct(mca_ptl_sm_frag_t* frag)
/* set local rank */ /* set local rank */
frag->queue_index=mca_ptl_sm_component.my_smp_rank; frag->queue_index=mca_ptl_sm_component.my_smp_rank;
/* set pointer to the sending ptl */
frag->send_ptl=(mca_ptl_base_module_t *)(&mca_ptl_sm);
/* set buffer pointer */ /* set buffer pointer */
ptr=((char *)frag)+sizeof(mca_ptl_sm_frag_t)+ ptr=((char *)frag)+sizeof(mca_ptl_sm_frag_t)+
mca_ptl_sm_component.fragment_alignment; mca_ptl_sm_component.fragment_alignment;
@ -77,6 +80,9 @@ static void mca_ptl_sm_second_frag_construct(mca_ptl_sm_frag_t* frag)
/* set local rank */ /* set local rank */
frag->queue_index=mca_ptl_sm_component.my_smp_rank; frag->queue_index=mca_ptl_sm_component.my_smp_rank;
/* set pointer to the sending ptl */
frag->send_ptl=(mca_ptl_base_module_t *)(&mca_ptl_sm);
/* set buffer pointer */ /* set buffer pointer */
ptr=((char *)frag)+sizeof(mca_ptl_sm_frag_t)+ ptr=((char *)frag)+sizeof(mca_ptl_sm_frag_t)+
mca_ptl_sm_component.fragment_alignment; mca_ptl_sm_component.fragment_alignment;

Просмотреть файл

@ -34,6 +34,7 @@ struct mca_ptl_sm_frag_t {
size_t buff_length; /**< size of buffer */ size_t buff_length; /**< size of buffer */
int queue_index; /**< local process index, cached for fast int queue_index; /**< local process index, cached for fast
acking */ acking */
struct mca_ptl_base_module_t* send_ptl; /**< PTL that is selected for first fragment */
void *buff; /**< pointer to buffer */ void *buff; /**< pointer to buffer */
void *buff_offset_from_segment_base; /**< pointer to buffer, void *buff_offset_from_segment_base; /**< pointer to buffer,
relative to base of the relative to base of the