Commit bea750bc authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r9698] Warning squash.

parent b775faec
......@@ -5428,6 +5428,8 @@ void f1(void *a) { return; }],
[Define to an expression that will result in an error checking mutex type.])
fi
PAC_FUNC_NEEDS_DECL([#include <pthread.h>],pthread_mutexattr_settype)
MPICH2_THREAD_PACKAGE=pthreads
MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_POSIX
;;
......
......@@ -25,6 +25,10 @@
#error 'Unable to determine pthrad mutex recursive value'
#endif /* pthread mutex recursive value */
#if defined(NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL)
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind);
#endif /* NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */
/* MPIU_Thread_create() defined in mpiu_thread.c */
#define MPIU_Thread_exit() \
......
......@@ -33,11 +33,11 @@ extern FILE* fdopen( int, const char * );
void MPE_CallStack_iteratorInit( MPE_CallStack_t *cstk )
{
int pipefds[2];
int ierr;
/* Connect a pipe to the fd used in backtrace_symbols_fd(). */
#ifdef HAVE_WINDOWS_H
/*FIXME: CreatePipe() --- windows */
#else
int ierr;
ierr = pipe( pipefds );
#endif
/* Set the writing end of the pipe non-blocking */
......
......@@ -159,7 +159,6 @@ void CLOG_BlockData_patch_comm( CLOG_BlockData_t *data,
const CLOG_CommIDs_t *commtable )
{
CLOG_Rec_Header_t *hdr;
CLOG_Rec_Timeshift_t *tshift;
CLOG_Rec_CommEvt_t *comm;
CLOG_Rec_MsgEvt_t *msg;
int rectype;
......@@ -208,7 +207,6 @@ void CLOG_BlockData_patch_comm( CLOG_BlockData_t *data,
hdr->icomm = commtable[ hdr->icomm ].local_ID;
break;
case CLOG_REC_TIMESHIFT:
tshift = (CLOG_Rec_Timeshift_t *) hdr->rest;
hdr->icomm = commtable[ hdr->icomm ].local_ID;
break;
default:
......
......@@ -420,7 +420,7 @@ void CLOG_Preamble_read( CLOG_Preamble_t *preamble, int fd )
{
char buffer[ CLOG_PREAMBLE_SIZE ];
char value_str[ CLOG_PREAMBLE_STRLEN ];
char *buf_ptr, *buf_tail;
char *buf_ptr;
int fptr_giga, fptr_rmdr, fptr_unit;
int ierr;
......@@ -434,7 +434,6 @@ void CLOG_Preamble_read( CLOG_Preamble_t *preamble, int fd )
}
buf_ptr = (char *) buffer;
buf_tail = buf_ptr + CLOG_PREAMBLE_SIZE - 1;
/* Read the CLOG version ID */
buf_ptr = CLOG_Util_strbuf_get( preamble->version,
......
......@@ -194,7 +194,7 @@ TRACE_EXPORT
int TRACE_Set_position( TRACE_file fp, TRACE_int64_t offset );
TRACE_EXPORT
char *TRACE_Get_err_string( int ierr );
const char *TRACE_Get_err_string( int ierr );
#if defined(__cplusplus)
}
......
......@@ -481,7 +481,7 @@ TRACE_EXPORT int TRACE_Set_position( TRACE_file fp, TRACE_int64_t offset )
return TRACEINPUT_FAIL;
}
TRACE_EXPORT char *TRACE_Get_err_string( int ierr )
TRACE_EXPORT const char *TRACE_Get_err_string( int ierr )
{
return "Failure in RLOG file processing.";
}
......@@ -128,8 +128,8 @@ int MPIR_Allreduce_intra (
MPID_Comm *comm_ptr,
int *errflag )
{
int is_homogeneous;
#ifdef MPID_HAS_HETERO
int is_homogeneous;
int rc;
#endif
int comm_size, rank, type_size;
......@@ -214,10 +214,11 @@ int MPIR_Allreduce_intra (
#endif
is_homogeneous = 1;
#ifdef MPID_HAS_HETERO
if (comm_ptr->is_hetero)
is_homogeneous = 0;
else
is_homogeneous = 1;
#endif
#ifdef MPID_HAS_HETERO
......
......@@ -40,7 +40,7 @@ int MPIR_Ireduce_scatter_rec_hlv(void *sendbuf, void *recvbuf, int *recvcnts,
MPI_Aint extent, true_extent, true_lb;
int *disps;
void *tmp_recvbuf, *tmp_results;
int type_size, total_count, dst;
int type_size ATTRIBUTE((unused)), total_count, dst;
int mask;
int *newcnts, *newdisps, rem, newdst, send_idx, recv_idx,
last_idx, send_cnt, recv_cnt;
......@@ -404,7 +404,7 @@ int MPIR_Ireduce_scatter_rec_dbl(void *sendbuf, void *recvbuf, int *recvcnts,
MPI_Aint extent, true_extent, true_lb;
int *disps;
void *tmp_recvbuf, *tmp_results;
int type_size, dis[2], blklens[2], total_count, dst;
int type_size ATTRIBUTE((unused)), dis[2], blklens[2], total_count, dst;
int mask, dst_tree_root, my_tree_root, j, k;
int received;
MPI_Datatype sendtype, recvtype;
......
......@@ -38,7 +38,7 @@ int MPIR_Ireduce_scatter_block_rec_hlv(void *sendbuf, void *recvbuf, int recvcou
MPI_Aint extent, true_extent, true_lb;
int *disps;
void *tmp_recvbuf, *tmp_results;
int type_size, total_count, dst;
int type_size ATTRIBUTE((unused)), total_count, dst;
int mask;
int *newcnts, *newdisps, rem, newdst, send_idx, recv_idx,
last_idx, send_cnt, recv_cnt;
......@@ -395,7 +395,7 @@ int MPIR_Ireduce_scatter_block_rec_dbl(void *sendbuf, void *recvbuf, int recvcou
MPI_Aint extent, true_extent, true_lb;
int *disps;
void *tmp_recvbuf, *tmp_results;
int type_size, dis[2], blklens[2], total_count, dst;
int type_size ATTRIBUTE((unused)), dis[2], blklens[2], total_count, dst;
int mask, dst_tree_root, my_tree_root, j, k;
int received;
MPI_Datatype sendtype, recvtype;
......
......@@ -45,7 +45,7 @@ static int MPIR_Reduce_binomial (
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
MPI_Status status;
int comm_size, rank, is_commutative, type_size;
int comm_size, rank, is_commutative, type_size ATTRIBUTE((unused));
int mask, relrank, source, lroot;
MPI_Aint true_lb, true_extent, extent;
void *tmp_buf;
......@@ -252,7 +252,7 @@ static int MPIR_Reduce_redscat_gather (
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
int comm_size, rank, type_size, pof2, rem, newrank;
int comm_size, rank, type_size ATTRIBUTE((unused)), pof2, rem, newrank;
int mask, *cnts, *disps, i, j, send_idx=0;
int recv_idx, last_idx=0, newdst;
int dst, send_cnt, recv_cnt, newroot, newdst_tree_root, newroot_tree_root;
......
......@@ -342,7 +342,7 @@ static inline int find_next_off(ADIO_File fd,
ADIOI_Flatlist_node *tmp_flat_type_p = NULL;
ADIO_Offset tmp_off = -1, fr_next_off = -1, fr_max_len = -1,
tmp_fr_max_len = -1;
int ret = -1;
int ret = 0;
flatten_state *tmp_state_p = NULL;
ADIO_Offset tmp_st_off = 0, tmp_reg_sz = 0;
#ifdef DTYPE_SKIP
......@@ -438,7 +438,7 @@ static inline int find_next_off(ADIO_File fd,
#ifdef AGGREGATION_PROFILE
/* MPE_Log_event (5023, 0, NULL); */
#endif
return 0;
return ret;
}
/* Upon completion of a full collective buffer, end of a file realm
......@@ -905,7 +905,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd,
int cb_node_ct = fd->hints->cb_nodes;
int *agg_ol_ct_arr = NULL;
int *agg_ol_cur_ct_arr = NULL;
int agg_fr_idx = -1, tmp_agg_fr_idx = -1;
int tmp_agg_fr_idx = -1;
int cur_off_proc = -1;
int i = 0, j = 0;
int agg_next_off_idx = -1;
......@@ -1008,7 +1008,6 @@ int ADIOI_Build_client_reqs(ADIO_File fd,
if ((cur_off == -1) ||
(cur_off > tmp_cur_off))
{
agg_fr_idx = tmp_agg_fr_idx;
cur_off_proc = j;
cur_off = tmp_cur_off;
cur_reg_max_len = tmp_cur_reg_max_len;
......
......@@ -133,7 +133,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
/* parameters for datatypes */
ADIOI_Flatlist_node *flat_mem_p = NULL, *flat_file_p = NULL;
int memtype_sz = -1;
int memtype_is_contig = -1, filetype_is_contig = -1;
int memtype_is_contig = -1;
int filetype_sz = -1;
#ifdef AGGREGATION_PROFILE
......@@ -159,7 +159,6 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size(fd->filetype, &filetype_sz);
if (filetype_extent == filetype_sz) {
filetype_is_contig = 1;
flat_file_p = ADIOI_Add_contig_flattened(fd->filetype);
flat_file_p->blocklens[0] = memtype_sz*count;
filetype_extent = memtype_sz*count;
......
......@@ -50,11 +50,14 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr,
ADIO_Offset st_end_offset[2];
ADIO_Offset *all_st_end_offsets = NULL;
int filetype_is_contig, buftype_is_contig, is_contig;
ADIO_Offset orig_fp, off;
ADIO_Offset off;
int interleave_count = 0, i, nprocs, myrank, nprocs_for_coll;
int cb_enable;
ADIO_Offset bufsize;
MPI_Aint extent, bufextent;
MPI_Aint extent;
#ifdef DEBUG2
MPI_Aint bufextent;
#endif
int size;
int agg_rank;
......@@ -110,7 +113,6 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr,
completing. */
nprocs_for_coll = fd->hints->cb_nodes;
orig_fp = fd->fp_ind;
if (rdwr == ADIOI_READ)
cb_enable = fd->hints->cb_read;
......@@ -190,7 +192,9 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr,
}
MPI_Type_extent(datatype, &extent);
#ifdef DEBUG2
bufextent = extent * count;
#endif
MPI_Type_size(datatype, &size);
bufsize = size * count;
......
......@@ -171,6 +171,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
MPIU_OBJ_PUBLISH_HANDLE(*comm_dist_graph, comm_dist_graph_ptr->handle);
MPIU_CHKPMEM_COMMIT();
/* ... end of body of routine ... */
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_DIST_GRAPH_CREATE_ADJACENT);
......@@ -179,6 +180,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
/* --BEGIN ERROR HANDLING-- */
fn_fail:
MPIU_CHKPMEM_REAP();
#ifdef HAVE_ERROR_CHECKING
mpi_errno = MPIR_Err_create_code(
mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
......
......@@ -980,12 +980,11 @@ int close_cleanup_and_free_sc_plfd(sockconn_t *const sc)
int mpi_errno = MPI_SUCCESS;
int mpi_errno2 = MPI_SUCCESS;
int rc;
MPIDI_VC_t *const sc_vc = sc->vc;
MPIDI_STATE_DECL(MPID_STATE_CLOSE_CLEANUP_AND_FREE_SC_PLFD);
MPIDI_FUNC_ENTER(MPID_STATE_CLOSE_CLEANUP_AND_FREE_SC_PLFD);
MPIU_DBG_MSG_FMT(NEM_SOCK_DET, VERBOSE, (MPIU_DBG_FDEST, "vc=%p, sc=%p, closing fd=%d", sc_vc, sc, sc->fd));
MPIU_DBG_MSG_FMT(NEM_SOCK_DET, VERBOSE, (MPIU_DBG_FDEST, "vc=%p, sc=%p, closing fd=%d", sc->vc, sc, sc->fd));
if (sc == NULL)
goto fn_exit;
......
......@@ -61,8 +61,10 @@ int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int array
#define FUNCNAME MPID_nem_lmt_RndvSend
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, int count, MPI_Datatype datatype, int dt_contig,
MPIDI_msg_sz_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, MPID_Comm * comm, int context_offset)
int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, int count,
MPI_Datatype datatype, int dt_contig ATTRIBUTE((unused)),
MPIDI_msg_sz_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)),
int rank, int tag, MPID_Comm * comm, int context_offset)
{
int mpi_errno = MPI_SUCCESS;
MPID_PKT_DECL_CAST(upkt, MPID_nem_pkt_lmt_rts_t, rts_pkt);
......@@ -492,8 +494,8 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype * dt_ptr;
MPID_IOV s_cookie;
MPIDI_STATE_DECL(MPID_STATE_DO_CTS);
......
......@@ -123,8 +123,8 @@ int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Req
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype * dt_ptr;
MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_INITIATE_LMT);
......
......@@ -232,10 +232,10 @@ int MPIDI_Put(void *origin_addr, int origin_count, MPI_Datatype
int target_count, MPI_Datatype target_datatype, MPID_Win *win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig, rank, predefined;
int dt_contig ATTRIBUTE((unused)), rank, predefined;
MPIDI_RMA_ops *new_ptr;
MPID_Datatype *dtp;
MPI_Aint dt_true_lb;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_PUT);
......@@ -323,8 +323,8 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int dt_contig, rank, predefined;
MPI_Aint dt_true_lb;
int dt_contig ATTRIBUTE((unused)), rank, predefined;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_RMA_ops *new_ptr;
MPID_Datatype *dtp;
MPIU_CHKPMEM_DECL(1);
......@@ -415,8 +415,8 @@ int MPIDI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype
{
int mpi_errno=MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int dt_contig, rank, origin_predefined, target_predefined;
MPI_Aint dt_true_lb;
int dt_contig ATTRIBUTE((unused)), rank, origin_predefined, target_predefined;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_RMA_ops *new_ptr;
MPID_Datatype *dtp;
MPIU_CHKLMEM_DECL(2);
......
......@@ -17,6 +17,39 @@ static int exists(char *filename)
return 1;
}
static HYD_status get_abs_wd(const char *wd, char **abs_wd)
{
int ret;
char *cwd;
HYD_status status = HYD_SUCCESS;
if (wd == NULL) {
*abs_wd = NULL;
goto fn_exit;
}
if (wd[0] != '.') {
*abs_wd = (char *) wd;
goto fn_exit;
}
cwd = HYDU_getcwd();
ret = chdir(wd);
if (ret < 0)
HYDU_ERR_POP(status, "error calling chdir\n");
*abs_wd = HYDU_getcwd();
ret = chdir(cwd);
if (ret < 0)
HYDU_ERR_POP(status, "error calling chdir\n");
fn_exit:
return status;
fn_fail:
goto fn_exit;
}
HYD_status HYDU_find_in_path(const char *execname, char **path)
{
char *tmp[HYD_NUM_TMP_STRINGS], *path_loc = NULL, *test_loc, *user_path;
......@@ -29,7 +62,8 @@ HYD_status HYDU_find_in_path(const char *execname, char **path)
user_path = HYDU_strdup(user_path);
if (user_path) { /* If the PATH environment exists */
test_loc = HYDU_get_abs_wd(strtok(user_path, ";:"));
status = get_abs_wd(strtok(user_path, ";:"), &test_loc);
HYDU_ERR_POP(status, "error getting absolute working dir\n");
do {
tmp[0] = HYDU_strdup(test_loc);
tmp[1] = HYDU_strdup("/");
......@@ -54,7 +88,10 @@ HYD_status HYDU_find_in_path(const char *execname, char **path)
HYDU_FREE(path_loc);
path_loc = NULL;
} while ((test_loc = HYDU_get_abs_wd(strtok(NULL, ";:"))));
status = get_abs_wd(strtok(NULL, ";:"), &test_loc);
HYDU_ERR_POP(status, "error getting absolute working dir\n");
} while (test_loc);
}
/* There is either no PATH environment or we could not find the
......@@ -222,24 +259,6 @@ char *HYDU_getcwd(void)
goto fn_exit;
}
char *HYDU_get_abs_wd(const char *wd)
{
char *cwd, *retdir;
if (wd == NULL)
return NULL;
if (wd[0] != '.')
return (char *) wd;
cwd = HYDU_getcwd();
chdir(wd);
retdir = HYDU_getcwd();
chdir(cwd);
return retdir;
}
HYD_status HYDU_process_mfile_token(char *token, int newline, struct HYD_node ** node_list)
{
int num_procs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment