1
1

SNAPC/CRCP/SSTORE: remove compiler warnings

This commit was SVN r30488.
Этот коммит содержится в:
Adrian Reber 2014-01-29 20:52:00 +00:00
родитель 5f95db3902
Коммит 7de34ea201
4 изменённых файлов: 19 добавлений и 48 удалений

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

@ -3301,7 +3301,7 @@ static int traffic_message_move(ompi_crcp_bkmrk_pml_traffic_message_ref_t *old_m
bool keep_active, bool keep_active,
bool remove) bool remove)
{ {
int ret, exit_status = OMPI_SUCCESS; int ret;
ompi_crcp_bkmrk_pml_message_content_ref_t *new_content = NULL, *prev_content = NULL; ompi_crcp_bkmrk_pml_message_content_ref_t *new_content = NULL, *prev_content = NULL;
ompi_request_t *request = NULL; ompi_request_t *request = NULL;
bool loc_already_drained = false; bool loc_already_drained = false;
@ -3366,7 +3366,7 @@ static int traffic_message_move(ompi_crcp_bkmrk_pml_traffic_message_ref_t *old_m
(*new_msg_ref)->proc_name.vpid = to_peer_ref->proc_name.vpid; (*new_msg_ref)->proc_name.vpid = to_peer_ref->proc_name.vpid;
} }
return exit_status; return ret;
} }
static int traffic_message_find_mark_persistent(ompi_crcp_bkmrk_pml_traffic_message_ref_t *msg_ref, static int traffic_message_find_mark_persistent(ompi_crcp_bkmrk_pml_traffic_message_ref_t *msg_ref,
@ -3474,7 +3474,7 @@ static int traffic_message_create_drain_message(bool post_drain,
{ {
ompi_crcp_bkmrk_pml_drain_message_ref_t *drain_msg_ref = NULL; ompi_crcp_bkmrk_pml_drain_message_ref_t *drain_msg_ref = NULL;
ompi_crcp_bkmrk_pml_message_content_ref_t *new_content = NULL, *prev_content = NULL; ompi_crcp_bkmrk_pml_message_content_ref_t *new_content = NULL, *prev_content = NULL;
int m_iter, m_total, ret; int m_iter, m_total;
*num_posted = 0; *num_posted = 0;
@ -4787,9 +4787,9 @@ static void drain_message_ack_cbfunc(int status,
} }
opal_output(mca_crcp_bkmrk_component.super.output_handle, opal_output(mca_crcp_bkmrk_component.super.output_handle,
"crcp:bkmrk: %s --> %s ERROR: Unable to match ACK to peer\n", "crcp:bkmrk: %s --> %s ERROR: Unable to match ACK to peer (%d)\n",
OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), OMPI_NAME_PRINT(OMPI_PROC_MY_NAME),
OMPI_NAME_PRINT(sender) ); OMPI_NAME_PRINT(sender), exit_status);
cleanup: cleanup:
return; return;
@ -5327,7 +5327,6 @@ static int recv_bookmarks(int peer_idx)
++total_recv_bookmarks; ++total_recv_bookmarks;
cleanup:
END_TIMER(CRCP_TIMER_CKPT_EX_PEER_R); END_TIMER(CRCP_TIMER_CKPT_EX_PEER_R);
/* JJH Doesn't make much sense to print this. The real bottleneck is always the send_bookmarks() */ /* JJH Doesn't make much sense to print this. The real bottleneck is always the send_bookmarks() */
/*DISPLAY_INDV_TIMER(CRCP_TIMER_CKPT_EX_PEER_R, peer_idx, 1);*/ /*DISPLAY_INDV_TIMER(CRCP_TIMER_CKPT_EX_PEER_R, peer_idx, 1);*/
@ -5368,13 +5367,14 @@ static void recv_bookmarks_cbfunc(int status,
peer_ref->matched_msgs_recvd = tmp_int; peer_ref->matched_msgs_recvd = tmp_int;
OPAL_OUTPUT_VERBOSE((15, mca_crcp_bkmrk_component.super.output_handle, OPAL_OUTPUT_VERBOSE((15, mca_crcp_bkmrk_component.super.output_handle,
"crcp:bkmrk: %s <-- %s Received bookmark (S[%6d] R[%6d]) vs. (S[%6d] R[%6d])\n", "crcp:bkmrk: %s <-- %s Received bookmark (S[%6d] R[%6d]) vs. (S[%6d] R[%6d]) (%d)\n",
OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), OMPI_NAME_PRINT(OMPI_PROC_MY_NAME),
OMPI_NAME_PRINT(sender), OMPI_NAME_PRINT(sender),
peer_ref->matched_msgs_sent, peer_ref->matched_msgs_sent,
peer_ref->matched_msgs_recvd, peer_ref->matched_msgs_recvd,
peer_ref->total_msgs_sent, peer_ref->total_msgs_sent,
peer_ref->total_msgs_recvd)); peer_ref->total_msgs_recvd,
exit_status));
cleanup: cleanup:
--total_recv_bookmarks; --total_recv_bookmarks;

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

@ -1861,7 +1861,7 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
opal_buffer_t* buffer, opal_buffer_t* buffer,
bool quick) bool quick)
{ {
int ret, exit_status = ORTE_SUCCESS; int ret;
orte_std_cntr_t count; orte_std_cntr_t count;
orte_jobid_t jobid; orte_jobid_t jobid;
int job_ckpt_state = ORTE_SNAPC_CKPT_STATE_NONE; int job_ckpt_state = ORTE_SNAPC_CKPT_STATE_NONE;
@ -1885,29 +1885,25 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &job_ckpt_state, &count, OPAL_INT))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &job_ckpt_state, &count, OPAL_INT))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
if( !quick ) { if( !quick ) {
if (ORTE_SUCCESS != (ret = orte_sstore.unpack_handle(sender, buffer, &ss_handle)) ) { if (ORTE_SUCCESS != (ret = orte_sstore.unpack_handle(sender, buffer, &ss_handle)) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
options = OBJ_NEW(opal_crs_base_ckpt_options_t); options = OBJ_NEW(opal_crs_base_ckpt_options_t);
if( ORTE_SUCCESS != (ret = orte_snapc_base_unpack_options(buffer, options)) ) { if( ORTE_SUCCESS != (ret = orte_snapc_base_unpack_options(buffer, options)) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
/* In this case we want to use the current_options that are cached /* In this case we want to use the current_options that are cached
* so that we do not have to send them every time. * so that we do not have to send them every time.
@ -1917,7 +1913,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &(loc_migrating), &count, OPAL_BOOL))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &(loc_migrating), &count, OPAL_BOOL))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
@ -1925,7 +1920,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &loc_num_procs, &count, OPAL_SIZE))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &loc_num_procs, &count, OPAL_SIZE))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
@ -1933,7 +1927,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &proc, &count, ORTE_NAME))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &proc, &count, ORTE_NAME))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
/* JJH: Update local info as needed */ /* JJH: Update local info as needed */
@ -1946,8 +1939,6 @@ static void snapc_full_process_job_update_cmd(orte_process_name_t* sender,
ss_handle, ss_handle,
global_snapshot.options) ) ) { global_snapshot.options) ) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup;
} }
cleanup: cleanup:

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

@ -767,7 +767,7 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
opal_buffer_t* buffer, opal_buffer_t* buffer,
bool quick) bool quick)
{ {
int ret, exit_status = ORTE_SUCCESS; int ret;
orte_jobid_t jobid; orte_jobid_t jobid;
int job_ckpt_state; int job_ckpt_state;
orte_std_cntr_t count; orte_std_cntr_t count;
@ -793,28 +793,24 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &job_ckpt_state, &count, OPAL_INT))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &job_ckpt_state, &count, OPAL_INT))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
if( !quick ) { if( !quick ) {
if (ORTE_SUCCESS != (ret = orte_sstore.unpack_handle(sender, buffer, &ss_handle)) ) { if (ORTE_SUCCESS != (ret = orte_sstore.unpack_handle(sender, buffer, &ss_handle)) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
options = OBJ_NEW(opal_crs_base_ckpt_options_t); options = OBJ_NEW(opal_crs_base_ckpt_options_t);
if( ORTE_SUCCESS != (ret = orte_snapc_base_unpack_options(buffer, options)) ) { if( ORTE_SUCCESS != (ret = orte_snapc_base_unpack_options(buffer, options)) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
/* In this case we want to use the current_local_options that are cached /* In this case we want to use the current_local_options that are cached
@ -825,7 +821,6 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &(loc_migrating), &count, OPAL_BOOL))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &(loc_migrating), &count, OPAL_BOOL))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
@ -835,7 +830,6 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &loc_num_procs, &count, OPAL_SIZE))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &loc_num_procs, &count, OPAL_SIZE))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
@ -843,7 +837,6 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
count = 1; count = 1;
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &proc_name, &count, ORTE_NAME))) { if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &proc_name, &count, ORTE_NAME))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
@ -871,8 +864,7 @@ static void snapc_full_local_process_job_update_cmd(orte_process_name_t* sender,
ss_handle, ss_handle,
local_global_snapshot.options)) ) { local_global_snapshot.options)) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret; return;
goto cleanup;
} }
cleanup: cleanup:
@ -1697,7 +1689,7 @@ static int snapc_full_local_end_ckpt_handshake(orte_snapc_full_app_snapshot_t *v
static void snapc_full_local_comm_read_event(int fd, short flags, void *arg) static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
{ {
int ret, exit_status = ORTE_SUCCESS; int ret;
orte_snapc_full_app_snapshot_t *vpid_snapshot = NULL; orte_snapc_full_app_snapshot_t *vpid_snapshot = NULL;
int ckpt_state; int ckpt_state;
int loc_min_state; int loc_min_state;
@ -1718,7 +1710,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
"Local) Error: Unable to read state from named pipe (%s). %d\n", "Local) Error: Unable to read state from named pipe (%s). %d\n",
vpid_snapshot->comm_pipe_r, ret); vpid_snapshot->comm_pipe_r, ret);
ORTE_ERROR_LOG(ORTE_ERROR); ORTE_ERROR_LOG(ORTE_ERROR);
exit_status = ORTE_ERROR;
goto cleanup; goto cleanup;
} }
@ -1736,7 +1727,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
ORTE_SNAPC_CKPT_STATE_INC_PREPED == loc_min_state ) { ORTE_SNAPC_CKPT_STATE_INC_PREPED == loc_min_state ) {
if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(ORTE_SNAPC_CKPT_STATE_INC_PREPED, false) ) ) { if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(ORTE_SNAPC_CKPT_STATE_INC_PREPED, false) ) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
} }
@ -1764,13 +1754,11 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
"Local) Read Event: Flush the modex cached data\n")); "Local) Read Event: Flush the modex cached data\n"));
if (OPAL_SUCCESS != (ret = opal_db.remove(NULL, NULL))) { if (OPAL_SUCCESS != (ret = opal_db.remove(NULL, NULL))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
orte_grpcomm.finalize(); orte_grpcomm.finalize();
if (ORTE_SUCCESS != (ret = orte_grpcomm.init())) { if (ORTE_SUCCESS != (ret = orte_grpcomm.init())) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
flushed_modex = true; flushed_modex = true;
@ -1783,8 +1771,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
/* JJH - The error path needs some more work */ /* JJH - The error path needs some more work */
if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(ORTE_SNAPC_CKPT_STATE_ERROR, true) ) ) { if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(ORTE_SNAPC_CKPT_STATE_ERROR, true) ) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup;
} }
goto cleanup; goto cleanup;
} }
@ -1810,7 +1796,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
if( ORTE_SNAPC_GLOBAL_COORD_TYPE != (orte_snapc_coord_type & ORTE_SNAPC_GLOBAL_COORD_TYPE)) { if( ORTE_SNAPC_GLOBAL_COORD_TYPE != (orte_snapc_coord_type & ORTE_SNAPC_GLOBAL_COORD_TYPE)) {
if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(loc_min_state, false) ) ) { if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(loc_min_state, false) ) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
} }
@ -1829,7 +1814,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
if( sstore_local_procs_finished ) { if( sstore_local_procs_finished ) {
if( ORTE_SUCCESS != (ret = orte_snapc_full_local_reset_coord()) ) { if( ORTE_SUCCESS != (ret = orte_snapc_full_local_reset_coord()) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
} }
@ -1839,7 +1823,6 @@ static void snapc_full_local_comm_read_event(int fd, short flags, void *arg)
if( ORTE_SNAPC_GLOBAL_COORD_TYPE == (orte_snapc_coord_type & ORTE_SNAPC_GLOBAL_COORD_TYPE)) { if( ORTE_SNAPC_GLOBAL_COORD_TYPE == (orte_snapc_coord_type & ORTE_SNAPC_GLOBAL_COORD_TYPE)) {
if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(loc_min_state, false) ) ) { if( ORTE_SUCCESS != (ret = snapc_full_local_update_coord(loc_min_state, false) ) ) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
exit_status = ret;
goto cleanup; goto cleanup;
} }
} }

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

@ -143,9 +143,6 @@ static void sstore_central_global_recv(int status,
opal_buffer_t* buffer, opal_buffer_t* buffer,
orte_rml_tag_t tag, orte_rml_tag_t tag,
void* cbdata); void* cbdata);
static void sstore_central_global_process_cmd(int fd,
short event,
void *cbdata);
static int process_local_pull(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_central_global_snapshot_info_t *handle_info); static int process_local_pull(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_central_global_snapshot_info_t *handle_info);
static int process_local_push(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_central_global_snapshot_info_t *handle_info); static int process_local_push(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_central_global_snapshot_info_t *handle_info);