[mpich] MPICH primary repository branch, master, updated. v3.1rc1-4-ge61b9a5
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via e61b9a5baa187922a06481a48833ac3d8ba7eb90 (commit) via 3384e24c52b341274e6b95b83b9d6af8921dc36b (commit) via e9458c25a143b0c8c1733e521e09d996a19a0284 (commit) from ad1bdb5867e75247c05c67f5d27da9a57abebbd4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/e61b9a5baa187922a06481a48833ac3d8b... commit e61b9a5baa187922a06481a48833ac3d8ba7eb90 Author: Junchao Zhang <[email protected]> Date: Mon Nov 4 13:15:15 2013 -0600 Revise test case get_elem_d.f90 Also added comments to make it less misleading. Signed-off-by: Antonio J. Pena <[email protected]> diff --git a/test/mpi/f90/datatype/get_elem_d.f90 b/test/mpi/f90/datatype/get_elem_d.f90 index 498f170..45130ce 100644 --- a/test/mpi/f90/datatype/get_elem_d.f90 +++ b/test/mpi/f90/datatype/get_elem_d.f90 @@ -21,7 +21,7 @@ program get_elem_d integer :: blklen(nb)=(/2,2/) integer :: types(nb)=(/MPI_DOUBLE_PRECISION,MPI_INTEGER/) integer(kind=MPI_ADDRESS_KIND) :: disp(nb) - integer :: newtype,ntlen,ians(0:23),ians0(0:3),ians1(24),ians2(20) + integer :: newtype,ntlen,ians(20),ians0(0:3),ians1(24),ians2(20) double precision :: dbuff(dmax), a integer :: ibuff(imax) character :: cbuff(cmax)='X' @@ -42,13 +42,13 @@ program get_elem_d ians0(2)=2*ka+kj ians0(3)=2*ka+2*kj ii=0 - do i=1,24 + do i=1,24 ! answers for the test sending 1~24 bytes if (i .eq. ians0(ii)) ii=ii+1 ians1(i)=ii enddo if (rank == 0 .and. verbose > 0) print *, (ians1(k),k=1,24) jj=0 - do j=0,19,4 + do j=1,17,4 ! 4 means newtype has 4 primitives ians(j)=jj+ka/kj ians(j+1)=jj+2*(ka/kj) ians(j+2)=jj+2*(ka/kj)+1 @@ -56,9 +56,11 @@ program get_elem_d if (rank == 0 .and. verbose > 0) print *, (ians(k),k=j,j+3) jj=jj+ntlen/kj enddo + ! To have k elements, need to receive ians(k) integers + ii=0 - do i=1,20 - if (i .eq. ians(ii)) ii=ii+1 + do i=1,20 ! answers for the test sending 1~20 integers + if (i .eq. ians(ii+1)) ii=ii+1 ians2(i)=ii enddo if (rank == 0 .and. verbose > 0) print *, (ians2(k),k=1,20) @@ -68,7 +70,7 @@ program get_elem_d call MPI_Type_create_struct(nb, blklen, disp, types, newtype, ierror) call MPI_Type_commit(newtype, ierror) - do i=1,24 + do i=1,24 ! sending 1~24 bytes if (rank == 0) then call MPI_Send(cbuff, i, MPI_BYTE, dest, 100, comm, ierror) @@ -89,7 +91,7 @@ program get_elem_d endif enddo - do i=1,20 + do i=1,20 ! sending 1~20 integers if (rank == 0) then call MPI_Send(ibuff, i, MPI_INTEGER, dest, 100, comm, ierror) http://git.mpich.org/mpich.git/commitdiff/3384e24c52b341274e6b95b83b9d6af892... commit 3384e24c52b341274e6b95b83b9d6af8921dc36b Author: Antonio J. Pena <[email protected]> Date: Wed Oct 30 18:38:08 2013 -0500 Fixed buffer overflow in test get_elem_d.f90 Fixes #884. Signed-off-by: Junchao Zhang <[email protected]> diff --git a/test/mpi/f90/datatype/get_elem_d.f90 b/test/mpi/f90/datatype/get_elem_d.f90 index 8a9e42b..498f170 100644 --- a/test/mpi/f90/datatype/get_elem_d.f90 +++ b/test/mpi/f90/datatype/get_elem_d.f90 @@ -21,7 +21,7 @@ program get_elem_d integer :: blklen(nb)=(/2,2/) integer :: types(nb)=(/MPI_DOUBLE_PRECISION,MPI_INTEGER/) integer(kind=MPI_ADDRESS_KIND) :: disp(nb) - integer :: newtype,ntlen,ians(0:23),ians0(0:3),ians1(20),ians2(20) + integer :: newtype,ntlen,ians(0:23),ians0(0:3),ians1(24),ians2(20) double precision :: dbuff(dmax), a integer :: ibuff(imax) character :: cbuff(cmax)='X' http://git.mpich.org/mpich.git/commitdiff/e9458c25a143b0c8c1733e521e09d996a1... commit e9458c25a143b0c8c1733e521e09d996a19a0284 Author: Antonio J. Pena <[email protected]> Date: Wed Oct 30 18:36:41 2013 -0500 Removed unused code from get_elem_d.f90 The full path of the test is test/mpi/f90/datatype/get_elem_d.f90 Signed-off-by: Junchao Zhang <[email protected]> diff --git a/test/mpi/f90/datatype/get_elem_d.f90 b/test/mpi/f90/datatype/get_elem_d.f90 index 6b9edde..8a9e42b 100644 --- a/test/mpi/f90/datatype/get_elem_d.f90 +++ b/test/mpi/f90/datatype/get_elem_d.f90 @@ -17,7 +17,7 @@ program get_elem_d integer, parameter :: nb=2 integer :: comm,rank,size,dest,ierror,errs=0 integer :: status(MPI_STATUS_SIZE) - integer :: i,ii,count,ka,j,jj,k,kj,krat,tag=100 + integer :: i,ii,count,ka,j,jj,k,kj integer :: blklen(nb)=(/2,2/) integer :: types(nb)=(/MPI_DOUBLE_PRECISION,MPI_INTEGER/) integer(kind=MPI_ADDRESS_KIND) :: disp(nb) @@ -34,7 +34,6 @@ program get_elem_d call MPI_Sizeof (j, kj, ierror) call MPI_Sizeof (a, ka, ierror) ntlen=2*ka+2*kj - krat=ntlen/kj disp=(/0,2*ka/) ! calculate answers for expected i values for Get_elements with derived type ----------------------------------------------------------------------- Summary of changes: test/mpi/f90/datatype/get_elem_d.f90 | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org