-!
+!
! (C) 2004 by Argonne National Laboratory.
! See COPYRIGHT in top-level directory.
!
-! Thanks to
+! Thanks to
! William R. Magro
! for this test
!
! for MPICH, and to fit in the MPICH test harness - WDG
!
program bustit
- implicit none
use mpi
-
+ implicit none
+
+
integer comm
integer newtype
integer me
call mpi_comm_size(MPI_COMM_WORLD, size, ierr )
if (size .lt. 2) then
print *, "Must have at least 2 processes"
- call MPI_Abort( 1, MPI_COMM_WORLD, ierr )
+ call MPI_Abort( MPI_COMM_WORLD, 1, ierr )
stop
endif
call mpi_send(MPI_BOTTOM,1,newtype,dest,1,comm,ierr)
call mpi_type_free(newtype,ierr)
! write(*,*) "Sent ",name(1:5),x
- else
-! Everyone calls barrier incase size > 2
+ else
+! Everyone calls barrier in case size > 2
call mpi_barrier( MPI_COMM_WORLD, ierr )
if (me.eq.dest) then
position=0
x = 0.0d0
call mpi_recv(buf,bufsize,MPI_PACKED, src, &
& 1, comm, status, ierr)
-
+
call mpi_unpack(buf,bufsize,position, &
& name,5,MPI_CHARACTER, comm,ierr)
call mpi_unpack(buf,bufsize,position, &