Remove some old [and unused] code.
This commit was SVN r15887.
Этот коммит содержится в:
родитель
b18129c260
Коммит
51e726ee8c
@ -1295,152 +1295,6 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info,
|
|||||||
return mqs_ok;
|
return mqs_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/***********************************************************************
|
|
||||||
* Handle the unexpected queue and the pending receive queue.
|
|
||||||
* They're very similar.
|
|
||||||
*/
|
|
||||||
static int fetch_receive (mqs_process *proc, mpi_process_info *p_info,
|
|
||||||
mqs_pending_operation *res, int look_for_user_buffer)
|
|
||||||
{
|
|
||||||
mqs_image * image = mqs_get_image (proc);
|
|
||||||
mpi_image_info *i_info = (mpi_image_info *)mqs_get_image_info (image);
|
|
||||||
communicator_t *comm = p_info->current_communicator;
|
|
||||||
mqs_tword_t wanted_context = comm->recv_context;
|
|
||||||
mqs_taddr_t base = fetch_pointer (proc, p_info->next_msg, p_info);
|
|
||||||
|
|
||||||
while (base != 0) { /* Well, there's a queue, at least ! */
|
|
||||||
mqs_tword_t actual_context = fetch_int (proc, base + i_info->context_id_offs, p_info);
|
|
||||||
|
|
||||||
if (actual_context == wanted_context) { /* Found a good one */
|
|
||||||
mqs_tword_t tag = fetch_int (proc, base + i_info->tag_offs, p_info);
|
|
||||||
mqs_tword_t tagmask = fetch_int (proc, base + i_info->tagmask_offs, p_info);
|
|
||||||
mqs_tword_t lsrc = fetch_int (proc, base + i_info->lsrc_offs, p_info);
|
|
||||||
mqs_tword_t srcmask = fetch_int (proc, base + i_info->srcmask_offs, p_info);
|
|
||||||
mqs_taddr_t ptr = fetch_pointer (proc, base + i_info->ptr_offs, p_info);
|
|
||||||
|
|
||||||
/* Fetch the fields from the MPIR_RHANDLE */
|
|
||||||
int is_complete = fetch_int (proc, ptr + i_info->is_complete_offs, p_info);
|
|
||||||
mqs_taddr_t buf = fetch_pointer (proc, ptr + i_info->buf_offs, p_info);
|
|
||||||
mqs_tword_t len = fetch_int (proc, ptr + i_info->len_offs, p_info);
|
|
||||||
mqs_tword_t count = fetch_int (proc, ptr + i_info->count_offs, p_info);
|
|
||||||
|
|
||||||
/* If we don't have start, then use buf instead... */
|
|
||||||
mqs_taddr_t start;
|
|
||||||
if (i_info->start_offs < 0)
|
|
||||||
start = buf;
|
|
||||||
else
|
|
||||||
start = fetch_pointer (proc, ptr + i_info->start_offs, p_info);
|
|
||||||
|
|
||||||
/* Hurrah, we should now be able to fill in all the necessary fields in the
|
|
||||||
* result !
|
|
||||||
*/
|
|
||||||
res->status = is_complete ? mqs_st_complete : mqs_st_pending; /* We can't discern matched */
|
|
||||||
if (srcmask == 0) {
|
|
||||||
res->desired_local_rank = -1;
|
|
||||||
res->desired_global_rank = -1;
|
|
||||||
} else {
|
|
||||||
res->desired_local_rank = lsrc;
|
|
||||||
res->desired_global_rank = translate (comm->group, lsrc);
|
|
||||||
|
|
||||||
}
|
|
||||||
res->tag_wild = (tagmask == 0);
|
|
||||||
res->desired_tag = tag;
|
|
||||||
|
|
||||||
if (look_for_user_buffer) {
|
|
||||||
res->system_buffer = FALSE;
|
|
||||||
res->buffer = buf;
|
|
||||||
res->desired_length = len;
|
|
||||||
} else {
|
|
||||||
res->system_buffer = TRUE;
|
|
||||||
/* Correct an oddity. If the buffer length is zero then no buffer
|
|
||||||
* is allocated, but the descriptor is left with random data.
|
|
||||||
*/
|
|
||||||
if (count == 0)
|
|
||||||
start = 0;
|
|
||||||
|
|
||||||
res->buffer = start;
|
|
||||||
res->desired_length = count;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_complete) { /* Fill in the actual results, rather than what we were looking for */
|
|
||||||
mqs_tword_t mpi_source = fetch_int (proc, ptr + i_info->MPI_SOURCE_offs, p_info);
|
|
||||||
mqs_tword_t mpi_tag = fetch_int (proc, ptr + i_info->MPI_TAG_offs, p_info);
|
|
||||||
|
|
||||||
res->actual_length = count;
|
|
||||||
res->actual_tag = mpi_tag;
|
|
||||||
res->actual_local_rank = mpi_source;
|
|
||||||
res->actual_global_rank= translate (comm->group, mpi_source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Don't forget to step the queue ! */
|
|
||||||
p_info->next_msg = base + i_info->next_offs;
|
|
||||||
return mqs_ok;
|
|
||||||
} else { /* Try the next one */
|
|
||||||
base = fetch_pointer (proc, base + i_info->next_offs, p_info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p_info->next_msg = 0;
|
|
||||||
return mqs_end_of_list;
|
|
||||||
} /* fetch_receive */
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Handle the send queue, somewhat different.
|
|
||||||
*/
|
|
||||||
static int fetch_send (mqs_process *proc, mpi_process_info *p_info,
|
|
||||||
mqs_pending_operation *res)
|
|
||||||
{
|
|
||||||
mqs_image * image = mqs_get_image (proc);
|
|
||||||
mpi_image_info *i_info = (mpi_image_info *)mqs_get_image_info (image);
|
|
||||||
communicator_t *comm = p_info->current_communicator;
|
|
||||||
mqs_taddr_t base = fetch_pointer (proc, p_info->next_msg, p_info);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mark all send requests as non blocking. In Open MPI we are able to make
|
|
||||||
* a difference between blocking and non blocking by looking into the
|
|
||||||
* type field, but I'll keep this for later.
|
|
||||||
*/
|
|
||||||
strcpy( (char *)res->extra_text[0], "Non-blocking send" );
|
|
||||||
res->extra_text[1][0] = 0;
|
|
||||||
|
|
||||||
while (base != 0) { /* Well, there's a queue, at least ! */
|
|
||||||
/* Check if it's one we're interested in ? */
|
|
||||||
mqs_taddr_t commp = fetch_pointer (proc, base+i_info->db_comm_offs, p_info);
|
|
||||||
int recv_ctx = fetch_int (proc, commp+i_info->recv_context_offs, p_info);
|
|
||||||
|
|
||||||
mqs_taddr_t next = base+i_info->db_next_offs;
|
|
||||||
|
|
||||||
if (recv_ctx == comm->recv_context) { /* Found one */
|
|
||||||
mqs_tword_t target = fetch_int (proc, base+i_info->db_target_offs, p_info);
|
|
||||||
mqs_tword_t tag = fetch_int (proc, base+i_info->db_tag_offs, p_info);
|
|
||||||
mqs_tword_t length = fetch_int (proc, base+i_info->db_byte_length_offs, p_info);
|
|
||||||
mqs_taddr_t data = fetch_pointer (proc, base+i_info->db_data_offs, p_info);
|
|
||||||
mqs_taddr_t shandle= fetch_pointer (proc, base+i_info->db_shandle_offs, p_info);
|
|
||||||
mqs_tword_t complete=fetch_int (proc, shandle+i_info->is_complete_offs, p_info);
|
|
||||||
|
|
||||||
/* Ok, fill in the results */
|
|
||||||
res->status = complete ? mqs_st_complete : mqs_st_pending; /* We can't discern matched */
|
|
||||||
res->actual_local_rank = res->desired_local_rank = target;
|
|
||||||
res->actual_global_rank= res->desired_global_rank= translate (comm->group, target);
|
|
||||||
res->tag_wild = FALSE;
|
|
||||||
res->actual_tag = res->desired_tag = tag;
|
|
||||||
res->desired_length = res->actual_length = length;
|
|
||||||
res->system_buffer = FALSE;
|
|
||||||
res->buffer = data;
|
|
||||||
|
|
||||||
p_info->next_msg = next;
|
|
||||||
return mqs_ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
base = fetch_pointer (proc, next, p_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
p_info->next_msg = 0;
|
|
||||||
return mqs_end_of_list;
|
|
||||||
} /* fetch_send */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Setup to iterate over pending operations
|
* Setup to iterate over pending operations
|
||||||
*/
|
*/
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user