From perkinjo at mvapich.cse.ohio-state.edu Wed Oct 1 13:00:22 2008 From: perkinjo at mvapich.cse.ohio-state.edu (perkinjo@mvapich.cse.ohio-state.edu) Date: Wed Oct 1 13:00:28 2008 Subject: [mvapich-commit] r3032 - mvapich2/trunk/src/pm/mpirun/mpirun_rsh Message-ID: <200810011700.m91H0MHK032014@mvapich.cse.ohio-state.edu> Author: perkinjo Date: 2008-10-01 13:00:20 -0400 (Wed, 01 Oct 2008) New Revision: 3032 Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c Log: Provide ssh with an open stdin file descriptor. Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c =================================================================== --- mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-09-28 02:22:13 UTC (rev 3031) +++ mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-01 17:00:20 UTC (rev 3032) @@ -1549,9 +1549,10 @@ exit(EXIT_SUCCESS); } - if(strcmp(pglist->data[i].hostname, plist[0].hostname)) { - close(STDIN_FILENO); - } + if(strcmp(pglist->data[i].hostname, plist[0].hostname)) { + int fd = open("/dev/null", O_RDWR, 0); + dup2(fd, STDIN_FILENO); + } execv(argv[0], (char* const*) argv); perror("execv"); @@ -1747,4 +1748,4 @@ close(sock); } -/* vi:set sw=4 sts=4 tw=80: */ +/* vi:set sw=4 sts=4 tw=76 expandtab: */ From chail at mvapich.cse.ohio-state.edu Thu Oct 2 14:26:16 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Thu Oct 2 14:26:23 2008 Subject: [mvapich-commit] r3035 - in mvapich/trunk: romio/mpi-io src/coll src/env Message-ID: <200810021826.m92IQGhX008867@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-02 14:26:14 -0400 (Thu, 02 Oct 2008) New Revision: 3035 Modified: mvapich/trunk/romio/mpi-io/ioreq_f2c.c mvapich/trunk/src/coll/intra_fns_new.c mvapich/trunk/src/coll/intra_rdma_allgather.c mvapich/trunk/src/coll/intra_rdma_alltoall.c mvapich/trunk/src/env/initutil.c Log: Fix some of the compilation warnings. Modified: mvapich/trunk/romio/mpi-io/ioreq_f2c.c =================================================================== --- mvapich/trunk/romio/mpi-io/ioreq_f2c.c 2008-10-01 17:08:45 UTC (rev 3034) +++ mvapich/trunk/romio/mpi-io/ioreq_f2c.c 2008-10-02 18:26:14 UTC (rev 3035) @@ -53,7 +53,7 @@ /* --BEGIN ERROR HANDLING-- */ if (!request) { - error_code = MPIO_REQUEST_NULL; + error_code = (int) MPIO_REQUEST_NULL; goto fn_exit; } if ((request < 0) || (request > ADIOI_Reqtable_ptr)) { Modified: mvapich/trunk/src/coll/intra_fns_new.c =================================================================== --- mvapich/trunk/src/coll/intra_fns_new.c 2008-10-01 17:08:45 UTC (rev 3034) +++ mvapich/trunk/src/coll/intra_fns_new.c 2008-10-02 18:26:14 UTC (rev 3035) @@ -88,6 +88,33 @@ extern int HEADER; #endif +#if (defined(VIADEV_RPUT_SUPPORT) || defined(VIADEV_RGET_SUPPORT)) +extern int intra_RDMA_barrier(struct MPIR_COMMUNICATOR *); +extern int intra_rdma_Alltoall(void *, int, struct MPIR_DATATYPE *, + void *, int, struct MPIR_DATATYPE *, + struct MPIR_COMMUNICATOR *, int); +#endif + +#ifdef _SMP_ +extern void MPID_SHMEM_COLL_Barrier_gather(int, int, int); +extern void MPID_SHMEM_COLL_Barrier_bcast(int, int, int); +extern void MPID_SHMEM_COLL_GetShmemBcastBuf(void**, void*); +extern void MPID_SHMEM_COLL_GetShmemBuf(int, int, int, void**); +extern void MPID_SHMEM_COLL_SetGatherComplete(int, int, int); +extern void signal_local_processes(int, int, char*, int, int, void*); +extern void wait_for_signal(int, int, char**, int*, int*, void*); +#endif + +extern void MPID_PackMessage(void *, int, struct MPIR_DATATYPE *, + struct MPIR_COMMUNICATOR *, + int, MPID_Msgrep_t, MPID_Msg_pack_t, + void **, int *, int *); +extern void MPID_UnpackMessageSetup(int, struct MPIR_DATATYPE *, + struct MPIR_COMMUNICATOR *, + int, MPID_Msgrep_t, + void **, int *, int *); + + extern int viadev_rendezvous_threshold; extern unsigned long viadev_pt2pt_failover; @@ -420,7 +447,6 @@ #if (defined( _SMP_) && (defined(CH_GEN2) || defined(CH_SMP) || defined(CH_GEN2_UD) || defined(CH_PSM))) static int intra_shmem_Barrier ( struct MPIR_COMMUNICATOR *comm ){ - char* shmem_buf; MPI_Comm shmem_comm, leader_comm; struct MPIR_COMMUNICATOR *comm_ptr = 0,*shmem_commptr = 0, *leader_commptr = 0; int local_rank = -1, local_size=0, my_rank; @@ -1031,8 +1057,7 @@ { int leader_size=0, size; int mpi_errno = MPI_SUCCESS; - MPI_Comm leader_comm; - struct MPIR_COMMUNICATOR *comm_ptr = 0, *leader_commptr = 0; + struct MPIR_COMMUNICATOR *comm_ptr = 0; int pof2, lgn = 0, nbytes, type_size; int is_contig, is_homogeneous, tmp_buf_size, position; void *tmp_buf; @@ -1137,7 +1162,7 @@ struct MPIR_COMMUNICATOR *comm_ptr = 0,*shmem_commptr = 0; struct MPIR_COMMUNICATOR *leader_commptr = 0; int local_rank = -1, global_rank = -1, local_size=0, my_rank; - int leader_root; + int leader_root = 0; int leader_of_root; int size; int mpi_errno = MPI_SUCCESS; @@ -1293,7 +1318,6 @@ int root, struct MPIR_COMMUNICATOR *comm ) { - int pof2 = 1; int is_contig; int is_homogeneous = 1; int mpi_errno; @@ -1327,16 +1351,14 @@ { MPI_Status status; int rank, size, src, dst; - int relative_rank, mask, tmp_buf_size; + int relative_rank, mask; int mpi_errno = MPI_SUCCESS; int scatter_size, curr_size, recv_size, send_size; - int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous; + int j, k, i, tmp_mask, is_contig, is_homogeneous; int relative_dst, dst_tree_root, my_tree_root, send_offset; int recv_offset, tree_root, nprocs_completed, offset, position; int *recvcnts, *displs, left, right, jnext, pof2, comm_size_is_pof2; void *tmp_buf; - static char myname[] = "MPI_BCAST"; - int lgn = -1; /* Is root within the comm and more than 1 processes involved? */ MPIR_Comm_size ( comm, &size ); @@ -1636,25 +1658,22 @@ struct MPIR_COMMUNICATOR *comm ) { MPI_Status status; - int rank, size, src, dst; - int relative_rank, mask, tmp_buf_size; + int rank, src, size, dst; + int relative_rank, mask; int mpi_errno = MPI_SUCCESS; - int scatter_size, curr_size, recv_size, send_size; - int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous; - int relative_dst, dst_tree_root, my_tree_root, send_offset; - int recv_offset, tree_root, nprocs_completed, offset, position; - int *recvcnts, *displs, left, right, jnext, pof2, comm_size_is_pof2; - void *tmp_buf; - static char myname[] = "MPI_BCAST"; - int lgn = -1; + int scatter_size = 0, curr_size, recv_size, send_size; + int j=0, i=0; + int dst_tree_root, my_tree_root, send_offset; + int recv_offset = 0; + int *recvcnts=NULL, *displs=NULL, left, right, jnext, pof2, comm_size_is_pof2; + void *tmp_buf = NULL; char* shmem_buf; - MPI_Comm shmem_comm, leader_comm; + MPI_Comm shmem_comm, leader_comm=MPI_COMM_WORLD; struct MPIR_COMMUNICATOR *comm_ptr = 0,*shmem_commptr = 0, *leader_commptr = 0; - int local_rank = -1, global_rank = -1, local_size=0, my_rank, relative_lcomm_rank, relative_lcomm_dst; - void* local_buf=NULL, *tmpbuf=NULL; - int stride = 0, is_commutative, leader_comm_size, leader_comm_rank; - int leader_root, total_size =0, shmem_comm_rank, num_bytes=0, shmem_offset=-1; + int local_rank = -1, local_size=0, my_rank, relative_lcomm_rank = 0, relative_lcomm_dst; + int leader_comm_size, leader_comm_rank; + int shmem_comm_rank, num_bytes=0, shmem_offset=-1; int index; int file_size = shmem_coll_bcast_threshold; int ret_val = 0, flag = 0; @@ -1662,12 +1681,12 @@ /* Get my rank and switch communicators to the hidden collective */ MPIR_Comm_rank ( comm, &rank ); + MPIR_Comm_size ( comm, &size ); comm_ptr = comm->comm_coll; index = comm_ptr->bcast_index; /* Obtaining the shared memory communicator information */ my_rank = comm_ptr->local_rank; - total_size = size; shmem_comm = comm_ptr->shmem_comm; MPI_Comm_rank(shmem_comm, &local_rank); MPI_Comm_size(shmem_comm, &local_size); @@ -1700,7 +1719,7 @@ if ((local_rank == 0) || (root == rank)){ - MPID_SHMEM_COLL_GetShmemBcastBuf(&shmem_buf,comm_ptr->bcast_mmap_ptr); + MPID_SHMEM_COLL_GetShmemBcastBuf((void *)(&shmem_buf),comm_ptr->bcast_mmap_ptr); /* The collective uses the shared buffer for inter and intra node */ tmp_buf = shmem_buf; } @@ -2932,7 +2951,7 @@ MPID_PackMessage(sendbuf, sendcount, sendtype, comm, 0, msgrep, msgact, (void **) &send_mybuf, &mylen, &mpi_errno); assert(mylen == nbytes); - if (mpi_errno) return; + if (mpi_errno) return mpi_errno; MPIR_Datatype_iscontig(recvtype->self, &is_contig); if (is_contig){ mpi_errno = intra_rdma_Allgather(send_mybuf, sendcount, @@ -2941,7 +2960,7 @@ else{ MPID_UnpackMessageSetup(recvcount, recvtype, comm, 0, msgrep, (void **) &recv_mybuf, &mylen, &mpi_errno); - if (mpi_errno) return; + if (mpi_errno) return mpi_errno; mpi_errno = intra_rdma_Allgather(send_mybuf, sendcount, sendtype, recv_mybuf, recvcount, recvtype, comm, nbytes); MPID_Unpack(recv_mybuf, nbytes*size, MPID_MSGREP_UNKNOWN, @@ -2949,7 +2968,7 @@ &out_position, (struct MPIR_COMMUNICATOR *) NULL, 0, &mpi_errno); - if (mpi_errno) return; + if (mpi_errno) return mpi_errno; } } } @@ -5088,7 +5107,7 @@ struct MPIR_COMMUNICATOR *comm ) { MPI_Status status; - int size, rank, type_size, pof2, rem, newrank; + int size, rank; int mpi_errno = MPI_SUCCESS; MPI_User_function *uop; MPI_Aint extent, lb; @@ -5100,8 +5119,8 @@ struct MPIR_COMMUNICATOR *comm_ptr = 0,*shmem_commptr = 0, *leader_commptr = 0; int local_rank = -1, global_rank = -1, local_size=0, my_rank; void* local_buf=NULL, *tmpbuf=NULL, *tmpbuf1=NULL; - int stride = 0, i, is_commutative; - int leader_root, total_size=0, shmem_comm_rank; + int stride = 0, i; + int leader_root=0, total_size=0, shmem_comm_rank; if (count == 0) return MPI_SUCCESS; @@ -5187,7 +5206,7 @@ } if (local_size > 1){ - MPID_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, &shmem_buf); + MPID_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, (void *)(&shmem_buf)); } @@ -5886,7 +5905,7 @@ struct MPIR_COMMUNICATOR *comm ) { MPI_Status status; - int size, rank, type_size, pof2, rem, newrank; + int size, rank; int mpi_errno = MPI_SUCCESS; MPI_User_function *uop; MPI_Aint extent, lb; @@ -5898,8 +5917,8 @@ struct MPIR_COMMUNICATOR *comm_ptr = 0,*shmem_commptr = 0, *leader_commptr = 0; int local_rank = -1, global_rank = -1, local_size=0, my_rank; void* local_buf=NULL, *tmpbuf=NULL; - int stride = 0, i, is_commutative; - int leader_root, total_size =0, shmem_comm_rank; + int stride = 0, i; + int total_size =0, shmem_comm_rank; int is_homogeneous; @@ -5962,7 +5981,7 @@ } if (local_size > 1){ - MPID_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, &shmem_buf); + MPID_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, (void *)(&shmem_buf)); } Modified: mvapich/trunk/src/coll/intra_rdma_allgather.c =================================================================== --- mvapich/trunk/src/coll/intra_rdma_allgather.c 2008-10-01 17:08:45 UTC (rev 3034) +++ mvapich/trunk/src/coll/intra_rdma_allgather.c 2008-10-02 18:26:14 UTC (rev 3035) @@ -51,7 +51,7 @@ struct L_Collbuf *l_coll; struct R_Collbuf *r_coll; struct MPIR_COMMUNICATOR *actual_comm; - dreg_entry *d_recv; + dreg_entry *d_recv = NULL; /* Get size and switch to collective communicator */ MPIR_Comm_size(comm, &size); Modified: mvapich/trunk/src/coll/intra_rdma_alltoall.c =================================================================== --- mvapich/trunk/src/coll/intra_rdma_alltoall.c 2008-10-01 17:08:45 UTC (rev 3034) +++ mvapich/trunk/src/coll/intra_rdma_alltoall.c 2008-10-02 18:26:14 UTC (rev 3035) @@ -33,7 +33,7 @@ struct MPIR_COMMUNICATOR *comm, int one_size) { int size, i, rank, size_one_send_buf, size_one_recv_buf; - MPI_Aint sendtype_extent, recvtype_extent, sendbuf_extent; + MPI_Aint sendtype_extent, recvtype_extent; int sendtype_size; dreg_entry *d_send = NULL; dreg_entry *d_recv = NULL; Modified: mvapich/trunk/src/env/initutil.c =================================================================== --- mvapich/trunk/src/env/initutil.c 2008-10-01 17:08:45 UTC (rev 3034) +++ mvapich/trunk/src/env/initutil.c 2008-10-02 18:26:14 UTC (rev 3035) @@ -166,6 +166,8 @@ extern int shmem_coll_reduce_threshold; extern int shmem_coll_allreduce_threshold; extern int shmem_coll_bcast_threshold; +extern void clear_2level_comm (struct MPIR_COMMUNICATOR*); +extern void create_2level_comm (struct MPIR_COMMUNICATOR*, int, int); #endif #endif extern int bcast_knomial_degree; From chail at mvapich.cse.ohio-state.edu Thu Oct 2 14:43:19 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Thu Oct 2 14:43:25 2008 Subject: [mvapich-commit] r3036 - mvapich2/trunk/src/mpi/coll Message-ID: <200810021843.m92IhJBt008901@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-02 14:43:19 -0400 (Thu, 02 Oct 2008) New Revision: 3036 Modified: mvapich2/trunk/src/mpi/coll/bcast.c Log: Fix a potential bug in bcast. "size" was used uninitialized. Modified: mvapich2/trunk/src/mpi/coll/bcast.c =================================================================== --- mvapich2/trunk/src/mpi/coll/bcast.c 2008-10-02 18:26:14 UTC (rev 3035) +++ mvapich2/trunk/src/mpi/coll/bcast.c 2008-10-02 18:43:19 UTC (rev 3036) @@ -1184,22 +1184,22 @@ int local_rank = -1, local_size=0, relative_lcomm_rank, relative_lcomm_dst; void* local_buf=NULL, *tmpbuf=NULL; int leader_comm_size, leader_comm_rank; - int leader_root, total_size =0, shmem_comm_rank, num_bytes=0, shmem_offset=-1; + int leader_root, shmem_comm_rank, num_bytes=0, shmem_offset=-1; int index; int file_size = shmem_bcast_threshold; int ret_val = 0, flag = 0; /* Get my rank and switch communicators to the hidden collective */ - rank = comm->rank; + rank = comm->rank; comm_ptr = comm; + size = comm_ptr->local_size; index = comm_ptr->bcast_index; /* Obtaining the shared memory communicator information */ - total_size = size; shmem_comm = comm_ptr->shmem_comm; MPI_Comm_rank(shmem_comm, &local_rank); MPI_Comm_size(shmem_comm, &local_size); - MPID_Comm_get_ptr(shmem_comm, shmem_commptr); + MPID_Comm_get_ptr(shmem_comm, shmem_commptr); shmem_comm_rank = shmem_commptr->shmem_comm_rank; From koop at mvapich.cse.ohio-state.edu Fri Oct 3 09:32:03 2008 From: koop at mvapich.cse.ohio-state.edu (koop@mvapich.cse.ohio-state.edu) Date: Fri Oct 3 09:32:17 2008 Subject: [mvapich-commit] r3038 - mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2 Message-ID: <200810031332.m93DW3Rc017481@mvapich.cse.ohio-state.edu> Author: koop Date: 2008-10-03 09:32:00 -0400 (Fri, 03 Oct 2008) New Revision: 3038 Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c Log: * WQEs (number of outstanding operations): Default ----------- -> 64 when job is <= 256 processes -> 16 when job is > 256 processes User override ------ MV2_DEFAULT_MAX_WQE=X * Inline size (latency optimization for messages under this size in bytes): Default ------------ -> 128 when job is <= 256 processes -> 0 when job is > 256 processes User override ------ MV2_MAX_INLINE_SIZE=X Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c 2008-10-02 18:45:58 UTC (rev 3037) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c 2008-10-03 13:32:00 UTC (rev 3038) @@ -102,13 +102,6 @@ int rdma_credit_preserve; int rdma_initial_credits = 0; -/* Max number of entries on the Send Q of QPs per connection. - * Should be about (prepost_depth + extra). - * Must be within NIC MaxQpEntries limit. - * Size will be adjusted below. - */ -int rdma_sq_size = 200; - /* Max number of entries on the RecvQ of QPs per connection. * computed to be: * prepost_depth + rdma_prepost_rendezvous_extra + viadev_prepost_noop_extra @@ -893,7 +886,10 @@ } if ((value = getenv("MV2_MAX_INLINE_SIZE")) != NULL) { rdma_max_inline_size = (int)atoi(value); + } else if(num_proc > 256) { + rdma_max_inline_size = 0; } + if ((value = getenv("MV2_DEFAULT_MAX_CQ_SIZE")) != NULL) { rdma_default_max_cq_size = (int)atoi(value); } @@ -1014,7 +1010,10 @@ } if ((value = getenv("MV2_DEFAULT_MAX_WQE")) != NULL) { rdma_default_max_wqe = atol(value); + } else if(num_proc > 256) { + rdma_default_max_wqe = 16; } + if ((value = getenv("MV2_NDREG_ENTRIES")) != NULL) { rdma_ndreg_entries = (unsigned int)atoi(value); } From chail at mvapich.cse.ohio-state.edu Fri Oct 3 14:34:07 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Fri Oct 3 14:34:15 2008 Subject: [mvapich-commit] r3039 - mvapich/trunk/mpid/ch_gen2 Message-ID: <200810031834.m93IY7YY018026@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-03 14:34:06 -0400 (Fri, 03 Oct 2008) New Revision: 3039 Modified: mvapich/trunk/mpid/ch_gen2/viainit.c Log: Fix compilation warnings in CPU affinity. Thanks for Pasha@Mellanox for the patch. Modified: mvapich/trunk/mpid/ch_gen2/viainit.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/viainit.c 2008-10-03 13:32:00 UTC (rev 3038) +++ mvapich/trunk/mpid/ch_gen2/viainit.c 2008-10-03 18:34:06 UTC (rev 3039) @@ -116,7 +116,7 @@ #ifdef _AFFINITY_ void viainit_setaffinity(char *cpu_mapping) { long N_CPUs_online; - unsigned long affinity_mask = 1; + cpu_set_t affinity_mask; unsigned long affinity_mask_len = sizeof(affinity_mask); char *tp; char *cp; @@ -146,7 +146,8 @@ cpu = atoi(tp_str); if (j == smpi.my_local_id) { - affinity_mask = 1 << cpu; + CPU_ZERO(&affinity_mask); + CPU_SET(cpu, &affinity_mask); if (sched_setaffinity(0, affinity_mask_len, &affinity_mask)<0 ) { perror("sched_setaffinity"); @@ -162,7 +163,9 @@ /* The user has not specified how to map the processes, * use the default scheme */ - affinity_mask = 1 << (smpi.my_local_id%N_CPUs_online); + CPU_ZERO(&affinity_mask); + CPU_SET(smpi.my_local_id%N_CPUs_online, &affinity_mask); + if (sched_setaffinity(0,affinity_mask_len,&affinity_mask)<0 ) { perror("sched_setaffinity"); } From chail at mvapich.cse.ohio-state.edu Fri Oct 3 15:14:17 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Fri Oct 3 15:14:25 2008 Subject: [mvapich-commit] r3040 - in mvapich/trunk/mpid/ch_gen2: . process Message-ID: <200810031914.m93JEHnm018106@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-03 15:14:15 -0400 (Fri, 03 Oct 2008) New Revision: 3040 Modified: mvapich/trunk/mpid/ch_gen2/cm.c mvapich/trunk/mpid/ch_gen2/process/mpirun_util.c mvapich/trunk/mpid/ch_gen2/shmem_coll.c mvapich/trunk/mpid/ch_gen2/viacheck.c mvapich/trunk/mpid/ch_gen2/viadev.h mvapich/trunk/mpid/ch_gen2/viainit.c mvapich/trunk/mpid/ch_gen2/viaparam.c Log: Fix compilation warnings in mpid/ch_gen2 directory. Modified: mvapich/trunk/mpid/ch_gen2/cm.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/cm.c 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/cm.c 2008-10-03 19:14:15 UTC (rev 3040) @@ -1144,7 +1144,6 @@ struct ibv_sge list; struct ibv_send_wr wr; struct ibv_send_wr *bad_wr; - struct ibv_wc wc; msg.msg_type = CM_MSG_TYPE_FIN_SELF; memcpy(cm_ud_send_buf + 40, &msg, sizeof(cm_msg)); memset(&list, 0, sizeof(struct ibv_sge)); Modified: mvapich/trunk/mpid/ch_gen2/process/mpirun_util.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/process/mpirun_util.c 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/process/mpirun_util.c 2008-10-03 19:14:15 UTC (rev 3040) @@ -12,6 +12,7 @@ #include "mpirun_util.h" #include +#include /* * ptr must be suitable for a call to realloc Modified: mvapich/trunk/mpid/ch_gen2/shmem_coll.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/shmem_coll.c 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/shmem_coll.c 2008-10-03 19:14:15 UTC (rev 3040) @@ -290,7 +290,6 @@ char* shmem_coll_buf = (char*)(mmap_ptr); volatile char* bcast_flags; bcast_flags = (char*)shmem_coll_buf + index*SHMEM_BCAST_FLAGS; - int metadata_offset = 3*SHMEM_BCAST_FLAGS; char* tmp = (char*)shmem_coll_buf + 3*SHMEM_BCAST_FLAGS + step*SHMEM_BCAST_METADATA; void* buffer; while (bcast_flags[step] == 0){ @@ -449,7 +448,6 @@ int MPID_SHMEM_BCAST_mmap(void** mmap_ptr, int bcast_seg_size, int fd, int my_local_rank, char* bcast_shmem_file) { - int i = 0, j = 0; *mmap_ptr = mmap(0, bcast_seg_size, (PROT_READ | PROT_WRITE), (MAP_SHARED), fd, 0); if (*mmap_ptr == (void *) -1) { Modified: mvapich/trunk/mpid/ch_gen2/viacheck.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/viacheck.c 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/viacheck.c 2008-10-03 19:14:15 UTC (rev 3040) @@ -52,6 +52,9 @@ extern int is_mcast_enabled; #endif +int perform_manual_apm(struct ibv_qp*); +int reload_alternate_path(struct ibv_qp *); +static void lock_apm(); static void viutil_spinandwaitcq(struct ibv_wc *); /* * MPID_DeviceCheck processes ALL completed descriptors. @@ -1547,7 +1550,7 @@ { viadev_packet_eager_coalesce_part *ph; viadev_packet_eager_coalesce_full *fh; - viadev_packet_envelope * envelope; + viadev_packet_envelope * envelope = NULL; MPIR_RHANDLE *rhandle; int found, i, unexpected = 0; @@ -2710,7 +2713,7 @@ struct ibv_qp_attr attr; struct ibv_qp_init_attr init_attr; - enum ibv_qp_attr_mask attr_mask; + enum ibv_qp_attr_mask attr_mask = IBV_QP_STATE; lock_apm(); Modified: mvapich/trunk/mpid/ch_gen2/viadev.h =================================================================== --- mvapich/trunk/mpid/ch_gen2/viadev.h 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/viadev.h 2008-10-03 19:14:15 UTC (rev 3040) @@ -80,4 +80,10 @@ int ib_init_check(int i, int j); +extern void init_apm_lock(); +extern int viadev_init_async_progress(); +extern int reload_alternate_path(struct ibv_qp *); +extern void viadev_finalize_async_progress(); +extern int perform_manual_apm(struct ibv_qp*); + #endif /* _VIADEV_H */ Modified: mvapich/trunk/mpid/ch_gen2/viainit.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/viainit.c 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/viainit.c 2008-10-03 19:14:15 UTC (rev 3040) @@ -231,7 +231,7 @@ } static void get_hca_types(int * num_hcas, int * hca_type) { - int i, j, tmp; + int i, j; int total_hcas = 0; struct ibv_device **dev_list; struct ibv_context *hca_context = NULL; @@ -750,10 +750,6 @@ int hca_num; int hca_types[MAX_NUM_HCA]; -#ifdef _SMP_ - int *smpi_ptr = NULL; -#endif - #ifdef MCST_SUPPORT char grp_info[GRP_INFO_LEN]; Modified: mvapich/trunk/mpid/ch_gen2/viaparam.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/viaparam.c 2008-10-03 18:34:06 UTC (rev 3039) +++ mvapich/trunk/mpid/ch_gen2/viaparam.c 2008-10-03 19:14:15 UTC (rev 3040) @@ -1070,7 +1070,7 @@ { struct ibv_device_attr dev_attr; int hca_type = HCA_ERROR; - int ret, i, rate; + int ret, rate; char *dev_name; umad_ca_t umad_ca; @@ -1154,7 +1154,6 @@ } else { /* This condition should be true : !strncmp(dev_name, "mlx4", 4)*/ - int i; hca_type = CONNECTX_SDR; rate = get_rate(&umad_ca); From perkinjo at mvapich.cse.ohio-state.edu Fri Oct 3 17:52:10 2008 From: perkinjo at mvapich.cse.ohio-state.edu (perkinjo@mvapich.cse.ohio-state.edu) Date: Fri Oct 3 17:52:17 2008 Subject: [mvapich-commit] r3041 - in mvapich/branches/1.0/mpid: ch_gen2/process ch_gen2_ud/process ch_psm/process ch_smp/process Message-ID: <200810032152.m93LqAaO018464@mvapich.cse.ohio-state.edu> Author: perkinjo Date: 2008-10-03 17:52:08 -0400 (Fri, 03 Oct 2008) New Revision: 3041 Modified: mvapich/branches/1.0/mpid/ch_gen2/process/mpirun_rsh.c mvapich/branches/1.0/mpid/ch_gen2_ud/process/mpirun_rsh.c mvapich/branches/1.0/mpid/ch_psm/process/mpirun_rsh.c mvapich/branches/1.0/mpid/ch_smp/process/mpirun_rsh.c Log: Provide ssh with an open stdin file descriptor. Modified: mvapich/branches/1.0/mpid/ch_gen2/process/mpirun_rsh.c =================================================================== --- mvapich/branches/1.0/mpid/ch_gen2/process/mpirun_rsh.c 2008-10-03 19:14:15 UTC (rev 3040) +++ mvapich/branches/1.0/mpid/ch_gen2/process/mpirun_rsh.c 2008-10-03 21:52:08 UTC (rev 3041) @@ -1974,7 +1974,8 @@ } if(strcmp(pglist->data[i].hostname, plist[0].hostname)) { - close(STDIN_FILENO); + int fd = open("/dev/null", O_RDWR, 0); + dup2(fd, STDIN_FILENO); } execv(argv[0], (char* const*) argv); Modified: mvapich/branches/1.0/mpid/ch_gen2_ud/process/mpirun_rsh.c =================================================================== --- mvapich/branches/1.0/mpid/ch_gen2_ud/process/mpirun_rsh.c 2008-10-03 19:14:15 UTC (rev 3040) +++ mvapich/branches/1.0/mpid/ch_gen2_ud/process/mpirun_rsh.c 2008-10-03 21:52:08 UTC (rev 3041) @@ -1974,7 +1974,8 @@ } if(strcmp(pglist->data[i].hostname, plist[0].hostname)) { - close(STDIN_FILENO); + int fd = open("/dev/null", O_RDWR, 0); + dup2(fd, STDIN_FILENO); } execv(argv[0], (char* const*) argv); Modified: mvapich/branches/1.0/mpid/ch_psm/process/mpirun_rsh.c =================================================================== --- mvapich/branches/1.0/mpid/ch_psm/process/mpirun_rsh.c 2008-10-03 19:14:15 UTC (rev 3040) +++ mvapich/branches/1.0/mpid/ch_psm/process/mpirun_rsh.c 2008-10-03 21:52:08 UTC (rev 3041) @@ -1974,7 +1974,8 @@ } if(strcmp(pglist->data[i].hostname, plist[0].hostname)) { - close(STDIN_FILENO); + int fd = open("/dev/null", O_RDWR, 0); + dup2(fd, STDIN_FILENO); } execv(argv[0], (char* const*) argv); Modified: mvapich/branches/1.0/mpid/ch_smp/process/mpirun_rsh.c =================================================================== --- mvapich/branches/1.0/mpid/ch_smp/process/mpirun_rsh.c 2008-10-03 19:14:15 UTC (rev 3040) +++ mvapich/branches/1.0/mpid/ch_smp/process/mpirun_rsh.c 2008-10-03 21:52:08 UTC (rev 3041) @@ -1976,7 +1976,8 @@ } if(strcmp(pglist->data[i].hostname, plist[0].hostname)) { - close(STDIN_FILENO); + int fd = open("/dev/null", O_RDWR, 0); + dup2(fd, STDIN_FILENO); } execv(argv[0], (char* const*) argv); From chail at mvapich.cse.ohio-state.edu Fri Oct 3 18:50:26 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Fri Oct 3 18:50:34 2008 Subject: [mvapich-commit] r3042 - in mvapich/trunk: mpe/src mpid/ch_gen2/process mpid/util src/coll src/context src/util Message-ID: <200810032250.m93MoQiJ018594@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-03 18:50:25 -0400 (Fri, 03 Oct 2008) New Revision: 3042 Modified: mvapich/trunk/mpe/src/clog_merge.c mvapich/trunk/mpid/ch_gen2/process/mpispawn.c mvapich/trunk/mpid/util/tr2.c mvapich/trunk/src/coll/scatter.c mvapich/trunk/src/context/comm_free.c mvapich/trunk/src/context/comm_rdma_init.c mvapich/trunk/src/context/comm_util.c mvapich/trunk/src/context/create_2level_comm.c mvapich/trunk/src/util/bsendutil2.c mvapich/trunk/src/util/mpirutil.c Log: Fix compilation warnings. Modified: mvapich/trunk/mpe/src/clog_merge.c =================================================================== --- mvapich/trunk/mpe/src/clog_merge.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/mpe/src/clog_merge.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -57,8 +57,10 @@ { MPI_Status logstatus; double maxtime = CLOG_MAXTIME; /* place to hold maxtime, dummy record */ - char logfilename[256], - *slog_file; + char logfilename[256]; +#if defined( HAVE_SLOG1 ) + char *slog_file; +#endif int i; int total_events; /* (abhi) total event count for process with rank 0.*/ Modified: mvapich/trunk/mpid/ch_gen2/process/mpispawn.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/process/mpispawn.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/mpid/ch_gen2/process/mpispawn.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -15,6 +15,7 @@ #include #include #include +#include typedef struct { char * viadev_device; Modified: mvapich/trunk/mpid/util/tr2.c =================================================================== --- mvapich/trunk/mpid/util/tr2.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/mpid/util/tr2.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -194,7 +194,7 @@ if (TRlevel & TR_MALLOC) fprintf( stderr, "[%d] Allocating %d bytes at %lx in %s:%d\n", - world_rank, a, (PointerInt)new, fname, lineno ); + world_rank, (int)a, (PointerInt)new, fname, lineno ); return (void *)new; } Modified: mvapich/trunk/src/coll/scatter.c =================================================================== --- mvapich/trunk/src/coll/scatter.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/coll/scatter.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -68,8 +68,8 @@ { int mpi_errno = MPI_SUCCESS; struct MPIR_COMMUNICATOR *comm_ptr; - struct MPIR_DATATYPE *stype_ptr; - struct MPIR_DATATYPE *rtype_ptr; + struct MPIR_DATATYPE *stype_ptr = NULL; + struct MPIR_DATATYPE *rtype_ptr = NULL; static char myname[] = "MPI_SCATTER"; MPIR_ERROR_DECL; Modified: mvapich/trunk/src/context/comm_free.c =================================================================== --- mvapich/trunk/src/context/comm_free.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/context/comm_free.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -59,6 +59,7 @@ #if (defined( _SMP_) && (defined(CH_GEN2) || defined(CH_SMP) || defined(CH_GEN2_UD) || defined(CH_PSM))) int flag = 0; +extern void free_2level_comm (struct MPIR_COMMUNICATOR*); #endif extern int enable_rdma_collectives; #ifdef _SMP_ Modified: mvapich/trunk/src/context/comm_rdma_init.c =================================================================== --- mvapich/trunk/src/context/comm_rdma_init.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/context/comm_rdma_init.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -45,8 +45,6 @@ struct L_Collbuf* local_coll; struct R_Collbuf* remote_coll; - dreg_entry* buf_entry = NULL; - if(comm->np <= 1) { /* We do not need to do any initialization */ Modified: mvapich/trunk/src/context/comm_util.c =================================================================== --- mvapich/trunk/src/context/comm_util.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/context/comm_util.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -33,6 +33,17 @@ #ifndef CH_GEN2 extern int viadev_use_on_demand; #endif + +#if (defined(VIADEV_RPUT_SUPPORT) || defined(VIADEV_RGET_SUPPORT)) +extern void comm_rdma_init(struct MPIR_COMMUNICATOR*); +extern void comm_exch_addr(struct MPIR_COMMUNICATOR*); +extern void set_local_offsets(struct MPIR_COMMUNICATOR* comm); +extern void coll_prepare_flags(struct Collbuf*); +extern void comm_rdma_allgather_init(struct MPIR_COMMUNICATOR *); +extern void clear_2level_comm (struct MPIR_COMMUNICATOR*); +extern void create_2level_comm (struct MPIR_COMMUNICATOR*, int, int); +#endif + /* MPIR_Comm_make_coll - make a hidden collective communicator Modified: mvapich/trunk/src/context/create_2level_comm.c =================================================================== --- mvapich/trunk/src/context/create_2level_comm.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/context/create_2level_comm.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -12,6 +12,7 @@ */ #if (defined( _SMP_) && (defined(CH_GEN2) || defined(CH_SMP) || defined(CH_GEN2_UD) || defined(CH_PSM))) +#include #include "mpiimpl.h" #include "mpimem.h" #include "mpid.h" @@ -43,6 +44,7 @@ extern int viadev_use_allgather_new; extern struct shmem_coll_mgmt shmem_coll_obj; +extern int MPID_Is_local(int); void clear_2level_comm (struct MPIR_COMMUNICATOR* comm_ptr) { @@ -117,7 +119,7 @@ } /* Creating local shmem group */ - int i, shmem_grp_size, local_rank; + int i, shmem_grp_size, local_rank=0; int grp_index = 0; for (i=0; i < size ; i++){ @@ -173,7 +175,7 @@ leader_group_size = grp_index; comm_ptr->leader_group_size = leader_group_size; - MPI_Group MPI_GROUP_WORLD, subgroup1, comm_group; + MPI_Group subgroup1, comm_group; MPI_Comm_group(comm_ptr->self, &comm_group); MPI_Group_incl(comm_group, leader_group_size, leader_group, &subgroup1); MPI_Comm_create(comm_ptr->self, subgroup1, &(comm_ptr->leader_comm)); @@ -191,7 +193,7 @@ shmem_ptr= MPIR_GET_COMM_PTR(comm_ptr->shmem_comm); shmem_ptr->comm_coll->shmem_coll_ok = 0; //shmem_ptr->comm_coll = shmem_ptr; - int shmem_collective = 0, my_local_id, input_flag =0, output_flag=0; + int my_local_id, input_flag =0, output_flag=0; MPI_Comm_rank(comm_ptr->shmem_comm, &my_local_id); if (my_local_id == 0){ @@ -251,7 +253,6 @@ if (is_block){ int counter=0,j; - MPI_Comm new_comm; comm_ptr->new_ranks = (int*) malloc(sizeof(int)*size); PPN = shmem_grp_size; @@ -285,7 +286,7 @@ int check_comm_registry(struct MPIR_COMMUNICATOR* comm) { - int context_id = 0, i =0, my_rank, size; + int context_id = 0, i =0; context_id = comm->recv_context; for (i = 0; i < comm_registered; i++){ Modified: mvapich/trunk/src/util/bsendutil2.c =================================================================== --- mvapich/trunk/src/util/bsendutil2.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/util/bsendutil2.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -420,8 +420,8 @@ void **bsend_buf, int *bsend_len ) { - int outcount, position = 0; - int mpi_errno; + int outcount = 0, position = 0; + int mpi_errno = 0; DEBUG_PRINT("Entering MPIR_BsendCopyData"); if (!b) { @@ -510,11 +510,11 @@ MPI_Request request, int *error_code ) { - int bsend_len; - void *bsend_buf; + int bsend_len = 0; + void *bsend_buf = NULL; int psize; int mpi_errno = MPI_SUCCESS; - BSendData * b; + BSendData * b = NULL; /* Trivial case first */ if (dest_grank == MPI_PROC_NULL) { Modified: mvapich/trunk/src/util/mpirutil.c =================================================================== --- mvapich/trunk/src/util/mpirutil.c 2008-10-03 21:52:08 UTC (rev 3041) +++ mvapich/trunk/src/util/mpirutil.c 2008-10-03 22:50:25 UTC (rev 3042) @@ -97,6 +97,10 @@ MPIR_Tab( indent ); PRINTF( "unsigned long\n" ); break; + case MPIR_ULONGLONG: + MPIR_Tab( indent ); + PRINTF( "unsigned long long\n" ); + break; case MPIR_LONG: MPIR_Tab( indent ); PRINTF( "long\n" ); From chail at mvapich.cse.ohio-state.edu Sun Oct 5 15:53:16 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Sun Oct 5 15:53:23 2008 Subject: [mvapich-commit] r3043 - in mvapich/trunk: mpid/ch_gen2 src/env util Message-ID: <200810051953.m95JrGGp004883@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-05 15:53:15 -0400 (Sun, 05 Oct 2008) New Revision: 3043 Modified: mvapich/trunk/mpid/ch_gen2/shmem_coll.c mvapich/trunk/src/env/nerrmsg.c mvapich/trunk/util/mpichversion.c Log: Fix compilation warnings. Modified: mvapich/trunk/mpid/ch_gen2/shmem_coll.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/shmem_coll.c 2008-10-03 22:50:25 UTC (rev 3042) +++ mvapich/trunk/mpid/ch_gen2/shmem_coll.c 2008-10-05 19:53:15 UTC (rev 3043) @@ -54,9 +54,6 @@ int MPID_SHMEM_COLL_init(void) { int pagesize = getpagesize(); -#ifdef _X86_64_ - volatile char tmpchar; -#endif shmem_coll_num_comm = shmem_coll_blocks; @@ -373,9 +370,6 @@ int MPID_SHMEM_BCAST_init(int file_size, int shmem_comm_rank, int my_local_rank, int* bcast_seg_size, char** bcast_shmem_file, int* fd) { int pagesize = getpagesize(); -#ifdef _X86_64_ - volatile char tmpchar; -#endif file_size = file_size + 3*SHMEM_BCAST_FLAGS + shmem_bcast_leaders*SHMEM_BCAST_METADATA; Modified: mvapich/trunk/src/env/nerrmsg.c =================================================================== --- mvapich/trunk/src/env/nerrmsg.c 2008-10-03 22:50:25 UTC (rev 3042) +++ mvapich/trunk/src/env/nerrmsg.c 2008-10-05 19:53:15 UTC (rev 3043) @@ -86,7 +86,7 @@ { int error_ring_pos, error_ring_id; const char *format; /* Even kind */ - const char *def_format; /* Odd kind */ + const char *def_format = ""; /* Odd kind */ va_list Argp; va_start( Argp, default_string ); @@ -101,7 +101,7 @@ { int error_ring_pos, error_ring_id; const char *format; /* Even kind */ - const char *def_format; /* Odd kind */ + const char *def_format = ""; /* Odd kind */ va_list Argp; va_start( Argp ); Modified: mvapich/trunk/util/mpichversion.c =================================================================== --- mvapich/trunk/util/mpichversion.c 2008-10-03 22:50:25 UTC (rev 3042) +++ mvapich/trunk/util/mpichversion.c 2008-10-05 19:53:15 UTC (rev 3043) @@ -6,6 +6,7 @@ #include "mpi.h" #include +#include /* * This program reports on properties of the MPICH library, such as the From koop at mvapich.cse.ohio-state.edu Sun Oct 5 19:19:33 2008 From: koop at mvapich.cse.ohio-state.edu (koop@mvapich.cse.ohio-state.edu) Date: Sun Oct 5 19:19:39 2008 Subject: [mvapich-commit] r3047 - mvapich/trunk/mpid/ch_gen2 Message-ID: <200810052319.m95NJX3F005273@mvapich.cse.ohio-state.edu> Author: koop Date: 2008-10-05 19:19:32 -0400 (Sun, 05 Oct 2008) New Revision: 3047 Modified: mvapich/trunk/mpid/ch_gen2/viainit.c Log: * Move XRC finalization until after SRQs are destroyed Thanks to Pasha at Mellanox (OpenFabrics: #1244) Modified: mvapich/trunk/mpid/ch_gen2/viainit.c =================================================================== --- mvapich/trunk/mpid/ch_gen2/viainit.c 2008-10-05 23:14:49 UTC (rev 3046) +++ mvapich/trunk/mpid/ch_gen2/viainit.c 2008-10-05 23:19:32 UTC (rev 3047) @@ -1745,27 +1745,6 @@ } } } -#ifdef XRC - if (viadev_use_xrc) { - char xrc_file[256+26+22+3]; - - free (viadev.hostids); - if (viadev_multihca) - free (viadev.def_hcas); - - clear_xrc_hash (); - - if (ibv_close_xrc_domain (viadev.xrc_info->xrc_domain)) - error_abort_all (IBV_RETURN_ERR, "Error closing XRC domain"); - - close (viadev.xrc_info->fd); - - sprintf (xrc_file, "/tmp/mvapich-xrc-%d-%s-%d-%d.tmp", - viadev.global_id, viadev.my_name, getuid (), - viadev_default_hca); - unlink (xrc_file); - } -#endif MPICM_Finalize_UD(); if (viadev.ud_qpn_table) free(viadev.ud_qpn_table); @@ -1844,6 +1823,28 @@ /* unregister all user buffer registration */ while (dreg_evict()); +#ifdef XRC + if (viadev_use_xrc) { + char xrc_file[256+26+22+3]; + + free (viadev.hostids); + if (viadev_multihca) + free (viadev.def_hcas); + + clear_xrc_hash (); + + if (ibv_close_xrc_domain (viadev.xrc_info->xrc_domain)) + error_abort_all (IBV_RETURN_ERR, "Error closing XRC domain"); + + close (viadev.xrc_info->fd); + + sprintf (xrc_file, "/tmp/mvapich-xrc-%d-%s-%d-%d.tmp", + viadev.global_id, viadev.my_name, getuid (), + viadev_default_hca); + unlink (xrc_file); + } +#endif + if (ibv_dealloc_pd(viadev.ptag)) { error_abort_all(IBV_RETURN_ERR, "could not dealloc PD"); } From perkinjo at mvapich.cse.ohio-state.edu Mon Oct 6 10:10:19 2008 From: perkinjo at mvapich.cse.ohio-state.edu (perkinjo@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 10:10:26 2008 Subject: [mvapich-commit] r3049 - mvapich2/trunk/confdb Message-ID: <200810061410.m96EAJZJ013422@mvapich.cse.ohio-state.edu> Author: perkinjo Date: 2008-10-06 10:10:18 -0400 (Mon, 06 Oct 2008) New Revision: 3049 Modified: mvapich2/trunk/confdb/aclocal_subcfg.m4 Log: Fix typo fixed after the mpich2-1.0.7 release. Thanks to Tom Crockett for pointing this out. Modified: mvapich2/trunk/confdb/aclocal_subcfg.m4 =================================================================== --- mvapich2/trunk/confdb/aclocal_subcfg.m4 2008-10-06 02:32:42 UTC (rev 3048) +++ mvapich2/trunk/confdb/aclocal_subcfg.m4 2008-10-06 14:10:18 UTC (rev 3049) @@ -36,7 +36,7 @@ CFLAGS="$MPICH2_INTERNAL_CFLAGS" CXXFLAGS="$MPICH2_INTERNAL_CXXFLAGS" FFLAGS="$MPICH2_INTERNAL_FFLAGS" - F90FLAGS="$MPICH2_INTERNAL_C90FLAGS" + F90FLAGS="$MPICH2_INTERNAL_F90FLAGS" ])dnl dnl dnl Do we need PAC_SUBCONFIG_FINALIZE or PAC_MPICH2_FINALIZE ? From perkinjo at mvapich.cse.ohio-state.edu Mon Oct 6 10:12:36 2008 From: perkinjo at mvapich.cse.ohio-state.edu (perkinjo@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 10:12:42 2008 Subject: [mvapich-commit] r3050 - in mvapich2/trunk: . src/pm src/pm/mpirun Message-ID: <200810061412.m96ECaQ3013440@mvapich.cse.ohio-state.edu> Author: perkinjo Date: 2008-10-06 10:12:36 -0400 (Mon, 06 Oct 2008) New Revision: 3050 Modified: mvapich2/trunk/Makefile.sm mvapich2/trunk/configure.in mvapich2/trunk/src/pm/Makefile.sm mvapich2/trunk/src/pm/mpirun/configure.in Log: Always build and install mpirun_rsh in addition to the process manager(s) selected through the --with-pm mechanism. Modified: mvapich2/trunk/Makefile.sm =================================================================== --- mvapich2/trunk/Makefile.sm 2008-10-06 14:10:18 UTC (rev 3049) +++ mvapich2/trunk/Makefile.sm 2008-10-06 14:12:36 UTC (rev 3050) @@ -203,6 +203,7 @@ # The "other" process managers when more that one are built install_local_DIR = libdir install-local: + -(cd src/pm/mpirun && $(MAKE) install) -if [ "@BUILD_TVDLL@" = "yes" ] ; then \ $(INSTALL_DATA) src/mpi/debugger/libtvmpich2.@SHLIB_EXT@ \ ${DESTDIR}${libdir}/libtvmpich2.@SHLIB_EXT@ ; fi Modified: mvapich2/trunk/configure.in =================================================================== --- mvapich2/trunk/configure.in 2008-10-06 14:10:18 UTC (rev 3049) +++ mvapich2/trunk/configure.in 2008-10-06 14:12:36 UTC (rev 3050) @@ -1272,10 +1272,7 @@ with_pm="no" fi if test "$with_pm" = "default" -o "$with_pm" = "yes" ; then -dnl <_OSU_MVAPICH_> -dnl with_pm=mpd - with_pm=mpirun:mpd -dnl + with_pm=mpd fi # We allow multiple pm names, separated by : or , @@ -5874,7 +5871,7 @@ export MPI_NO_SPAWN MPI_NO_RMA=$MPID_NO_RMA export MPI_NO_RMA -AC_CONFIG_SUBDIRS(test/mpi) +AC_CONFIG_SUBDIRS(test/mpi src/pm/mpirun) dnl dnl Generate the Makefiles from Makefile.in dnl Also generate mpi.h from mpi.h.in so that we can eliminate all ifdefs Modified: mvapich2/trunk/src/pm/Makefile.sm =================================================================== --- mvapich2/trunk/src/pm/Makefile.sm 2008-10-06 14:10:18 UTC (rev 3049) +++ mvapich2/trunk/src/pm/Makefile.sm 2008-10-06 14:12:36 UTC (rev 3050) @@ -15,16 +15,18 @@ # SUBDIRS_pm_name = mpd smpd gforker remshell SUBDIRS_pm_name = mpd smpd gforker remshell mpirun # -SUBDIRS = @pm_name@ @other_pm_names@ . +SUBDIRS = @pm_name@ @other_pm_names@ mpirun . # Remove PMPILIBNAME from the common make variables for the mpid # directories smvarSubdir_commonmake=MPILIBNAME = @MPILIBNAME@ -OTHER_DIRS = util +OTHER_DIRS = util mpirun NOTSIMPLEMAKE_SUBDIRS = mpd # We need to handle the case where the process manager is external to # MPICH2 all-postamble: + build_prefix=`cd ../.. && pwd` && cd mpirun && \ + ${MAKE} prefix=$$build_prefix exec_prefix=$$build_prefix bindir=$$build_prefix/bin mpich2-build-install ; \ if [ -n "@pm_name@" -a -d "@pm_name@" ] ; then \ build_prefix=`cd ../.. && pwd` && cd @pm_name@ && \ ${MAKE} prefix=$$build_prefix exec_prefix=$$build_prefix bindir=$$build_prefix/bin mpich2-build-install ; \ @@ -32,6 +34,8 @@ # Add util to distclean if possible distclean-local: + build_prefix=`cd ../.. && pwd` && cd mpirun && \ + ${MAKE} prefix=$$build_prefix exec_prefix=$$build_prefix bindir=$$build_prefix/bin mpich2-build-uninstall ; \ if [ -n "@pm_name@" -a -d "@pm_name@" ] ; then \ build_prefix=`cd ../.. && pwd` && cd @pm_name@ && \ ${MAKE} prefix=$$build_prefix exec_prefix=$$build_prefix bindir=$$build_prefix/bin mpich2-build-uninstall ; \ Modified: mvapich2/trunk/src/pm/mpirun/configure.in =================================================================== --- mvapich2/trunk/src/pm/mpirun/configure.in 2008-10-06 14:10:18 UTC (rev 3049) +++ mvapich2/trunk/src/pm/mpirun/configure.in 2008-10-06 14:12:36 UTC (rev 3050) @@ -62,7 +62,7 @@ fi if test "$enable_blcr" = "yes"; then - AC_MSG_ERROR([BLCR is not supported by mpirun.]) + AC_MSG_WARN([BLCR is not supported by mpirun_rsh.]) fi if test "$enable_rsh" = "yes"; then From chail at mvapich.cse.ohio-state.edu Mon Oct 6 15:52:15 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 15:52:23 2008 Subject: [mvapich-commit] r3052 - in mvapich2/trunk/src: env/mpiname mpe2/src/wrappers/src mpi/init mpi/pt2pt mpi/rma mpi/romio/adio/common pm/mpirun/mpispawn pmi/simple util/mem Message-ID: <200810061952.m96JqFKT014146@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-06 15:52:13 -0400 (Mon, 06 Oct 2008) New Revision: 3052 Modified: mvapich2/trunk/src/env/mpiname/mpiname.c mvapich2/trunk/src/mpe2/src/wrappers/src/log_mpi_core.c mvapich2/trunk/src/mpi/init/init.c mvapich2/trunk/src/mpi/init/initthread.c mvapich2/trunk/src/mpi/pt2pt/mpir_request.c mvapich2/trunk/src/mpi/rma/win_create.c mvapich2/trunk/src/mpi/romio/adio/common/ad_fstype.c mvapich2/trunk/src/pm/mpirun/mpispawn/mpispawn.c mvapich2/trunk/src/pmi/simple/simple_pmi.c mvapich2/trunk/src/util/mem/trmem.c Log: Fix compilation warnings. Modified: mvapich2/trunk/src/env/mpiname/mpiname.c =================================================================== --- mvapich2/trunk/src/env/mpiname/mpiname.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/env/mpiname/mpiname.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -72,8 +72,6 @@ int main (int argc, char* argv[]) { int c; - int printCompilers = 0; - int printOptions = 0; while ((c = getopt(argc, argv, "acdhnorv")) != -1) { Modified: mvapich2/trunk/src/mpe2/src/wrappers/src/log_mpi_core.c =================================================================== --- mvapich2/trunk/src/mpe2/src/wrappers/src/log_mpi_core.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/mpe2/src/wrappers/src/log_mpi_core.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -401,17 +401,17 @@ #else #define MPE_LOG_STATE_DECL \ - register MPE_State *state; \ - register const CLOG_CommIDs_t *commIDs; \ + register MPE_State *state = 0; \ + register const CLOG_CommIDs_t *commIDs = 0; \ MPE_LOG_SWITCH_DECL #define MPE_LOG_COMM_DECL \ - register MPE_Event *solo_event; \ - register const CLOG_CommIDs_t *new_commIDs; + register MPE_Event *solo_event = 0; \ + register const CLOG_CommIDs_t *new_commIDs = 0; #define MPE_LOG_SOLO_EVENT_DECL \ - register MPE_Event *solo_event; + register MPE_Event *solo_event = 0; #define MPE_LOG_BYTEBUF_DECL \ - MPE_LOG_BYTES bytebuf; \ - int bytebuf_pos; + MPE_LOG_BYTES bytebuf = {0}; \ + int bytebuf_pos = 0; #endif Modified: mvapich2/trunk/src/mpi/init/init.c =================================================================== --- mvapich2/trunk/src/mpi/init/init.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/mpi/init/init.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -80,6 +80,11 @@ #if defined(_OSU_MVAPICH_) extern int split_comm; extern int enable_shmem_collectives; +extern void MV2_Read_env_vars(); +extern int check_split_comm(pthread_t); +extern int disable_split_comm(pthread_t); +extern void create_2level_comm (MPI_Comm, int, int); +extern int enable_split_comm(pthread_t); #endif /* defined(_OSU_MVAPICH_) */ int MPI_Init( int *argc, char ***argv ) { @@ -88,7 +93,6 @@ MPID_MPI_INIT_STATE_DECL(MPID_STATE_MPI_INIT); #if defined(_OSU_MVAPICH_) - char* value = NULL; MPIU_THREADPRIV_DECL; MPIU_THREADPRIV_GET; #endif /* defined(_OSU_MVAPICH_) */ Modified: mvapich2/trunk/src/mpi/init/initthread.c =================================================================== --- mvapich2/trunk/src/mpi/init/initthread.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/mpi/init/initthread.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -422,6 +422,11 @@ void MV2_Read_env_vars(void); void init_thread_reg(); +extern int check_split_comm(pthread_t); +extern int disable_split_comm(pthread_t); +extern void create_2level_comm (MPI_Comm, int, int); +extern int enable_split_comm(pthread_t); + struct coll_runtime coll_param = { MPIR_ALLREDUCE_SHORT_MSG, MPIR_REDUCE_SHORT_MSG, SHMEM_ALLREDUCE_THRESHOLD, Modified: mvapich2/trunk/src/mpi/pt2pt/mpir_request.c =================================================================== --- mvapich2/trunk/src/mpi/pt2pt/mpir_request.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/mpi/pt2pt/mpir_request.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -562,11 +562,11 @@ #define FCNAME MPIDI_QUOTE(FUNCNAME) int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs) { - MPIX_Grequest_wait_function *wait_fn = NULL; + /* MPIX_Grequest_wait_function *wait_fn = NULL; */ void ** state_ptrs; - int i, n_greq; + int i; int mpi_error = MPI_SUCCESS; - MPIX_Grequest_class curr_class; + /* MPIX_Grequest_class curr_class; */ MPIU_CHKLMEM_DECL(1); MPIU_CHKLMEM_MALLOC(state_ptrs, void *, sizeof(void*)*count, mpi_error, "state_ptrs"); Modified: mvapich2/trunk/src/mpi/rma/win_create.c =================================================================== --- mvapich2/trunk/src/mpi/rma/win_create.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/mpi/rma/win_create.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -26,7 +26,7 @@ #ifdef USE_MPID_RMA_TABLE /* This is the home of the RMA function table */ -MPIRI_RMAFns MPIR_RMA_Fns = {1,0}; +MPIRI_RMAFns MPIR_RMA_Fns = {(void *)1, (void *)0}; #endif #endif Modified: mvapich2/trunk/src/mpi/romio/adio/common/ad_fstype.c =================================================================== --- mvapich2/trunk/src/mpi/romio/adio/common/ad_fstype.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/mpi/romio/adio/common/ad_fstype.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -9,6 +9,7 @@ */ #include "adio.h" +#include "mpiimpl.h" #ifdef HAVE_UNISTD_H #include Modified: mvapich2/trunk/src/pm/mpirun/mpispawn/mpispawn.c =================================================================== --- mvapich2/trunk/src/pm/mpirun/mpispawn/mpispawn.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/pm/mpirun/mpispawn/mpispawn.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -17,6 +17,7 @@ #include #include #include +#include #include "mpirun_util.h" #include "mpispawn_tree.h" Modified: mvapich2/trunk/src/pmi/simple/simple_pmi.c =================================================================== --- mvapich2/trunk/src/pmi/simple/simple_pmi.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/pmi/simple/simple_pmi.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -123,6 +123,8 @@ static char cached_singinit_val[PMIU_MAXLINE]; static char singinit_kvsname[256]; +extern void MPIU_Exit(int); + /******************************** Group functions *************************/ int PMI_Init( int *spawned ) Modified: mvapich2/trunk/src/util/mem/trmem.c =================================================================== --- mvapich2/trunk/src/util/mem/trmem.c 2008-10-06 15:24:31 UTC (rev 3051) +++ mvapich2/trunk/src/util/mem/trmem.c 2008-10-06 19:52:13 UTC (rev 3052) @@ -254,7 +254,7 @@ /* Note that %08p (what we'd like to use) isn't accepted by all compilers */ MPIU_Error_printf( "[%d] Allocating %d bytes at %8p in %s:%d\n", - world_rank, a, new, fname, lineno ); + world_rank, (int)a, new, fname, lineno ); } return (void *)new; } From gopalakk at mvapich.cse.ohio-state.edu Mon Oct 6 16:06:26 2008 From: gopalakk at mvapich.cse.ohio-state.edu (gopalakk@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 16:06:34 2008 Subject: [mvapich-commit] r3053 - in mvapich2/trunk/src: mpi/coll mpi/comm mpid/ch3/src Message-ID: <200810062006.m96K6QNi014201@mvapich.cse.ohio-state.edu> Author: gopalakk Date: 2008-10-06 16:06:25 -0400 (Mon, 06 Oct 2008) New Revision: 3053 Modified: mvapich2/trunk/src/mpi/coll/allgather.c mvapich2/trunk/src/mpi/coll/allgatherv.c mvapich2/trunk/src/mpi/coll/allreduce.c mvapich2/trunk/src/mpi/coll/alltoallv.c mvapich2/trunk/src/mpi/coll/barrier.c mvapich2/trunk/src/mpi/coll/bcast.c mvapich2/trunk/src/mpi/coll/reduce.c mvapich2/trunk/src/mpi/comm/comm_create.c mvapich2/trunk/src/mpi/comm/comm_dup.c mvapich2/trunk/src/mpi/comm/comm_free.c mvapich2/trunk/src/mpi/comm/comm_split.c mvapich2/trunk/src/mpi/comm/create_2level_comm.c mvapich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c mvapich2/trunk/src/mpid/ch3/src/ch3u_rndv.c mvapich2/trunk/src/mpid/ch3/src/mpid_issend.c mvapich2/trunk/src/mpid/ch3/src/mpid_ssend.c Log: Fix compiler warnings. Modified: mvapich2/trunk/src/mpi/coll/allgather.c =================================================================== --- mvapich2/trunk/src/mpi/coll/allgather.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/allgather.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -138,7 +138,7 @@ MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr ); #if defined(_OSU_MVAPICH_) if (recvcount * comm_size * type_size < MPIR_ALLGATHER_LONG_MSG - && (comm_size & comm_size - 1) == 0) + && (comm_size & (comm_size - 1)) == 0) { #else /* defined(_OSU_MVAPICH_) */ if ((recvcount*comm_size*type_size < MPIR_ALLGATHER_LONG_MSG) && Modified: mvapich2/trunk/src/mpi/coll/allgatherv.c =================================================================== --- mvapich2/trunk/src/mpi/coll/allgatherv.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/allgatherv.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -132,7 +132,7 @@ MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr ); #if defined(_OSU_MVAPICH_) if (total_count * recvtype_size < MPIR_ALLGATHER_LONG_MSG - && (comm_size & comm_size - 1) == 0) + && (comm_size & (comm_size - 1)) == 0) { #else /* defined(_OSU_MVAPICH_) */ if ((total_count*recvtype_size < MPIR_ALLGATHER_LONG_MSG) && Modified: mvapich2/trunk/src/mpi/coll/allreduce.c =================================================================== --- mvapich2/trunk/src/mpi/coll/allreduce.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/allreduce.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -628,14 +628,16 @@ MPI_Comm shmem_comm, leader_comm; MPID_Comm *shmem_commptr = NULL, *leader_commptr = NULL; int local_rank = -1, global_rank = -1, local_size=0, my_rank; - void* local_buf = NULL, *tmpbuf = NULL; + void* local_buf = NULL; MPI_Aint true_lb, true_extent, extent; MPI_User_function *uop = NULL; - int stride = 0, i, is_commutative, size; + int stride = 0, i, is_commutative = 0; MPID_Op *op_ptr = NULL; - MPI_Status status; - int leader_root, total_size, shmem_comm_rank; + int total_size, shmem_comm_rank; MPIU_CHKLMEM_DECL(1); + extern int check_comm_registry(MPI_Comm); + extern int MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(int, int, int, void**); + extern void MPIDI_CH3I_SHMEM_COLL_SetGatherComplete(int, int, int); #if defined(HAVE_CXX_BINDING) int is_cxx_uop = 0; #endif /* defined(HAVE_CXX_BINDING) */ Modified: mvapich2/trunk/src/mpi/coll/alltoallv.c =================================================================== --- mvapich2/trunk/src/mpi/coll/alltoallv.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/alltoallv.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -69,13 +69,15 @@ int comm_size, i; MPI_Aint send_extent, recv_extent; int mpi_errno = MPI_SUCCESS; - MPI_Status *starray; - MPI_Request *reqarray; - int dst, rank, req_cnt; + int dst, rank; MPI_Comm comm; #if defined(_OSU_MVAPICH_) int pof2, src; MPI_Status status; +#else + MPI_Status *starray; + MPI_Request *reqarray; + int req_cnt; #endif comm = comm_ptr->handle; Modified: mvapich2/trunk/src/mpi/coll/barrier.c =================================================================== --- mvapich2/trunk/src/mpi/coll/barrier.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/barrier.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -349,13 +349,12 @@ int mpi_errno = MPI_SUCCESS; MPID_Comm *comm_ptr = NULL; #if defined(_OSU_MVAPICH_) - char* shmem_buf = NULL; MPI_Comm shmem_comm, leader_comm; MPID_Comm *shmem_commptr = NULL, *leader_commptr = NULL; - int local_rank = -1, global_rank = -1, local_size=0, my_rank; - void* local_buf = NULL, *tmpbuf = NULL; - int stride = 0, i, is_commutative, size; - int leader_root, total_size, shmem_comm_rank; + int local_rank = -1, local_size=0, my_rank; + int total_size, shmem_comm_rank; + extern void MPIDI_CH3I_SHMEM_COLL_Barrier_gather(int, int, int); + extern void MPIDI_CH3I_SHMEM_COLL_Barrier_bcast(int, int, int); #endif /* defined(_OSU_MVAPICH_) */ MPID_MPI_STATE_DECL(MPID_STATE_MPI_BARRIER); Modified: mvapich2/trunk/src/mpi/coll/bcast.c =================================================================== --- mvapich2/trunk/src/mpi/coll/bcast.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/bcast.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -16,6 +16,7 @@ */ #include "mpiimpl.h" +#include /* -- Begin Profiling Symbol Block for routine MPI_Bcast */ #if defined(HAVE_PRAGMA_WEAK) @@ -370,7 +371,7 @@ /* check if comm_size is a power of two */ #if defined(_OSU_MVAPICH_) if (nbytes < MPIR_BCAST_LONG_MSG - && (comm_size & comm_size - 1) == 0) + && (comm_size & (comm_size - 1)) == 0) #else /* defined(_OSU_MVAPICH_) */ pof2 = 1; while (pof2 < comm_size) @@ -687,7 +688,7 @@ /* check if comm_size is a power of two */ #if defined(_OSU_MVAPICH_) if (nbytes < MPIR_BCAST_LONG_MSG - && (comm_size & comm_size - 1) == 0) + && (comm_size & (comm_size - 1)) == 0) #else /* defined(_OSU_MVAPICH_) */ pof2 = 1; while (pof2 < comm_size) @@ -1159,6 +1160,10 @@ int MPID_SHMEM_BCAST_mmap(void** mmap_ptr, int bcast_seg_size, int fd, int my_local_rank, char* bcast_shmem_file); +extern void MPID_SHMEM_COLL_GetShmemBcastBuf(void**, void*); +extern void signal_local_processes(int, int, char*, int, int, void*); +extern void wait_for_signal(int, int, char**, int*, int*, void*); + int viadev_use_shmem_ring= 1; int intra_shmem_Bcast_Large( void *buffer, @@ -1173,18 +1178,16 @@ int relative_rank, mask; int mpi_errno = MPI_SUCCESS; int scatter_size, curr_size, recv_size, send_size; - int j,i; - int recv_offset, offset; - int *recvcnts, *displs, left, right, jnext; - void *tmp_buf; + int j=0, i; + int *recvcnts = NULL, *displs = NULL, left, right, jnext; + void *tmp_buf = NULL; char* shmem_buf; - MPI_Comm shmem_comm, leader_comm; + MPI_Comm shmem_comm, leader_comm = 0; MPID_Comm *comm_ptr = 0,*shmem_commptr = 0; - int local_rank = -1, local_size=0, relative_lcomm_rank, relative_lcomm_dst; - void* local_buf=NULL, *tmpbuf=NULL; + int local_rank = -1, local_size=0, relative_lcomm_rank; int leader_comm_size, leader_comm_rank; - int leader_root, shmem_comm_rank, num_bytes=0, shmem_offset=-1; + int shmem_comm_rank, num_bytes=0, shmem_offset=-1; int index; int file_size = shmem_bcast_threshold; int ret_val = 0, flag = 0; Modified: mvapich2/trunk/src/mpi/coll/reduce.c =================================================================== --- mvapich2/trunk/src/mpi/coll/reduce.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/coll/reduce.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -736,13 +736,16 @@ MPID_Comm *shmem_commptr = NULL, *leader_commptr = NULL; int local_rank = -1, global_rank = -1, local_size=0, my_rank; void* local_buf = NULL, *tmpbuf = NULL, *tmpbuf1 = NULL; - MPI_Aint true_lb, true_extent, extent; + MPI_Aint true_lb, true_extent, extent = 0; MPI_User_function *uop = NULL; - int stride = 0, i, is_commutative, size; + int stride = 0, i, is_commutative = 0; MPID_Op *op_ptr = NULL; MPI_Status status; - int leader_root, total_size, shmem_comm_rank; + int leader_root = 0, total_size, shmem_comm_rank; MPIU_CHKLMEM_DECL(2); + extern int check_comm_registry(MPI_Comm); + extern int MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(int, int, int, void**); + extern void MPIDI_CH3I_SHMEM_COLL_SetGatherComplete(int, int, int); #if defined(HAVE_CXX_BINDING) int is_cxx_uop = 0; #endif /* defined(HAVE_CXX_BINDING) */ Modified: mvapich2/trunk/src/mpi/comm/comm_create.c =================================================================== --- mvapich2/trunk/src/mpi/comm/comm_create.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/comm/comm_create.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -67,6 +67,10 @@ #if defined(_OSU_MVAPICH_) int split_comm = 1; extern int enable_shmem_collectives; +extern int check_split_comm(pthread_t); +extern int disable_split_comm(pthread_t); +extern void create_2level_comm (MPI_Comm, int, int); +extern int enable_split_comm(pthread_t); #endif /* defined(_OSU_MVAPICH_) */ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) Modified: mvapich2/trunk/src/mpi/comm/comm_dup.c =================================================================== --- mvapich2/trunk/src/mpi/comm/comm_dup.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/comm/comm_dup.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -89,6 +89,10 @@ #if defined(_OSU_MVAPICH_) extern int split_comm; extern int enable_shmem_collectives; +extern int check_split_comm(pthread_t); +extern int disable_split_comm(pthread_t); +extern void create_2level_comm (MPI_Comm, int, int); +extern int enable_split_comm(pthread_t); #endif /* defined(_OSU_MVAPICH_) */ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) Modified: mvapich2/trunk/src/mpi/comm/comm_free.c =================================================================== --- mvapich2/trunk/src/mpi/comm/comm_free.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/comm/comm_free.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -17,6 +17,7 @@ #include "mpiimpl.h" #include "mpicomm.h" +#include /* -- Begin Profiling Symbol Block for routine MPI_Comm_free */ #if defined(HAVE_PRAGMA_WEAK) Modified: mvapich2/trunk/src/mpi/comm/comm_split.c =================================================================== --- mvapich2/trunk/src/mpi/comm/comm_split.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/comm/comm_split.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -108,6 +108,10 @@ #if defined(_OSU_MVAPICH_) extern int split_comm; extern int enable_shmem_collectives; +extern int check_split_comm(pthread_t); +extern int disable_split_comm(pthread_t); +extern void create_2level_comm (MPI_Comm, int, int); +extern int enable_split_comm(pthread_t); #endif /* defined(_OSU_MVAPICH_) */ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) Modified: mvapich2/trunk/src/mpi/comm/create_2level_comm.c =================================================================== --- mvapich2/trunk/src/mpi/comm/create_2level_comm.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpi/comm/create_2level_comm.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -27,7 +27,6 @@ int shmem_comm_count = 0; extern shmem_coll_region *shmem_coll; -static pthread_mutex_t shmem_coll_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t comm_lock = PTHREAD_MUTEX_INITIALIZER; extern int g_shmem_coll_blocks; @@ -50,7 +49,8 @@ clear_2level_comm(comm_ptr); } -void create_2level_comm (MPI_Comm comm, int size, int my_rank){ +void create_2level_comm (MPI_Comm comm, int size, int my_rank) +{ MPID_Comm* comm_ptr; MPID_Comm* comm_world_ptr; @@ -69,7 +69,7 @@ /* Creating local shmem group */ int i = 0; - int local_rank; + int local_rank = 0; int grp_index = 0; MPIDI_VC_t* vc = NULL; for (; i < size ; ++i){ @@ -83,8 +83,6 @@ } } - int shmem_grp_size = grp_index; - /* Creating leader group */ int leader = 0; leader = shmem_group[0]; @@ -129,7 +127,7 @@ leader_group_size = grp_index; comm_ptr->leader_group_size = leader_group_size; - MPI_Group MPI_GROUP_WORLD, subgroup1, comm_group; + MPI_Group subgroup1, comm_group; MPI_Comm_group(comm, &comm_group); @@ -146,7 +144,7 @@ MPID_Comm_get_ptr(comm_ptr->shmem_comm, shmem_ptr); - int shmem_collective = 0, my_local_id, input_flag =0, output_flag=0; + int my_local_id, input_flag =0, output_flag=0; MPI_Comm_rank(comm_ptr->shmem_comm, &my_local_id); if (my_local_id == 0){ Modified: mvapich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -82,6 +82,7 @@ int num_wait_completions; int need_dummy = 0, j; MPIDI_VC_t* vc = NULL; + extern void MPIDI_CH3I_RDMA_complete_rma(MPID_Win *, int , int *, int); #endif /* defined(_OSU_MVAPICH_) */ MPIU_CHKLMEM_DECL(7); MPIU_THREADPRIV_DECL; @@ -1394,6 +1395,7 @@ int start_grp_size, *ranks_in_start_grp, *ranks_in_win_grp, rank; #if defined(_OSU_MVAPICH_) int need_dummy = 0; + extern void MPIDI_CH3I_RDMA_complete_rma(MPID_Win *, int, int *, int); #endif /* defined(_OSU_MVAPICH_) */ MPIU_CHKLMEM_DECL(7); MPIU_THREADPRIV_DECL; @@ -1736,7 +1738,6 @@ #if defined(_OSU_MVAPICH_) int newly_finished, num_wait_completions, index; int i,j; - int num = 0; #endif /* defined(_OSU_MVAPICH_) */ MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_WAIT); @@ -1799,7 +1800,6 @@ fn_fail: #endif /* defined(_OSU_MVAPICH_) */ - fn_exit: MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_WAIT); return mpi_errno; } @@ -3938,11 +3938,13 @@ /* return the number of bytes processed in this function */ *buflen = data_len + sizeof(MPIDI_CH3_Pkt_t); } - fn_exit: + +#ifndef _OSU_MVAPICH_ +fn_fail: +#endif + MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_GETRESP); return mpi_errno; - fn_fail: - goto fn_exit; } #undef FUNCNAME Modified: mvapich2/trunk/src/mpid/ch3/src/ch3u_rndv.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/src/ch3u_rndv.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpid/ch3/src/ch3u_rndv.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -199,6 +199,9 @@ *buflen = sizeof(MPIDI_CH3_Pkt_t); #if defined(_OSU_MVAPICH_) MPIDI_CH3_RNDV_SET_REQ_INFO(rreq, rts_pkt); + extern int MPIDI_CH3_Rndv_transfer(MPIDI_VC_t *, MPID_Request *, MPID_Request *, + MPIDI_CH3_Pkt_rndv_clr_to_send_t *, + MPIDI_CH3_Pkt_rndv_req_to_send_t *); #endif /* defined(_OSU_MVAPICH_) */ if (found) @@ -326,17 +329,21 @@ { MPIDI_CH3_Pkt_rndv_clr_to_send_t * cts_pkt = &pkt->rndv_clr_to_send; MPID_Request * sreq; + int mpi_errno = MPI_SUCCESS; +#if defined(_OSU_MVAPICH_) + int recv_size; + int i; + extern int MPIDI_CH3_Rndv_transfer(MPIDI_VC_t *, MPID_Request *, MPID_Request *, + MPIDI_CH3_Pkt_rndv_clr_to_send_t *, + MPIDI_CH3_Pkt_rndv_req_to_send_t *); +#else + MPIDI_CH3_Pkt_t upkt; MPID_Request * rts_sreq; - MPIDI_CH3_Pkt_t upkt; MPIDI_CH3_Pkt_rndv_send_t * rs_pkt = &upkt.rndv_send; int dt_contig; MPI_Aint dt_true_lb; MPIDI_msg_sz_t data_sz; MPID_Datatype * dt_ptr; - int mpi_errno = MPI_SUCCESS; -#if defined(_OSU_MVAPICH_) - int recv_size; - int i; #endif /* defined(_OSU_MVAPICH_) */ MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received rndv CTS pkt"); @@ -356,7 +363,7 @@ if (recv_size < sreq->dev.iov[i].MPID_IOV_LEN) { fprintf(stderr, "Warning! Rndv Receiver is receiving " "(%d < %d) less than as expected\n", - recv_size, sreq->dev.iov[i].MPID_IOV_LEN); + recv_size, (int) sreq->dev.iov[i].MPID_IOV_LEN); sreq->dev.iov[i].MPID_IOV_LEN = recv_size; sreq->dev.iov_count = i + 1; break; Modified: mvapich2/trunk/src/mpid/ch3/src/mpid_issend.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/src/mpid_issend.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpid/ch3/src/mpid_issend.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -24,9 +24,6 @@ MPID_Datatype * dt_ptr; MPID_Request * sreq; MPIDI_VC_t * vc; -#if defined(MPID_USE_SEQUENCE_NUMBERS) - MPID_Seqnum_t seqnum; -#endif int mpi_errno = MPI_SUCCESS; MPIDI_STATE_DECL(MPID_STATE_MPID_ISSEND); Modified: mvapich2/trunk/src/mpid/ch3/src/mpid_ssend.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/src/mpid_ssend.c 2008-10-06 19:52:13 UTC (rev 3052) +++ mvapich2/trunk/src/mpid/ch3/src/mpid_ssend.c 2008-10-06 20:06:25 UTC (rev 3053) @@ -24,9 +24,6 @@ MPID_Datatype * dt_ptr; MPID_Request * sreq = NULL; MPIDI_VC_t * vc; -#if defined(MPID_USE_SEQUENCE_NUMBERS) - MPID_Seqnum_t seqnum; -#endif int mpi_errno = MPI_SUCCESS; MPIDI_STATE_DECL(MPID_STATE_MPID_SSEND); From gangadha at mvapich.cse.ohio-state.edu Mon Oct 6 16:21:15 2008 From: gangadha at mvapich.cse.ohio-state.edu (gangadha@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 16:21:23 2008 Subject: [mvapich-commit] r3054 - in mvapich2/trunk/src/mpid: ch3/channels/mrail/src/gen2 ch3/channels/mrail/src/rdma ch3/src common/datatype common/datatype/dataloop common/locks Message-ID: <200810062021.m96KLFKx014234@mvapich.cse.ohio-state.edu> Author: gangadha Date: 2008-10-06 16:21:13 -0400 (Mon, 06 Oct 2008) New Revision: 3054 Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/cm.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/dreg.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_channel_manager.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_impl.h mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_rndv.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_send.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_cm.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ring_startup.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_read_progress.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_rndvtransfer.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c mvapich2/trunk/src/mpid/ch3/src/ch3u_handle_connection.c mvapich2/trunk/src/mpid/common/datatype/dataloop/dataloop.c mvapich2/trunk/src/mpid/common/datatype/dataloop/segment_ops.c mvapich2/trunk/src/mpid/common/datatype/mpid_type_debug.c mvapich2/trunk/src/mpid/common/locks/mpidu_process_locks.h Log: Warnings removal checkin. Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/cm.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/cm.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/cm.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -1203,7 +1203,6 @@ struct ibv_sge list; struct ibv_send_wr wr; struct ibv_send_wr *bad_wr; - struct ibv_wc wc; msg.msg_type = CM_MSG_TYPE_FIN_SELF; memcpy((char*)cm_ud_send_buf + 40, &msg, sizeof(cm_msg)); memset(&list, 0, sizeof(struct ibv_sge)); Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/dreg.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/dreg.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/dreg.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -895,8 +895,6 @@ DREG_REMOVE_FROM_UNUSED_LIST(d); MPIU_Assert(d->refcount == 0); - unsigned long bufint = d->pagenum << DREG_PAGEBITS; - void* buf = (void*)bufint; for (; hca_index < rdma_num_hcas; ++hca_index) { Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_channel_manager.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_channel_manager.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_channel_manager.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -261,7 +261,6 @@ int MPIDI_CH3I_MRAILI_Get_next_vbuf_local(MPIDI_VC_t* vc, vbuf** vbuf_handle, int is_blocking) { - int seq_expected = vc->seqnum_recv; int type = T_CHANNEL_NO_ARRIVE; int i = 0; *vbuf_handle = NULL; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_impl.h =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_impl.h 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_impl.h 2008-10-06 20:21:13 UTC (rev 3054) @@ -5,7 +5,7 @@ double *finish_time, double *init_weight); -int get_wall_time(double *t); +void get_wall_time(double *t); int perform_manual_apm(struct ibv_qp* qp); Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -153,6 +153,8 @@ int apm_tester = 0; int apm_count; +static int check_hsam_parameters(); + static inline int log_2(int np) { int lgN, t; @@ -1062,7 +1064,7 @@ /* This function is specifically written to make sure that HSAM * parameters are configured correctly */ -int check_hsam_parameters() +static int check_hsam_parameters() { char *value; int size; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_rndv.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_rndv.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_rndv.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -35,7 +35,7 @@ int MPIDI_CH3I_MRAIL_Prepare_rndv(MPIDI_VC_t * vc, MPID_Request * req) { - dreg_entry *reg_entry; + dreg_entry *reg_entry = NULL; DEBUG_PRINT ("[prepare cts] rput protocol, recv size %d, segsize %d, io count %d\n", req->dev.recv_data_sz, req->dev.segment_size, req->dev.iov_count); @@ -255,10 +255,10 @@ int count_rail; - int mapped[MAX_NUM_SUBRAILS], i; + int mapped[MAX_NUM_SUBRAILS]; int actual_index[MAX_NUM_SUBRAILS]; - double time, myseed; + double time; if (rreq->mrail.rndv_buf_off != 0) { ibv_va_error_abort(GEN_ASSERT_ERR, @@ -465,10 +465,10 @@ int count_rail; - int mapped[MAX_NUM_SUBRAILS], i; + int mapped[MAX_NUM_SUBRAILS]; int actual_index[MAX_NUM_SUBRAILS]; - double time, myseed; + double time; if (sreq->mrail.rndv_buf_off != 0) { ibv_va_error_abort(GEN_ASSERT_ERR, @@ -766,7 +766,7 @@ } /* User defined function for wall-time */ -int get_wall_time(double *t) +void get_wall_time(double *t) { struct timeval tv; static int initialized = 0; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_send.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_send.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_send.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -946,7 +946,7 @@ MPIDI_VC_t *vc; MPID_Request *req; double time_taken; - int complete, rail; + int complete; if (v->padding == RDMA_ONE_SIDED) { vc = v->vc; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_cm.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_cm.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_cm.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -651,7 +651,7 @@ } int rdma_cm_get_contexts(){ - int i, ret, count = 0, pg_rank; + int i, ret; struct sockaddr_in sin; MPIDI_CH3I_RDMA_Process_t *proc = &MPIDI_CH3I_RDMA_Process; @@ -747,9 +747,8 @@ #define FCNAME MPIDI_QUOTE(FUNCNAME) int *rdma_cm_get_hostnames(int pg_rank, int pg_size) { - int ret = 0; int *hosts; - int error, i, j; + int error, i; int length = 64; char rank[16]; char buffer[length]; @@ -901,7 +900,6 @@ #define FCNAME MPIDI_QUOTE(FUNCNAME) int rdma_cm_init_pd_cq() { - int ret = 0; MPIDI_CH3I_RDMA_Process_t* proc = &MPIDI_CH3I_RDMA_Process; int i = 0; int pg_rank; @@ -973,7 +971,6 @@ { int pg_size, pg_rank, i, rail_index = 0; MPIDI_VC_t *vc; - MPIDI_CH3I_RDMA_Process_t *proc = &MPIDI_CH3I_RDMA_Process; PMI_Get_size(&pg_size); PMI_Get_rank(&pg_rank); @@ -994,7 +991,6 @@ { int pg_size, pg_rank, i, rail_index = 0; MPIDI_VC_t *vc; - MPIDI_CH3I_RDMA_Process_t *proc = &MPIDI_CH3I_RDMA_Process; PMI_Get_size(&pg_size); PMI_Get_rank(&pg_rank); Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -51,7 +51,6 @@ MPIDI_VC_t *, void *local_buf[], void *remote_buf[], int length, uint32_t lkeys[], uint32_t rkeys[],int use_multi ); -static int Consume_signals(MPID_Win *, uint64_t); static int iba_put(MPIDI_RMA_ops *, MPID_Win *, int); static int iba_get(MPIDI_RMA_ops *, MPID_Win *, int); static int Get_Pinned_Buf(MPID_Win * win_ptr, char **origin, int size); @@ -1073,7 +1072,7 @@ uint32_t lkeys[], uint32_t rkeys[], int use_multi) { - int ret,i,mpi_errno = MPI_SUCCESS; + int i,mpi_errno = MPI_SUCCESS; int hca_index; int rail; int index = winptr->put_get_list_tail; @@ -1191,7 +1190,7 @@ uint32_t lkeys[], uint32_t rkeys[], int use_multi) { - int ret, i, mpi_errno = MPI_SUCCESS; + int i, mpi_errno = MPI_SUCCESS; int hca_index; int index = winptr->put_get_list_tail; vbuf *v; @@ -1263,7 +1262,7 @@ int MRAILI_Handle_one_sided_completions(vbuf * v) { dreg_entry *dreg_tmp; - int i = 0,j, size; + int size; int mpi_errno = MPI_SUCCESS; void *target_addr, *origin_addr; MPIDI_CH3I_RDMA_put_get_list *list_entry=NULL; @@ -1324,7 +1323,6 @@ list_win_ptr->pinnedpool_1sc_index = 0; list_win_ptr->poll_flag = 0; } - fn_fail: return mpi_errno; } Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -34,8 +34,6 @@ #define DEBUG_PRINT(args...) #endif -static uint32_t dst_qp; - #define MPD_WINDOW 10 #define ADDR_PKT_SIZE (sizeof(struct addr_packet) + ((pg_size - 1) * sizeof(struct host_addr_inf))) #define ADDR_INDEX(_p, _i) ((struct addr_packet *)(_p + (_i * ADDR_PKT_SIZE))) @@ -346,9 +344,11 @@ } } - if (proc->has_srq) + if (proc->has_srq) { proc->srq_hndl[i] = create_srq(proc, i); - + if((proc->srq_hndl[i]) == NULL) + goto err_cq; + } } /*Port for all mgmt*/ @@ -636,7 +636,6 @@ { int ret = 0; int i = 0; - int j; MPIDI_VC_t * vc; /* First allocate space for RDMA_FAST_PATH for every connection */ @@ -711,7 +710,7 @@ pthread_create( &MPIDI_CH3I_RDMA_Process.async_thread[hca_num], NULL, - async_thread, + (void *) async_thread, (void *) MPIDI_CH3I_RDMA_Process.nic_context[hca_num]); } } Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ring_startup.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ring_startup.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ring_startup.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -28,8 +28,8 @@ #define IBA_PMI_VALLEN (4096) struct init_addr_inf { - uint16_t lid; - uint32_t qp_num[2]; + int lid; + int qp_num[2]; }; struct host_addr_inf { Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -277,3 +277,4 @@ fn_fail: goto fn_exit; } + Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -293,7 +293,6 @@ fn_completion: fn_fail: -fn_exit: #ifdef CKPT MPIDI_CH3I_CR_unlock(); #endif @@ -596,7 +595,6 @@ MPIU_Assert(vc->ch.state==MPIDI_CH3I_VC_STATE_IDLE); while (!MPIDI_CH3I_CM_SendQ_empty(vc)) { - int i; struct MPID_Request * sreq; MPID_IOV * iov; int n_iov; @@ -809,7 +807,6 @@ } fn_fail: -fn_exit: return mpi_errno; } @@ -898,7 +895,7 @@ DEBUG_PRINT("[handle read] pheader: %p\n", buffer->pheader); - MPIDI_CH3I_MRAIL_Parse_header(vc, buffer, (void **)&header, &header_size); + MPIDI_CH3I_MRAIL_Parse_header(vc, buffer, (void *)(&header), &header_size); #if defined(MPIDI_MRAILI_COALESCE_ENABLED) buffer->content_consumed = header_size; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_read_progress.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_read_progress.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_read_progress.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -46,11 +46,13 @@ #define FCNAME MPIDI_QUOTE(FUNCNAME) int MPIDI_CH3I_read_progress(MPIDI_VC_t ** vc_pptr, vbuf ** v_ptr, int is_blocking) { - static int local_vc_index = 0; static MPIDI_VC_t *pending_vc = NULL; - int i, type; + int type; MPIDI_PG_t *pg; MPIDI_VC_t *recv_vc_ptr; +#ifdef DAPL_DEFAULT_PROVIDER + static int local_vc_index = 0; +#endif MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_READ_PROGRESS); MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_READ_PROGRESS); @@ -94,6 +96,7 @@ } #ifdef DAPL_DEFAULT_PROVIDER + int i; if (MPIDI_CH3I_RDMA_Process.has_rdma_fast_path) { for (i = 0; i < pg->size; i++) { MPIDI_PG_Get_vc(MPIDI_Process.my_pg, local_vc_index, Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_rndvtransfer.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_rndvtransfer.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_rndvtransfer.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -896,8 +896,6 @@ MPIDI_CH3_Pkt_get_resp_t * get_resp_pkt, MPID_Request * req) { - int mpi_errno = MPI_SUCCESS; - vbuf *v; #ifdef CKPT MPIDI_CH3I_CR_lock(); @@ -911,8 +909,6 @@ PUSH_FLOWLIST(vc); } else { MPID_IOV iov; - int n_iov = 1; - int nb; MPIDI_CH3I_MRAILI_Rndv_info_t rndv; iov.MPID_IOV_BUF = (void*) get_resp_pkt; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -294,7 +294,7 @@ #define FUNCNAME MPIDI_CH3I_SHMEM_COLL_Gather #undef FCNAME #define FCNAME MPIDI_QUOTE(FUNCNAME) -int MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(int size, int rank, int shmem_comm_rank, void** output_buf) +void MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(int size, int rank, int shmem_comm_rank, void** output_buf) { int i = 1; char* shmem_coll_buf = (char*)(&(shmem_coll->shmem_coll_buf)); @@ -486,7 +486,6 @@ int MPID_SHMEM_BCAST_mmap(void** mmap_ptr, int bcast_seg_size, int fd, int my_local_rank, char* bcast_shmem_file) { - int i = 0, j = 0; *mmap_ptr = mmap(0, bcast_seg_size, (PROT_READ | PROT_WRITE), (MAP_SHARED), fd, 0); if (*mmap_ptr == (void *) -1) { @@ -538,7 +537,6 @@ char* shmem_coll_buf = (char*)(mmap_ptr); volatile char* bcast_flags; bcast_flags = (char*)shmem_coll_buf + index*SHMEM_BCAST_FLAGS; - int metadata_offset = 3*SHMEM_BCAST_FLAGS; char* tmp = (char*)shmem_coll_buf + 3*SHMEM_BCAST_FLAGS + step*SHMEM_BCAST_METADATA; void* buffer; while (bcast_flags[step] == 0){ Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -565,7 +565,7 @@ char *value; struct shared_mem *shmem; int blocking_val; - SEND_BUF_T *send_buf; + SEND_BUF_T *send_buf = NULL; #if defined(_X86_64_) volatile char tmpchar; #endif /* defined(_X86_64_) */ @@ -2399,8 +2399,8 @@ if (j == g_smpi.my_local_id) { - int ret = PLPA_NAME(setaffinity)(tp_str, getpid()); - // TODO: Evaluate return value. + PLPA_NAME(setaffinity)(tp_str, getpid()); + /* TODO: Evaluate return value of PLPA_NAME */ break; } Modified: mvapich2/trunk/src/mpid/ch3/src/ch3u_handle_connection.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/src/ch3u_handle_connection.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/ch3/src/ch3u_handle_connection.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -94,7 +94,7 @@ if (MPIDI_Outstanding_close_ops == 0) { MPIDI_CH3_Progress_signal_completion(); - MPIDI_CH3_Channel_close(); + /* MPIDI_CH3_Channel_close(); */ } break; Modified: mvapich2/trunk/src/mpid/common/datatype/dataloop/dataloop.c =================================================================== --- mvapich2/trunk/src/mpid/common/datatype/dataloop/dataloop.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/common/datatype/dataloop/dataloop.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -577,7 +577,6 @@ PREPEND_PREFIX(Dataloop_stream_size)(struct DLOOP_Dataloop *dl_p, DLOOP_Offset (*sizefn)(DLOOP_Type el_type)) { - DLOOP_Offset ret; DLOOP_Offset tmp_sz, tmp_ct = 1; for (;;) Modified: mvapich2/trunk/src/mpid/common/datatype/dataloop/segment_ops.c =================================================================== --- mvapich2/trunk/src/mpid/common/datatype/dataloop/segment_ops.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/common/datatype/dataloop/segment_ops.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -699,6 +699,7 @@ return 0; } +#if 0 static int DLOOP_Segment_blkidx_mpi_flatten(DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count blksz, @@ -776,7 +777,9 @@ DLOOP_Assert(blocks_left == 0); return 0; } +#endif +#if 0 static int DLOOP_Segment_index_mpi_flatten(DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count *blockarray, @@ -854,6 +857,7 @@ DLOOP_Assert(blocks_left == 0); return 0; } +#endif /* MPID_Segment_mpi_flatten - flatten a type into a representation * appropriate for passing to hindexed create. Modified: mvapich2/trunk/src/mpid/common/datatype/mpid_type_debug.c =================================================================== --- mvapich2/trunk/src/mpid/common/datatype/mpid_type_debug.c 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/common/datatype/mpid_type_debug.c 2008-10-06 20:21:13 UTC (rev 3054) @@ -24,7 +24,9 @@ void MPIDI_Datatype_dot_printf(MPI_Datatype type, int depth, int header); void MPIDI_Dataloop_dot_printf(MPID_Dataloop *loop_p, int depth, int header); void MPIDI_Datatype_contents_printf(MPI_Datatype type, int depth, int acount); +#ifdef USE_DBG_LOGGING static char *MPIDI_Datatype_depth_spacing(int depth); +#endif /* note: this isn't really "error handling" per se, but leave these comments * because Bill uses them for coverage analysis. @@ -476,6 +478,7 @@ MPIDI_Datatype_dot_printf(type, 0, 1); } +#ifdef USE_DBG_LOGGING static char *MPIDI_Datatype_depth_spacing(int depth) { static char d0[] = ""; @@ -494,6 +497,7 @@ default: return d5; } } +#endif void MPIDI_Datatype_contents_printf(MPI_Datatype type, int depth, Modified: mvapich2/trunk/src/mpid/common/locks/mpidu_process_locks.h =================================================================== --- mvapich2/trunk/src/mpid/common/locks/mpidu_process_locks.h 2008-10-06 20:06:25 UTC (rev 3053) +++ mvapich2/trunk/src/mpid/common/locks/mpidu_process_locks.h 2008-10-06 20:21:13 UTC (rev 3054) @@ -354,7 +354,7 @@ return 0; } /* <_OSU_MVAPICH_> - * #endif /* 0 for compareSwap */ + * #endif #comment: 0 for compareSwap * */ #endif /* defined(_OSU_MVAPICH_) && defined(USE_PROCESS_LOCKS) */ From gangadha at mvapich.cse.ohio-state.edu Mon Oct 6 17:16:11 2008 From: gangadha at mvapich.cse.ohio-state.edu (gangadha@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 17:16:18 2008 Subject: [mvapich-commit] r3055 - in mvapich2/trunk/src/mpid/ch3/channels/mrail/src: gen2 rdma Message-ID: <200810062116.m96LGBcn014351@mvapich.cse.ohio-state.edu> Author: gangadha Date: 2008-10-06 17:16:10 -0400 (Mon, 06 Oct 2008) New Revision: 3055 Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_isendv.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartrndvmsg.c Log: Fixing missed warnings. Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c 2008-10-06 20:21:13 UTC (rev 3054) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_1sc.c 2008-10-06 21:16:10 UTC (rev 3055) @@ -1323,7 +1323,9 @@ list_win_ptr->pinnedpool_1sc_index = 0; list_win_ptr->poll_flag = 0; } +#ifndef _OSU_MVAPICH_ fn_fail: +#endif return mpi_errno; } Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_isendv.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_isendv.c 2008-10-06 20:21:13 UTC (rev 3054) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_isendv.c 2008-10-06 21:16:10 UTC (rev 3055) @@ -55,7 +55,9 @@ MPIDI_FUNC_EXIT(MPID_STATE_UPDATE_REQUEST); return mpi_errno; +#ifndef _OSU_MVAPICH_ fn_fail: +#endif goto fn_exit; } Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c 2008-10-06 20:21:13 UTC (rev 3054) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartmsg.c 2008-10-06 21:16:10 UTC (rev 3055) @@ -274,7 +274,9 @@ MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_SMP_ISTARTMSG); return mpi_errno; +#ifndef _OSU_MVAPICH_ fn_fail: +#endif goto fn_exit; } Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartrndvmsg.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartrndvmsg.c 2008-10-06 20:21:13 UTC (rev 3054) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_istartrndvmsg.c 2008-10-06 21:16:10 UTC (rev 3055) @@ -245,7 +245,8 @@ fn_exit: MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_ISTARTGETRNDV); return mpi_errno; - +#ifndef _OSU_MVAPICH_ fn_fail: +#endif goto fn_exit; } From chail at mvapich.cse.ohio-state.edu Mon Oct 6 17:57:47 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Mon Oct 6 17:57:54 2008 Subject: [mvapich-commit] r3056 - in mvapich2/trunk/src: mpi/coll mpid/ch3/channels/mrail/src/rdma Message-ID: <200810062157.m96LvluF014452@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-06 17:57:45 -0400 (Mon, 06 Oct 2008) New Revision: 3056 Modified: mvapich2/trunk/src/mpi/coll/allreduce.c mvapich2/trunk/src/mpi/coll/bcast.c mvapich2/trunk/src/mpi/coll/reduce.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c Log: Fix compilation warnings Modified: mvapich2/trunk/src/mpi/coll/allreduce.c =================================================================== --- mvapich2/trunk/src/mpi/coll/allreduce.c 2008-10-06 21:16:10 UTC (rev 3055) +++ mvapich2/trunk/src/mpi/coll/allreduce.c 2008-10-06 21:57:45 UTC (rev 3056) @@ -793,7 +793,7 @@ #endif if (local_size > 1){ - MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, &shmem_buf); + MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, (void *)&shmem_buf); } Modified: mvapich2/trunk/src/mpi/coll/bcast.c =================================================================== --- mvapich2/trunk/src/mpi/coll/bcast.c 2008-10-06 21:16:10 UTC (rev 3055) +++ mvapich2/trunk/src/mpi/coll/bcast.c 2008-10-06 21:57:45 UTC (rev 3056) @@ -1230,7 +1230,7 @@ if ((local_rank == 0) || (root == rank)){ - MPID_SHMEM_COLL_GetShmemBcastBuf(&shmem_buf,comm_ptr->bcast_mmap_ptr); + MPID_SHMEM_COLL_GetShmemBcastBuf((void *)&shmem_buf,comm_ptr->bcast_mmap_ptr); /* The collective uses the shared buffer for inter and intra node */ tmp_buf = shmem_buf; } Modified: mvapich2/trunk/src/mpi/coll/reduce.c =================================================================== --- mvapich2/trunk/src/mpi/coll/reduce.c 2008-10-06 21:16:10 UTC (rev 3055) +++ mvapich2/trunk/src/mpi/coll/reduce.c 2008-10-06 21:57:45 UTC (rev 3056) @@ -940,7 +940,7 @@ #endif if (local_size > 1){ - MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, &shmem_buf); + MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(local_size, local_rank, shmem_comm_rank, (void *)&shmem_buf); } Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c 2008-10-06 21:16:10 UTC (rev 3055) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_progress.c 2008-10-06 21:57:45 UTC (rev 3056) @@ -52,8 +52,6 @@ #if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE) volatile int MPIDI_CH3I_progress_blocked = FALSE; volatile int MPIDI_CH3I_progress_wakeup_signalled = FALSE; - static int MPIDI_CH3I_Progress_delay(unsigned int completion_count); - static int MPIDI_CH3I_Progress_continue(unsigned int completion_count); MPID_Thread_cond_t MPIDI_CH3I_progress_completion_cond; #endif @@ -431,30 +429,7 @@ return mpi_errno; } - -#if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE) - #undef FUNCNAME -#define FUNCNAME MPIDI_CH3I_Progress_delay -#undef FCNAME -#define FCNAME MPIDI_QUOTE(FUNCNAME) -static int MPIDI_CH3I_Progress_delay(unsigned int completion_count) -{ - return MPI_SUCCESS; -} - -#undef FUNCNAME -#define FUNCNAME MPIDI_CH3I_Progress_continue -#undef FCNAME -#define FCNAME MPIDI_QUOTE(FUNCNAME) -static int MPIDI_CH3I_Progress_continue(unsigned int completion_count) -{ - return MPI_SUCCESS; -} - -#endif /* MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE */ - -#undef FUNCNAME #define FUNCNAME MPIDI_CH3_Progress_end #undef FCNAME #define FCNAME MPIDI_QUOTE(FUNCNAME) From chail at mvapich.cse.ohio-state.edu Wed Oct 8 13:01:27 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Wed Oct 8 13:01:36 2008 Subject: [mvapich-commit] r3060 - mvapich/trunk/src/coll Message-ID: <200810081701.m98H1RFr000617@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-08 13:01:25 -0400 (Wed, 08 Oct 2008) New Revision: 3060 Modified: mvapich/trunk/src/coll/intra_fns_new.c Log: Fix a bug in allreduce. Do not call the user-defined function with 0 length. Modified: mvapich/trunk/src/coll/intra_fns_new.c =================================================================== --- mvapich/trunk/src/coll/intra_fns_new.c 2008-10-07 22:31:21 UTC (rev 3059) +++ mvapich/trunk/src/coll/intra_fns_new.c 2008-10-08 17:01:25 UTC (rev 3060) @@ -5946,9 +5946,6 @@ MPI_Type_lb( datatype->self, &lb ); MPIR_Op_errno = MPI_SUCCESS; - int test = 0; - (*uop)(sendbuf, recvbuf, &test, &datatype->self); - if (MPIR_Op_errno != MPI_SUCCESS) return MPIR_Op_errno; stride = count*extent; From chail at mvapich.cse.ohio-state.edu Wed Oct 8 13:02:53 2008 From: chail at mvapich.cse.ohio-state.edu (chail@mvapich.cse.ohio-state.edu) Date: Wed Oct 8 13:03:01 2008 Subject: [mvapich-commit] r3061 - mvapich/branches/1.0/src/coll Message-ID: <200810081702.m98H2rMv000635@mvapich.cse.ohio-state.edu> Author: chail Date: 2008-10-08 13:02:53 -0400 (Wed, 08 Oct 2008) New Revision: 3061 Modified: mvapich/branches/1.0/src/coll/intra_fns_new.c Log: Fix a bug in allreduce. Do not call the user-defined function with 0 length. Modified: mvapich/branches/1.0/src/coll/intra_fns_new.c =================================================================== --- mvapich/branches/1.0/src/coll/intra_fns_new.c 2008-10-08 17:01:25 UTC (rev 3060) +++ mvapich/branches/1.0/src/coll/intra_fns_new.c 2008-10-08 17:02:53 UTC (rev 3061) @@ -5927,9 +5927,6 @@ MPI_Type_lb( datatype->self, &lb ); MPIR_Op_errno = MPI_SUCCESS; - int test = 0; - (*uop)(sendbuf, recvbuf, &test, &datatype->self); - if (MPIR_Op_errno != MPI_SUCCESS) return MPIR_Op_errno; stride = count*extent; From koop at mvapich.cse.ohio-state.edu Wed Oct 8 20:22:34 2008 From: koop at mvapich.cse.ohio-state.edu (koop@mvapich.cse.ohio-state.edu) Date: Wed Oct 8 20:22:43 2008 Subject: [mvapich-commit] r3062 - mvapich/trunk/mpid/ch_hybrid Message-ID: <200810090022.m990MYT1001334@mvapich.cse.ohio-state.edu> Author: koop Date: 2008-10-08 20:22:29 -0400 (Wed, 08 Oct 2008) New Revision: 3062 Modified: mvapich/trunk/mpid/ch_hybrid/mv_finalize.c mvapich/trunk/mpid/ch_hybrid/mv_init.c mvapich/trunk/mpid/ch_hybrid/mv_init_xrc_qp.c Log: * Adding finalization code for RC and XRC in the hybrid device Modified: mvapich/trunk/mpid/ch_hybrid/mv_finalize.c =================================================================== --- mvapich/trunk/mpid/ch_hybrid/mv_finalize.c 2008-10-08 17:02:53 UTC (rev 3061) +++ mvapich/trunk/mpid/ch_hybrid/mv_finalize.c 2008-10-09 00:22:29 UTC (rev 3062) @@ -66,6 +66,81 @@ } free(mvdev.ud_qp); + /* free all RC QPs that were created */ + for(i = 0; i < mvdev.np; i++) { + mvdev_channel_rc * cur = mvdev.connections[i].rc_channel_head; + mvdev_channel_rc * next; + + if(NULL != cur) { + ibv_destroy_qp(cur->qp[0].qp); + next = cur->next; + free(cur); + cur = next; + } + } + + /* free all SRQs used for RC */ + { + mv_rpool * cur = mvdev.rpool_srq_list; + mv_rpool * next = NULL; + if(NULL != cur) { + ibv_destroy_srq(cur->srq->srq); + free(cur->srq); + next = cur->next; + free(cur); + cur = next; + } + } + +#ifdef XRC + if(NULL != mvdev.xrc_info) { + + /* free XRC SRQs */ + mv_srq_shared * xrc_srq_curr = mvdev.xrc_srqs; + mv_srq_shared * xrc_srq_next = NULL; + + while(NULL != xrc_srq_curr) { + ibv_destroy_srq(xrc_srq_curr->pool[0]->srq->srq); + free(xrc_srq_curr->pool[0]->srq); + free(xrc_srq_curr->pool[0]); + xrc_srq_next = xrc_srq_curr->next; + free(xrc_srq_curr); + xrc_srq_curr = xrc_srq_next; + } + + /* free XRC connections */ + for(i = 0; i < mvdev.xrc_info->uniq_hosts; i++) { + if(MV_XRC_CONN_SHARED_ESTABLISHED == mvdev.xrc_info->connections[i].status + || MV_XRC_CONN_SHARED_CONNECTING == mvdev.xrc_info->connections[i].status) { + mvdev_channel_xrc_shared * xrc_shared = + mvdev.xrc_info->connections[i].xtra_xrc_next; + ibv_destroy_qp(mvdev.xrc_info->connections[i].qp[0].qp); + + while(NULL != xrc_shared) { + ibv_destroy_qp(xrc_shared->qp[0].qp); + xrc_shared = xrc_shared->xtra_xrc_next; + } + + } + } + + free(mvdev.xrc_info->connections); + + for(i = 0; i < mvdev.num_hcas; i++) { + if(ibv_close_xrc_domain(mvdev.xrc_info->xrc_domain[i])) { + fprintf(stderr, "Error destroying XRC Domain!\n"); + } + if(mvparams.xrcshared) { + if(close(mvdev.xrc_info->fd[i])) { + fprintf(stderr, "Error closing XRC file!\n"); + } + } + } + + free(mvdev.xrc_info); + } +#endif + for(i = 0; i < mvdev.num_hcas; i++) { /* cancel the event thread */ pthread_cancel(mvdev.hca[i].async_thread); @@ -75,6 +150,7 @@ ibv_dealloc_pd(mvdev.hca[i].pd); ibv_close_device(mvdev.hca[i].context); } + free(mvdev.cq); free(mvdev.hca); Modified: mvapich/trunk/mpid/ch_hybrid/mv_init.c =================================================================== --- mvapich/trunk/mpid/ch_hybrid/mv_init.c 2008-10-08 17:02:53 UTC (rev 3061) +++ mvapich/trunk/mpid/ch_hybrid/mv_init.c 2008-10-09 00:22:29 UTC (rev 3062) @@ -340,6 +340,7 @@ #ifdef XRC /* TODO: move hostnames to be something passed into AUX_Get_Remote_QPs * -- XRC_Init shouldn't be here */ + mvdev.xrc_info = NULL; if(mvparams.xrc_enabled) { MV_XRC_Init(hostnames_od, mvdev.np, mvdev.global_id, mvdev.my_name); } @@ -403,6 +404,7 @@ mvdev.pids = (int *) malloc(mvdev.np * sizeof(int)); mvdev.pids[mvdev.me] = (int) getpid(); + mvdev.rpool_srq_list = NULL; mvdev.last_qp = 0; @@ -410,6 +412,7 @@ mvdev.rcfp_connections = 0; + /* Intialize data structures for each connection * This is before the QPs are created or information * is exchanged Modified: mvapich/trunk/mpid/ch_hybrid/mv_init_xrc_qp.c =================================================================== --- mvapich/trunk/mpid/ch_hybrid/mv_init_xrc_qp.c 2008-10-08 17:02:53 UTC (rev 3061) +++ mvapich/trunk/mpid/ch_hybrid/mv_init_xrc_qp.c 2008-10-09 00:22:29 UTC (rev 3062) @@ -167,37 +167,6 @@ } - -void finalize_xrc_info(mvdev_xrc_info_t *xrc_info) -{ - int i; - - for(i = 0; i < xrc_info->uniq_hosts; i++) { - /* TODO: fix cleanup */ - /* - if(xrc_info->connections[i].qp != NULL) { - if(NULL != xrc_info->connections[i].qp->qp) { - ibv_destroy_qp(xrc_info->connections[i].qp->qp); - } - free(xrc_info->connections[i].qp); - } - */ - } - - free(xrc_info->connections); - - for(i = 0; i < mvdev.num_hcas; i++) { - if(ibv_close_xrc_domain(xrc_info->xrc_domain[i])) { - fprintf(stderr, "Error destroying XRC Domain!\n"); - } - if(close(xrc_info->fd[i])) { - fprintf(stderr, "Error closing XRC file!\n"); - } - } -} - - - struct ibv_srq * MV_Create_XRC_SRQ_aux( struct ibv_xrc_domain *xrc_domain, struct ibv_context *ctxt, struct ibv_pd *pd, From koop at mvapich.cse.ohio-state.edu Thu Oct 9 13:31:53 2008 From: koop at mvapich.cse.ohio-state.edu (koop@mvapich.cse.ohio-state.edu) Date: Thu Oct 9 13:32:02 2008 Subject: [mvapich-commit] r3063 - mvapich/trunk/mpid/ch_hybrid Message-ID: <200810091731.m99HVr5k009865@mvapich.cse.ohio-state.edu> Author: koop Date: 2008-10-09 13:31:52 -0400 (Thu, 09 Oct 2008) New Revision: 3063 Modified: mvapich/trunk/mpid/ch_hybrid/Makefile.in Log: * Remove -Wall since PGI does not compile with it Modified: mvapich/trunk/mpid/ch_hybrid/Makefile.in =================================================================== --- mvapich/trunk/mpid/ch_hybrid/Makefile.in 2008-10-09 00:22:29 UTC (rev 3062) +++ mvapich/trunk/mpid/ch_hybrid/Makefile.in 2008-10-09 17:31:52 UTC (rev 3063) @@ -194,7 +194,7 @@ $(AR) $(LIBNAME) malloc.o malloc.o: - ${CC} -fPIC -c -D_GNU_SOURCE=1 -O2 -Wall -Wstrict-prototypes -DUSE_TSD_DATA_HACK \ + ${CC} -fPIC -c -D_GNU_SOURCE=1 -O2 -DUSE_TSD_DATA_HACK \ -Iptmalloc2/sysdeps/pthread -Iptmalloc2/sysdeps/generic -I. \ -DTHREAD_STATS=1 ptmalloc2/malloc.c From perkinjo at mvapich.cse.ohio-state.edu Thu Oct 9 16:10:54 2008 From: perkinjo at mvapich.cse.ohio-state.edu (perkinjo@mvapich.cse.ohio-state.edu) Date: Thu Oct 9 16:11:01 2008 Subject: [mvapich-commit] r3064 - mvapich/trunk/src/env Message-ID: <200810092010.m99KAske010139@mvapich.cse.ohio-state.edu> Author: perkinjo Date: 2008-10-09 16:10:52 -0400 (Thu, 09 Oct 2008) New Revision: 3064 Added: mvapich/trunk/src/env/ismain.c mvapich/trunk/src/env/querythread.c Modified: mvapich/trunk/src/env/Makefile.in Log: Implement MPI_Query_thread and MPI_Is_thread_main. Modified: mvapich/trunk/src/env/Makefile.in =================================================================== --- mvapich/trunk/src/env/Makefile.in 2008-10-09 17:31:52 UTC (rev 3063) +++ mvapich/trunk/src/env/Makefile.in 2008-10-09 20:10:52 UTC (rev 3064) @@ -35,11 +35,13 @@ finalize.o initialize.o \ errorstring.o initdte.o \ getpname.o errcreate.o errset.o errget.o errfree.o errclass.o \ - wtime.o wtick.o nerrmsg.o getversion.o msgqdllloc.o + wtime.o wtick.o nerrmsg.o getversion.o msgqdllloc.o ismain.o \ + querythread.o MPI_CSOURCES = abort.c debugutil.c init.c initthread.c initutil.c \ finalize.c initialize.c errorstring.c initdte.c \ getpname.c errcreate.c errset.c errget.c errfree.c errclass.c \ - wtime.c wtick.c nerrmsg.c getversion.c msgqdllloc.c + wtime.c wtick.c nerrmsg.c getversion.c msgqdllloc.c ismain.c \ + querythread.c MPI_TSOURCES = errclass.c MPI_SOURCES = ${MPI_CSOURCES} Added: mvapich/trunk/src/env/ismain.c =================================================================== --- mvapich/trunk/src/env/ismain.c 2008-10-09 17:31:52 UTC (rev 3063) +++ mvapich/trunk/src/env/ismain.c 2008-10-09 20:10:52 UTC (rev 3064) @@ -0,0 +1,50 @@ +#ifdef HAVE_WEAK_SYMBOLS + +/* + * Undefing MPI_Is_thread_main if mpi.h defined it to help catch + * library/headerfile conflicts + */ +#ifdef MPI_Is_thread_main +# undef MPI_Is_thread_main +# undef PMPI_Is_thread_main +#endif + +#if defined(HAVE_PRAGMA_WEAK) +# pragma weak MPI_Is_thread_main = PMPI_Is_thread_main +#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +# pragma _HP_SECONDARY_DEF PMPI_Is_thread_main MPI_Is_thread_main +#elif defined(HAVE_PRAGMA_CRI_DUP) +# pragma _CRI duplicate MPI_Is_thread_main as PMPI_Is_thread_main +#endif + +/* Include mapping from MPI->PMPI */ +#define MPI_BUILD_PROFILING +#include "mpiprof.h" +/* Insert the prototypes for the PMPI routines */ +#undef __MPI_BINDINGS +#include "binding.h" +#endif /* HAVE_WEAK_SYMBOLS */ + +/*@ + MPI_Is_thread_main - Returns a flag indicating whether this thread called + 'MPI_Init' or 'MPI_Init_thread' + + Output Parameter: +. flag - Flag is true if 'MPI_Init' or 'MPI_Init_thread' has been called by + this thread and false otherwise. (logical) + +.N SignalSafe + +.N Fortran + +.N Errors +.N MPI_SUCCESS +@*/ +int MPI_Is_thread_main(int *flag) +{ + *flag = 1; + + return 0; +} + +/* vi:set ts=4 sw=4 tw=76 expandtab: */ Added: mvapich/trunk/src/env/querythread.c =================================================================== --- mvapich/trunk/src/env/querythread.c 2008-10-09 17:31:52 UTC (rev 3063) +++ mvapich/trunk/src/env/querythread.c 2008-10-09 20:10:52 UTC (rev 3064) @@ -0,0 +1,69 @@ +#include "mpi.h" + +#ifdef HAVE_WEAK_SYMBOLS + +/* + * Undefing MPI_Query_thread if mpi.h defined it to help catch + * library/headerfile conflicts + */ +#ifdef MPI_Query_thread +# undef MPI_Query_thread +# undef PMPI_Query_thread +#endif + +#if defined(HAVE_PRAGMA_WEAK) +# pragma weak MPI_Query_thread = PMPI_Query_thread +#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +# pragma _HP_SECONDARY_DEF PMPI_Query_thread MPI_Query_thread +#elif defined(HAVE_PRAGMA_CRI_DUP) +# pragma _CRI duplicate MPI_Query_thread as PMPI_Query_thread +#endif + +/* Include mapping from MPI->PMPI */ +#define MPI_BUILD_PROFILING +#include "mpiprof.h" +/* Insert the prototypes for the PMPI routines */ +#undef __MPI_BINDINGS +#include "binding.h" +#endif /* HAVE_WEAK_SYMBOLS */ + +/*@ + MPI_Query_thread - Return the level of thread support provided by the MPI + library + + Output Parameter: +. provided - Level of thread support provided. This is the same value + that was returned in the 'provided' argument in 'MPI_Init_thread'. + + Notes: + The valid values for the level of thread support are\: ++ MPI_THREAD_SINGLE - Only one thread will execute. +. MPI_THREAD_FUNNELED - The process may be multi-threaded, but only the main + thread will make MPI calls (all MPI calls are funneled to the + main thread). +. MPI_THREAD_SERIALIZED - The process may be multi-threaded, and multiple + threads may make MPI calls, but only one at a time: MPI calls are not + made concurrently from two distinct threads (all MPI calls are serialized). +- MPI_THREAD_MULTIPLE - Multiple threads may call MPI, with no restrictions. + + If 'MPI_Init' was called instead of 'MPI_Init_thread', the level of + thread support is defined by the implementation. This routine allows + you to find out the provided level. It is also useful for library + routines that discover that MPI has already been initialized and + wish to determine what level of thread support is available. + +.N SignalSafe + +.N Fortran + +.N Errors +.N MPI_SUCCESS +@*/ +int MPI_Query_thread(int *provided) +{ + *provided = MPI_THREAD_FUNNELED; + + return 0; +} + +/* vi:set ts=4 sw=4 tw=76 expandtab: */ From gangadha at mvapich.cse.ohio-state.edu Mon Oct 13 11:11:51 2008 From: gangadha at mvapich.cse.ohio-state.edu (gangadha@mvapich.cse.ohio-state.edu) Date: Mon Oct 13 11:11:58 2008 Subject: [mvapich-commit] r3065 - in mvapich2/trunk/src: include mpi/coll Message-ID: <200810131511.m9DFBpEB018898@mvapich.cse.ohio-state.edu> Author: gangadha Date: 2008-10-13 11:11:49 -0400 (Mon, 13 Oct 2008) New Revision: 3065 Modified: mvapich2/trunk/src/include/mpiutil.h mvapich2/trunk/src/mpi/coll/allreduce.c Log: Fixing unused variable warning due to memory tracking macro. Modified: mvapich2/trunk/src/include/mpiutil.h =================================================================== --- mvapich2/trunk/src/include/mpiutil.h 2008-10-09 20:10:52 UTC (rev 3064) +++ mvapich2/trunk/src/include/mpiutil.h 2008-10-13 15:11:49 UTC (rev 3065) @@ -58,7 +58,7 @@ #else # define MPIU_Assert(a_) /* Empty decls not allowed in C */ -# define MPIU_AssertDecl(a_) a_ +# define MPIU_AssertDecl(a_) #endif /* Modified: mvapich2/trunk/src/mpi/coll/allreduce.c =================================================================== --- mvapich2/trunk/src/mpi/coll/allreduce.c 2008-10-09 20:10:52 UTC (rev 3064) +++ mvapich2/trunk/src/mpi/coll/allreduce.c 2008-10-13 15:11:49 UTC (rev 3065) @@ -634,7 +634,6 @@ int stride = 0, i, is_commutative = 0; MPID_Op *op_ptr = NULL; int total_size, shmem_comm_rank; - MPIU_CHKLMEM_DECL(1); extern int check_comm_registry(MPI_Comm); extern int MPIDI_CH3I_SHMEM_COLL_GetShmemBuf(int, int, int, void**); extern void MPIDI_CH3I_SHMEM_COLL_SetGatherComplete(int, int, int); From sridharj at mvapich.cse.ohio-state.edu Mon Oct 13 11:15:41 2008 From: sridharj at mvapich.cse.ohio-state.edu (sridharj@mvapich.cse.ohio-state.edu) Date: Mon Oct 13 11:15:48 2008 Subject: [mvapich-commit] r3067 - mvapich2/trunk/src/pm/mpirun/mpirun_rsh Message-ID: <200810131515.m9DFFfWs018937@mvapich.cse.ohio-state.edu> Author: sridharj Date: 2008-10-13 11:15:40 -0400 (Mon, 13 Oct 2008) New Revision: 3067 Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c Log: Detect path to mpispawn if /proc filesystem is available. Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c =================================================================== --- mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-13 15:14:45 UTC (rev 3066) +++ mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-13 15:15:40 UTC (rev 3067) @@ -1210,10 +1210,47 @@ } } +int file_exists (char *filename) +{ + FILE *fp = fopen (filename, "r"); + if (fp) { + fclose (fp); + return 1; + } + return 0; +} + +int getpath(char *buf, int buf_len) +{ + char link[32]; + pid_t pid; + unsigned len; + pid = getpid(); + snprintf(&link[0], sizeof(link), "/proc/%i/exe", pid); + + if ((len = readlink(&link[0], buf, buf_len)) == -1) { + buf[0] = 0; + return 0; + } + else + { + buf[len] = 0; + while (len && buf[--len] != '/'); + if (buf[len] == '/') buf[len] = 0; + return len; + } +} + +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + void spawn_fast(int argc, char *argv[], char *totalview_cmd, char *env) { char * mpispawn_env, * tmp, * ld_library_path; char * name, * value; int i, n; + char pathbuf[PATH_MAX]; + int pathlen; if((ld_library_path = getenv("LD_LIBRARY_PATH"))) { mpispawn_env = mkstr("LD_LIBRARY_PATH=%s:%s", @@ -1523,13 +1560,19 @@ argv[arg_offset++] = SSH_CMD; argv[arg_offset++] = SSH_ARG; } + + if (getpath(pathbuf, PATH_MAX) && file_exists (pathbuf)) { + command = mkstr("cd %s; %s %s %s %s/mpispawn", wd, ENV_CMD, + mpispawn_env, env, pathbuf); if (use_dirname) command = mkstr("cd %s; %s %s %s %s/mpispawn", wd, ENV_CMD, mpispawn_env, env, binary_dirname); - else + } + else { command = mkstr("cd %s; %s %s %s mpispawn", wd, ENV_CMD, mpispawn_env, env); + } if(!command) { fprintf(stderr, "Couldn't allocate string for remote command!\n"); From sridharj at mvapich.cse.ohio-state.edu Mon Oct 13 11:19:39 2008 From: sridharj at mvapich.cse.ohio-state.edu (sridharj@mvapich.cse.ohio-state.edu) Date: Mon Oct 13 11:19:45 2008 Subject: [mvapich-commit] r3068 - mvapich2/trunk/src/pm/mpirun/mpirun_rsh Message-ID: <200810131519.m9DFJdG9018955@mvapich.cse.ohio-state.edu> Author: sridharj Date: 2008-10-13 11:19:38 -0400 (Mon, 13 Oct 2008) New Revision: 3068 Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c Log: Detect path to mpispawn if /proc filesystem is available. Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c =================================================================== --- mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-13 15:15:40 UTC (rev 3067) +++ mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-13 15:19:38 UTC (rev 3068) @@ -1564,8 +1564,8 @@ if (getpath(pathbuf, PATH_MAX) && file_exists (pathbuf)) { command = mkstr("cd %s; %s %s %s %s/mpispawn", wd, ENV_CMD, mpispawn_env, env, pathbuf); - - if (use_dirname) + } + else if (use_dirname) command = mkstr("cd %s; %s %s %s %s/mpispawn", wd, ENV_CMD, mpispawn_env, env, binary_dirname); } From sridharj at mvapich.cse.ohio-state.edu Mon Oct 13 11:25:26 2008 From: sridharj at mvapich.cse.ohio-state.edu (sridharj@mvapich.cse.ohio-state.edu) Date: Mon Oct 13 11:25:32 2008 Subject: [mvapich-commit] r3071 - mvapich2/trunk/src/pm/mpirun/mpirun_rsh Message-ID: <200810131525.m9DFPQuQ019018@mvapich.cse.ohio-state.edu> Author: sridharj Date: 2008-10-13 11:25:25 -0400 (Mon, 13 Oct 2008) New Revision: 3071 Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c Log: Fix typo in r3068 Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c =================================================================== --- mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-13 15:25:04 UTC (rev 3070) +++ mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-13 15:25:25 UTC (rev 3071) @@ -1565,7 +1565,7 @@ command = mkstr("cd %s; %s %s %s %s/mpispawn", wd, ENV_CMD, mpispawn_env, env, pathbuf); } - else if (use_dirname) + else if (use_dirname) { command = mkstr("cd %s; %s %s %s %s/mpispawn", wd, ENV_CMD, mpispawn_env, env, binary_dirname); } From subramon at mvapich.cse.ohio-state.edu Mon Oct 13 22:25:13 2008 From: subramon at mvapich.cse.ohio-state.edu (subramon@mvapich.cse.ohio-state.edu) Date: Mon Oct 13 22:25:21 2008 Subject: [mvapich-commit] r3072 - in mvapich2/trunk/src: mpi/init mpid/ch3/channels/mrail/src/rdma Message-ID: <200810140225.m9E2PDtl020196@mvapich.cse.ohio-state.edu> Author: subramon Date: 2008-10-13 22:25:10 -0400 (Mon, 13 Oct 2008) New Revision: 3072 Modified: mvapich2/trunk/src/mpi/init/initthread.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/coll_shmem.h Log: Ticket #394 Converting "SHMEM_BCAST_LEADERS" macro to an environment variable. Modified: mvapich2/trunk/src/mpi/init/initthread.c =================================================================== --- mvapich2/trunk/src/mpi/init/initthread.c 2008-10-13 15:25:25 UTC (rev 3071) +++ mvapich2/trunk/src/mpi/init/initthread.c 2008-10-14 02:25:10 UTC (rev 3072) @@ -47,6 +47,10 @@ /* all other fields in MPIR_Process are irrelevant */ MPICH_ThreadInfo_t MPIR_ThreadInfo = { 0 }; +#if defined(_OSU_MVAPICH_) +#define DEFAULT_SHMEM_BCAST_LEADERS 1024 +#endif /* _OSU_MVAPICH_ */ + /* These are initialized as null (avoids making these into common symbols). If the Fortran binding is supported, these can be initialized to their Fortran values (MPI only requires that they be valid between @@ -415,6 +419,7 @@ int disable_shmem_allreduce=0; int disable_shmem_reduce=0; int disable_shmem_barrier=0; +int g_shmem_bcast_leaders = DEFAULT_SHMEM_BCAST_LEADERS; extern int g_shmem_coll_blocks; extern int g_shmem_coll_max_msg_size; extern int shmem_bcast_threshold; @@ -561,6 +566,12 @@ flag = (int)atoi(value); if (flag > 0) g_shmem_coll_max_msg_size = flag; } + if ((value = getenv("MV2_SHMEM_BCAST_LEADERS")) != NULL){ + if ((atoi(value) > 0)) { + /* We only accept positive values */ + g_shmem_bcast_leaders = (int)atoi(value); + } + } if ((value = getenv("MV2_USE_SHARED_MEM")) != NULL){ flag = (int)atoi(value); if (flag <= 0) enable_shmem_collectives = 0; Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c 2008-10-13 15:25:25 UTC (rev 3071) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_shmem_coll.c 2008-10-14 02:25:10 UTC (rev 3072) @@ -53,6 +53,7 @@ char hostname[SHMEM_COLL_HOSTNAME_LEN]; int my_rank; +extern int g_shmem_bcast_leaders; int g_shmem_coll_blocks = 8; int g_shmem_coll_max_msg_size = (1 << 17); @@ -413,7 +414,7 @@ int pagesize = getpagesize(); int mpi_errno = 1; - file_size = file_size + 3*SHMEM_BCAST_FLAGS + SHMEM_BCAST_LEADERS*SHMEM_BCAST_METADATA; + file_size = file_size + 3*SHMEM_BCAST_FLAGS + g_shmem_bcast_leaders*SHMEM_BCAST_METADATA; /* add pid for unique file name */ *bcast_shmem_file = (char *) MPIU_Malloc(sizeof(char) * (SHMEM_COLL_HOSTNAME_LEN + 26 + PID_CHAR_LEN)); @@ -506,7 +507,7 @@ void MPID_SHMEM_COLL_GetShmemBcastBuf(void** output_buf, void* buffer){ char* shmem_coll_buf = (char*)(buffer); - *output_buf = (char*)shmem_coll_buf + 3*SHMEM_BCAST_FLAGS + SHMEM_BCAST_LEADERS*SHMEM_BCAST_METADATA; + *output_buf = (char*)shmem_coll_buf + 3*SHMEM_BCAST_FLAGS + g_shmem_bcast_leaders*SHMEM_BCAST_METADATA; } void signal_local_processes(int step, int index, char* send_buf, int offset, int bytes, void* mmap_ptr){ @@ -545,7 +546,7 @@ buffer = (addrint_t*)tmp; buffer = (int*)(tmp + sizeof(addrint_t)); *offset = *((int*)buffer); - *output_buf = (char*)(mmap_ptr) + 3*SHMEM_BCAST_FLAGS + SHMEM_BCAST_LEADERS*SHMEM_BCAST_METADATA + *offset; + *output_buf = (char*)(mmap_ptr) + 3*SHMEM_BCAST_FLAGS + g_shmem_bcast_leaders*SHMEM_BCAST_METADATA + *offset; buffer = (int*)(tmp + sizeof(addrint_t) + sizeof(int)); *bytes = *((int*)buffer); Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/coll_shmem.h =================================================================== --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/coll_shmem.h 2008-10-13 15:25:25 UTC (rev 3071) +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/coll_shmem.h 2008-10-14 02:25:10 UTC (rev 3072) @@ -113,6 +113,9 @@ #define BCAST_LEN 20 #define SHMEM_BCAST_FLAGS 1024 -#define SHMEM_BCAST_LEADERS 1024 +/* + * We're converting this into a environment variable + *#define SHMEM_BCAST_LEADERS 1024 + */ #define SHMEM_BCAST_METADATA (sizeof(addrint_t) + 2*sizeof(int)) /* METADATA: buffer address, offset, num_bytes */ #endif From sridharj at mvapich.cse.ohio-state.edu Sat Oct 18 12:29:26 2008 From: sridharj at mvapich.cse.ohio-state.edu (sridharj@mvapich.cse.ohio-state.edu) Date: Sat Oct 18 12:29:35 2008 Subject: [mvapich-commit] r3074 - in mvapich2/trunk/src/pm/mpirun: include mpirun_rsh mpispawn Message-ID: <200810181629.m9IGTQiO000351@mvapich.cse.ohio-state.edu> Author: sridharj Date: 2008-10-18 12:29:24 -0400 (Sat, 18 Oct 2008) New Revision: 3074 Modified: mvapich2/trunk/src/pm/mpirun/include/mpirun_util.h mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c mvapich2/trunk/src/pm/mpirun/mpispawn/mpispawn.c mvapich2/trunk/src/pm/mpirun/mpispawn/pmi_tree.c Log: Totalview support for mpirun_rsh Modified: mvapich2/trunk/src/pm/mpirun/include/mpirun_util.h =================================================================== --- mvapich2/trunk/src/pm/mpirun/include/mpirun_util.h 2008-10-14 02:26:06 UTC (rev 3073) +++ mvapich2/trunk/src/pm/mpirun/include/mpirun_util.h 2008-10-18 16:29:24 UTC (rev 3074) @@ -24,4 +24,19 @@ int read_socket(int, void *, size_t); int write_socket(int, void *, size_t); +typedef struct _process_info { + pid_t pid; + int rank; +} process_info_t; + +struct MPIR_PROCDESC +{ + char *host_name; + char *executable_name; + long pid; +}; + +#define MPIR_PROCDESC_s (sizeof (struct MPIR_PROCDESC)) +#define process_info_s (sizeof (process_info_t)) + #endif Modified: mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c =================================================================== --- mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-14 02:26:06 UTC (rev 3073) +++ mvapich2/trunk/src/pm/mpirun/mpirun_rsh/mpirun_rsh.c 2008-10-18 16:29:24 UTC (rev 3074) @@ -63,6 +63,7 @@ #include #include #include "mpispawn_tree.h" +#include "mpirun_util.h" #if defined(_NSIG) #define NSIG _NSIG @@ -130,6 +131,7 @@ {"v", no_argument, 0, 0}, {"tv", no_argument, 0, 0}, {"legacy", no_argument, 0, 0}, + {"startedByTv", no_argument, 0, 0}, {0, 0, 0, 0} }; @@ -205,7 +207,6 @@ int param_debug = 0; int use_totalview = 0; int server_socket; -char * mpirun_processes; char display[200]; char * binary_dirname; int use_dirname = 1; @@ -226,6 +227,27 @@ } } +/* Start mpirun_rsh totalview integration */ + +#define MPIR_DEBUG_SPAWNED 1 +#define MPIR_DEBUG_ABORTING 2 + +struct MPIR_PROCDESC *MPIR