1
1

Use the right event base if threads are disabled. Always update the seq num

This commit was SVN r24034.
Этот коммит содержится в:
Ralph Castain 2010-11-10 21:26:04 +00:00
родитель c74df90729
Коммит 57257ab9b4
2 изменённых файлов: 9 добавлений и 5 удалений

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

@ -114,7 +114,6 @@ int orte_rmcast_base_open(void)
OBJ_CONSTRUCT(&orte_rmcast_base.channels, opal_list_t);
OBJ_CONSTRUCT(&orte_rmcast_base.msg_list, opal_list_t);
orte_rmcast_base.event_base = opal_event_base_create();
OBJ_CONSTRUCT(&orte_rmcast_base.recv_thread, opal_thread_t);
OBJ_CONSTRUCT(&orte_rmcast_base.recv_ctl, orte_thread_ctl_t);
OBJ_CONSTRUCT(&orte_rmcast_base.recv_process, opal_thread_t);
@ -136,6 +135,12 @@ int orte_rmcast_base_open(void)
false, false, (int)false, &value);
orte_rmcast_base.enable_progress_thread = OPAL_INT_TO_BOOL(value);
if (orte_rmcast_base.enable_progress_thread) {
orte_rmcast_base.event_base = opal_event_base_create();
} else {
orte_rmcast_base.event_base = opal_event_base;
}
/* public multicast channel for this job */
mca_base_param_reg_string_name("rmcast", "base_multicast_network",
"Network to use for multicast xmissions [link (default) | site | org | global | tuple-addr]",

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

@ -202,6 +202,7 @@ int orte_rmcast_base_process_msg(orte_mcast_msg_event_t *msg)
"%s rmcast:base:process_recv delivering message to channel %d tag %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ptr->channel, (int)tag));
ptr->seq_num = recvd_seq_num;
/* we have a recv - unpack the data */
if (0 == flag) {
/* get the number of iovecs in the buffer */
@ -236,7 +237,7 @@ int orte_rmcast_base_process_msg(orte_mcast_msg_event_t *msg)
OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output,
"%s rmcast:base:process_recv delivering iovecs to channel %d tag %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ptr->channel, (int)tag));
ptr->cbfunc_iovec(ORTE_SUCCESS, ptr->channel, recvd_seq_num, tag,
ptr->cbfunc_iovec(ORTE_SUCCESS, ptr->channel, ptr->seq_num, tag,
&name, iovec_array, iovec_count, ptr->cbdata);
/* if it isn't persistent, remove it */
if (!(ORTE_RMCAST_PERSISTENT & ptr->flags)) {
@ -254,7 +255,6 @@ int orte_rmcast_base_process_msg(orte_mcast_msg_event_t *msg)
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
goto cleanup;
}
ptr->seq_num = recvd_seq_num;
/* copy over the iovec array since it will be released by
* the blocking recv
*/
@ -273,7 +273,7 @@ int orte_rmcast_base_process_msg(orte_mcast_msg_event_t *msg)
OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output,
"%s rmcast:base:process_recv delivering buffer to channel %d tag %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ptr->channel, (int)tag));
ptr->cbfunc_buffer(ORTE_SUCCESS, ptr->channel, recvd_seq_num, tag,
ptr->cbfunc_buffer(ORTE_SUCCESS, ptr->channel, ptr->seq_num, tag,
&name, msg->buf, ptr->cbdata);
/* if it isn't persistent, remove it */
if (!(ORTE_RMCAST_PERSISTENT & ptr->flags)) {
@ -294,7 +294,6 @@ int orte_rmcast_base_process_msg(orte_mcast_msg_event_t *msg)
OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output,
"%s rmcast:base:process_recv copying buffer for blocking recv",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
ptr->seq_num = recvd_seq_num;
/* copy the buffer across since it will be released
* by the blocking recv
*/