Changeset 4888
- Timestamp:
- 07/02/09 09:58:01 (5 months ago)
- Location:
- mpich2/trunk
- Files:
-
- 18 modified
-
confdb/aclocal_cc.m4 (modified) (1 diff)
-
src/include/pmi.h (modified) (1 diff)
-
src/mpi/datatype/type_create_hindexed.c (modified) (2 diffs)
-
src/mpi/datatype/type_create_struct.c (modified) (2 diffs)
-
src/mpi/datatype/type_hindexed.c (modified) (2 diffs)
-
src/mpi/datatype/type_indexed.c (modified) (2 diffs)
-
src/mpi/errhan/dynerrutil.c (modified) (1 diff)
-
src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_impl.h (modified) (5 diffs)
-
src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_inline.h (modified) (3 diffs)
-
src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/socksm.c (modified) (8 diffs)
-
src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_lmt.c (modified) (2 diffs)
-
src/mpid/ch3/channels/nemesis/src/ch3_finalize.c (modified) (1 diff)
-
src/mpid/ch3/channels/nemesis/src/ch3_init.c (modified) (1 diff)
-
src/mpid/ch3/channels/nemesis/src/ch3i_comm.c (modified) (1 diff)
-
src/mpid/ch3/src/ch3u_eager.c (modified) (5 diffs)
-
src/mpid/ch3/src/ch3u_rma_ops.c (modified) (1 diff)
-
src/pmi/simple/simple_pmi.c (modified) (2 diffs)
-
src/util/dbg/dbg_printf.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mpich2/trunk/confdb/aclocal_cc.m4
r4878 r4888 1127 1127 -Waggregate-return 1128 1128 -Wold-style-definition 1129 -Wmissing-noreturn1130 1129 -Wno-multichar 1131 1130 -Wno-deprecated-declarations -
mpich2/trunk/src/include/pmi.h
r4377 r4888 633 633 typedef struct PMI_keyval_t 634 634 { 635 c har * key;635 const char * key; 636 636 char * val; 637 637 } PMI_keyval_t; -
mpich2/trunk/src/mpi/datatype/type_create_hindexed.c
r3177 r4888 74 74 MPID_BEGIN_ERROR_CHECKS; 75 75 { 76 int i;76 int j; 77 77 MPID_Datatype *datatype_ptr = NULL; 78 78 … … 91 91 MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno); 92 92 } 93 for ( i=0; i < count; i++) {94 MPIR_ERRTEST_ARGNEG(blocklengths[ i], "blocklen", mpi_errno);93 for (j=0; j < count; j++) { 94 MPIR_ERRTEST_ARGNEG(blocklengths[j], "blocklen", mpi_errno); 95 95 } 96 96 if (mpi_errno != MPI_SUCCESS) goto fn_fail; -
mpich2/trunk/src/mpi/datatype/type_create_struct.c
r3177 r4888 75 75 MPID_BEGIN_ERROR_CHECKS; 76 76 { 77 int i;77 int j; 78 78 MPID_Datatype *datatype_ptr = NULL; 79 79 … … 88 88 } 89 89 90 for ( i=0; i < count; i++) {91 MPIR_ERRTEST_ARGNEG(array_of_blocklengths[ i], "blocklen", mpi_errno);92 MPIR_ERRTEST_DATATYPE(array_of_types[ i], "datatype[i]",90 for (j=0; j < count; j++) { 91 MPIR_ERRTEST_ARGNEG(array_of_blocklengths[j], "blocklen", mpi_errno); 92 MPIR_ERRTEST_DATATYPE(array_of_types[j], "datatype[j]", 93 93 mpi_errno); 94 94 if (mpi_errno != MPI_SUCCESS) goto fn_fail; 95 95 96 if (array_of_types[ i] != MPI_DATATYPE_NULL && HANDLE_GET_KIND(array_of_types[i]) != HANDLE_KIND_BUILTIN) {97 MPID_Datatype_get_ptr(array_of_types[ i], datatype_ptr);96 if (array_of_types[j] != MPI_DATATYPE_NULL && HANDLE_GET_KIND(array_of_types[j]) != HANDLE_KIND_BUILTIN) { 97 MPID_Datatype_get_ptr(array_of_types[j], datatype_ptr); 98 98 MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno); 99 99 if (mpi_errno != MPI_SUCCESS) goto fn_fail; -
mpich2/trunk/src/mpi/datatype/type_hindexed.c
r3177 r4888 99 99 MPID_BEGIN_ERROR_CHECKS; 100 100 { 101 int i;101 int j; 102 102 MPID_Datatype *datatype_ptr = NULL; 103 103 … … 114 114 } 115 115 /* verify that all blocklengths are >= 0 */ 116 for ( i=0; i < count; i++) {117 MPIR_ERRTEST_ARGNEG(blocklens[ i], "blocklen", mpi_errno);116 for (j=0; j < count; j++) { 117 MPIR_ERRTEST_ARGNEG(blocklens[j], "blocklen", mpi_errno); 118 118 } 119 119 } -
mpich2/trunk/src/mpi/datatype/type_indexed.c
r3177 r4888 97 97 MPID_BEGIN_ERROR_CHECKS; 98 98 { 99 int i;99 int j; 100 100 MPID_Datatype *datatype_ptr = NULL; 101 101 … … 112 112 } 113 113 /* verify that all blocklengths are >= 0 */ 114 for ( i=0; i < count; i++) {115 MPIR_ERRTEST_ARGNEG(blocklens[ i], "blocklen", mpi_errno);114 for (j=0; j < count; j++) { 115 MPIR_ERRTEST_ARGNEG(blocklens[j], "blocklen", mpi_errno); 116 116 } 117 117 } -
mpich2/trunk/src/mpi/errhan/dynerrutil.c
r3717 r4888 195 195 This routine should be run within a SINGLE_CS in the multithreaded case. 196 196 */ 197 int MPIR_Err_add_class( )197 int MPIR_Err_add_class(void) 198 198 { 199 199 int new_class; -
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_impl.h
r4707 r4888 105 105 MPID_nem_pkt_lmt_cookie_t lmt_cookie; 106 106 } MPIDI_CH3_nem_pkt_t; 107 108 109 /* MPID_PKT_DECL_CAST(pkt_u_var, s_pkt_type, s_pkt_p_var) 110 To avoid strict aliasing warnings when doing something like: 111 pkt_t upkt; 112 rts_pkt_t * const rts_pkt = (rts_pkt_t *)&upkt; 113 this macro does the same but through a union. 114 115 pkt_u_var -- variable name of the packet union 116 s_pkt_type -- type of the sub-packet 117 s_pkt_p_var -- variable name of the sub-packet pointer 118 */ 119 #define MPID_PKT_DECL_CAST(pkt_u_var, s_pkt_type, s_pkt_p_var) \ 120 union \ 121 { \ 122 MPIDI_CH3_Pkt_t p; \ 123 s_pkt_type s; \ 124 } pkt_u_var; \ 125 s_pkt_type * const s_pkt_p_var = &pkt_u_var.s 107 126 108 127 … … 153 172 154 173 #define MPID_nem_lmt_send_CTS(vc, rreq, r_cookie_buf, r_cookie_len) do { \ 155 MPIDI_CH3_Pkt_t _upkt; \ 156 MPID_nem_pkt_lmt_cts_t * const _cts_pkt = (MPID_nem_pkt_lmt_cts_t *)&_upkt; \ 174 MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_cts_t, _cts_pkt); \ 157 175 MPID_Request *_cts_req; \ 158 176 MPID_IOV _iov[2]; \ … … 187 205 { 188 206 int mpi_errno = MPI_SUCCESS; 189 MPIDI_CH3_Pkt_t _upkt; 190 MPID_nem_pkt_lmt_cookie_t * const cookie_pkt = (MPID_nem_pkt_lmt_cookie_t *)&_upkt; 207 MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_cookie_t, cookie_pkt); 191 208 MPID_Request *cookie_req; 192 209 MPID_IOV iov[2]; … … 232 249 233 250 #define MPID_nem_lmt_send_DONE(vc, rreq) do { \ 234 MPIDI_CH3_Pkt_t _upkt; \ 235 MPID_nem_pkt_lmt_done_t * const _done_pkt = (MPID_nem_pkt_lmt_done_t *)&_upkt; \ 251 MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_done_t, _done_pkt); \ 236 252 MPID_Request *_done_req; \ 237 253 \ … … 240 256 _done_pkt->req_id = (rreq)->ch.lmt_req_id; \ 241 257 \ 242 mpi_errno = MPIDI_CH3_iStartMsg((vc), _done_pkt, sizeof(*_done_pkt), &_done_req); \258 mpi_errno = MPIDI_CH3_iStartMsg((vc), _done_pkt, sizeof(*_done_pkt), &_done_req); \ 243 259 MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**donepkt"); \ 244 260 if (_done_req != NULL) \ -
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_inline.h
r4707 r4888 537 537 { 538 538 MPID_nem_cell_ptr_t el; 539 MPIDI_msg_sz_t datalen; 539 MPIDI_msg_sz_t datalen; 540 540 int my_rank; 541 541 MPIDI_msg_sz_t last; … … 576 576 577 577 /* copy header */ 578 MPIU_Memcpy((char *)pbox->cell.pkt.mpich2.payload, header, header_sz); 579 578 { 579 void * p = (void *)pbox->cell.pkt.mpich2.payload; 580 MPIU_Memcpy(p, header, header_sz); 581 /* MPIU_Memcpy((void *)pbox->cell.pkt.mpich2.payload, header, header_sz); */ 582 } 583 580 584 /* copy data */ 581 585 last = segment_size; … … 622 626 623 627 /* copy header */ 624 MPIU_Memcpy( el->pkt.mpich2.payload, header, header_sz);628 MPIU_Memcpy((void *)el->pkt.mpich2.payload, header, header_sz); 625 629 626 630 /* copy data */ -
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/socksm.c
r4865 r4888 1004 1004 { 1005 1005 int mpi_errno = MPI_SUCCESS; 1006 MPID_NEM_TCP_SOCK_STATUS_t stat ;1006 MPID_NEM_TCP_SOCK_STATUS_t status; 1007 1007 MPIDI_STATE_DECL(MPID_STATE_STATE_TC_C_CNTING_HANDLER); 1008 1008 1009 1009 MPIDI_FUNC_ENTER(MPID_STATE_STATE_TC_C_CNTING_HANDLER); 1010 1010 1011 stat = MPID_nem_tcp_check_sock_status(plfd);1012 1013 if (stat == MPID_NEM_TCP_SOCK_CONNECTED) {1011 status = MPID_nem_tcp_check_sock_status(plfd); 1012 1013 if (status == MPID_NEM_TCP_SOCK_CONNECTED) { 1014 1014 CHANGE_STATE(sc, CONN_STATE_TC_C_CNTD); 1015 1015 } 1016 else if (stat == MPID_NEM_TCP_SOCK_ERROR_EOF) {1016 else if (status == MPID_NEM_TCP_SOCK_ERROR_EOF) { 1017 1017 MPIU_DBG_MSG_FMT(NEM_SOCK_DET, VERBOSE, (MPIU_DBG_FDEST, "state_tc_c_cnting_handler(): changing to " 1018 1018 "quiescent")); … … 1020 1020 /* FIXME: retry 'n' number of retries before signalling an error to VC layer. */ 1021 1021 } 1022 else { /* stat == MPID_NEM_TCP_SOCK_NOEVENT */1022 else { /* status == MPID_NEM_TCP_SOCK_NOEVENT */ 1023 1023 /* 1024 1024 Still connecting... let it. While still connecting, even if … … 1183 1183 { 1184 1184 int mpi_errno = MPI_SUCCESS; 1185 MPID_NEM_TCP_SOCK_STATUS_t stat ;1185 MPID_NEM_TCP_SOCK_STATUS_t status; 1186 1186 int got_sc_eof = 0; 1187 1187 MPIDI_STATE_DECL(MPID_STATE_STATE_L_CNTD_HANDLER); … … 1189 1189 MPIDI_FUNC_ENTER(MPID_STATE_STATE_L_CNTD_HANDLER); 1190 1190 1191 stat = MPID_nem_tcp_check_sock_status(plfd);1192 if (stat == MPID_NEM_TCP_SOCK_ERROR_EOF) {1191 status = MPID_nem_tcp_check_sock_status(plfd); 1192 if (status == MPID_NEM_TCP_SOCK_ERROR_EOF) { 1193 1193 MPIU_DBG_MSG_FMT(NEM_SOCK_DET, VERBOSE, (MPIU_DBG_FDEST, "state_l_cntd_handler() 1: changing to " 1194 1194 "quiescent")); … … 1279 1279 { 1280 1280 int mpi_errno = MPI_SUCCESS; 1281 MPID_NEM_TCP_SOCK_STATUS_t stat ;1281 MPID_NEM_TCP_SOCK_STATUS_t status; 1282 1282 sockconn_t *fnd_sc = NULL; 1283 1283 int snd_nak = FALSE; … … 1286 1286 MPIDI_FUNC_ENTER(MPID_STATE_STATE_L_RANKRCVD_HANDLER); 1287 1287 1288 stat = MPID_nem_tcp_check_sock_status(plfd);1289 if (stat == MPID_NEM_TCP_SOCK_ERROR_EOF) {1288 status = MPID_nem_tcp_check_sock_status(plfd); 1289 if (status == MPID_NEM_TCP_SOCK_ERROR_EOF) { 1290 1290 MPIU_DBG_MSG_FMT(NEM_SOCK_DET, VERBOSE, (MPIU_DBG_FDEST, "state_l_rankrcvd_handler() 1: changing to quiescent")); 1291 1291 CHANGE_STATE(sc, CONN_STATE_TS_D_QUIESCENT); … … 1336 1336 { 1337 1337 int mpi_errno = MPI_SUCCESS; 1338 MPID_NEM_TCP_SOCK_STATUS_t stat ;1338 MPID_NEM_TCP_SOCK_STATUS_t status; 1339 1339 int snd_nak = FALSE; 1340 1340 MPIDI_STATE_DECL(MPID_STATE_STATE_L_TMPVCRCVD_HANDLER); … … 1342 1342 MPIDI_FUNC_ENTER(MPID_STATE_STATE_L_TMPVCRCVD_HANDLER); 1343 1343 1344 stat = MPID_nem_tcp_check_sock_status(plfd);1345 if (stat == MPID_NEM_TCP_SOCK_ERROR_EOF) {1344 status = MPID_nem_tcp_check_sock_status(plfd); 1345 if (status == MPID_NEM_TCP_SOCK_ERROR_EOF) { 1346 1346 CHANGE_STATE(sc, CONN_STATE_TS_D_QUIESCENT); 1347 1347 goto fn_exit; -
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_lmt.c
r4707 r4888 66 66 { 67 67 int mpi_errno = MPI_SUCCESS; 68 MPIDI_CH3_Pkt_t upkt; 69 MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)&upkt; 68 MPID_PKT_DECL_CAST(upkt, MPID_nem_pkt_lmt_rts_t, rts_pkt); 70 69 MPIDI_VC_t *vc; 71 70 MPID_Request *sreq =*sreq_p; … … 100 99 MPIDI_Request_set_seqnum(sreq, seqnum); 101 100 102 mpi_errno = ((MPIDI_CH3I_VC *)vc->channel_private)->lmt_initiate_lmt(vc, &upkt , sreq);101 mpi_errno = ((MPIDI_CH3I_VC *)vc->channel_private)->lmt_initiate_lmt(vc, &upkt.p, sreq); 103 102 if (mpi_errno) MPIU_ERR_POP(mpi_errno); 104 103 -
mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_finalize.c
r792 r4888 11 11 #undef FCNAME 12 12 #define FCNAME MPIDI_QUOTE(FUNCNAME) 13 int MPIDI_CH3_Finalize( )13 int MPIDI_CH3_Finalize(void) 14 14 { 15 15 int mpi_errno = MPI_SUCCESS; -
mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_init.c
r4411 r4888 310 310 #undef FCNAME 311 311 #define FCNAME MPIDI_QUOTE(FUNCNAME) 312 int MPIDI_CH3_InitCompleted( )312 int MPIDI_CH3_InitCompleted(void) 313 313 { 314 314 int mpi_errno = MPI_SUCCESS; -
mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
r4538 r4888 311 311 #undef FCNAME 312 312 #define FCNAME MPIDI_QUOTE(FUNCNAME) 313 int MPID_nem_coll_barrier_init ()313 int MPID_nem_coll_barrier_init(void) 314 314 { 315 315 int mpi_errno = MPI_SUCCESS; -
mpich2/trunk/src/mpid/ch3/src/ch3u_eager.c
r4411 r4888 385 385 } 386 386 else { 387 MPIDI_msg_sz_t data_sz, last;387 MPIDI_msg_sz_t recv_data_sz, last; 388 388 /* user buffer is not contiguous. Use the segment 389 389 code to unpack it, handling various errors and … … 397 397 rreq->dev.datatype, rreq->dev.segment_ptr, 0); 398 398 399 data_sz = rreq->dev.recv_data_sz;400 last = data_sz;399 recv_data_sz = rreq->dev.recv_data_sz; 400 last = recv_data_sz; 401 401 MPID_Segment_unpack( rreq->dev.segment_ptr, 0, 402 402 &last, eagershort_pkt->data ); 403 if (last != data_sz) {403 if (last != recv_data_sz) { 404 404 /* --BEGIN ERROR HANDLING-- */ 405 405 /* There are two cases: a datatype mismatch (could … … 417 417 } 418 418 else { 419 MPIDI_msg_sz_t data_sz;419 MPIDI_msg_sz_t recv_data_sz; 420 420 /* This is easy; copy the data into a temporary buffer. 421 421 To begin with, we use the same temporary location as … … 429 429 a buffer that we've allocated). */ 430 430 /* printf( "Allocating into tmp\n" ); fflush(stdout); */ 431 data_sz = rreq->dev.recv_data_sz;432 rreq->dev.tmpbuf = MPIU_Malloc( data_sz);431 recv_data_sz = rreq->dev.recv_data_sz; 432 rreq->dev.tmpbuf = MPIU_Malloc(recv_data_sz); 433 433 if (!rreq->dev.tmpbuf) { 434 434 MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); 435 435 } 436 rreq->dev.tmpbuf_sz = data_sz;437 /* Copy the payload. We could optimize this if data_sz & 0x3 == 0438 (copy ( data_sz >> 2) ints, inline that since data size is436 rreq->dev.tmpbuf_sz = recv_data_sz; 437 /* Copy the payload. We could optimize this if recv_data_sz & 0x3 == 0 438 (copy (recv_data_sz >> 2) ints, inline that since data size is 439 439 currently limited to 4 ints */ 440 440 { … … 444 444 (unsigned char *)rreq->dev.tmpbuf; 445 445 int i; 446 for (i=0; i< data_sz; i++) {446 for (i=0; i<recv_data_sz; i++) { 447 447 *bufp++ = *p++; 448 448 } -
mpich2/trunk/src/mpid/ch3/src/ch3u_rma_ops.c
r4062 r4888 475 475 int vec_len, i, type_size, count; 476 476 MPI_Datatype type; 477 MPID_Datatype *dtp;478 477 MPI_Aint true_lb, true_extent, extent; 479 478 void *tmp_buf=NULL, *source_buf, *target_buf; -
mpich2/trunk/src/pmi/simple/simple_pmi.c
r4377 r4888 1312 1312 int pid, rc; 1313 1313 int singinit_listen_sock, stdin_sock, stdout_sock, stderr_sock; 1314 char *newargv[8], charpid[8], port_c[8]; 1314 const char *newargv[8]; 1315 char charpid[8], port_c[8]; 1315 1316 struct sockaddr_in sin; 1316 1317 socklen_t len; … … 1346 1347 newargv[5] = charpid; 1347 1348 newargv[6] = NULL; 1348 rc = execvp(newargv[0], newargv);1349 rc = execvp(newargv[0], (char **)newargv); 1349 1350 perror("PMII_singinit: execv failed"); 1350 1351 PMIU_printf(1, " This singleton init program attempted to access some feature\n"); -
mpich2/trunk/src/util/dbg/dbg_printf.c
r4629 r4888 353 353 mpiu_dbg_initialized = MPIU_DBG_UNINIT; 354 354 static char filePatternBuf[MAXPATHLEN] = ""; 355 static c har *filePattern = "-stdout-"; /* "log%d.log"; */356 static c har *defaultFilePattern = "dbg@W%w-@%d@T-%t@.log";355 static const char *filePattern = "-stdout-"; /* "log%d.log"; */ 356 static const char *defaultFilePattern = "dbg@W%w-@%d@T-%t@.log"; 357 357 static char temp_filename[MAXPATHLEN] = ""; 358 358 static int worldNum = 0; … … 907 907 #endif 908 908 static char worldNumAsChar[10] = "0"; 909 char *pDest, *p; 909 char *pDest; 910 const char *p; 910 911 911 912 /* FIXME: This is a hack to handle the common case of two worlds */
