|
Packit Service |
c5cf8c |
! This file created from f77/pt2pt/statusesf.f with f77tof90
|
|
Packit Service |
c5cf8c |
! -*- Mode: Fortran; -*-
|
|
Packit Service |
c5cf8c |
!
|
|
Packit Service |
c5cf8c |
! (C) 2003 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
! See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
!
|
|
Packit Service |
c5cf8c |
program main
|
|
Packit Service |
c5cf8c |
! Test support for MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE
|
|
Packit Service |
c5cf8c |
use mpi
|
|
Packit Service |
c5cf8c |
integer nreqs
|
|
Packit Service |
c5cf8c |
parameter (nreqs = 100)
|
|
Packit Service |
c5cf8c |
integer reqs(nreqs)
|
|
Packit Service |
c5cf8c |
integer ierr, rank, i
|
|
Packit Service |
c5cf8c |
integer errs
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ierr = -1
|
|
Packit Service |
c5cf8c |
errs = 0
|
|
Packit Service |
c5cf8c |
call mpi_init( ierr )
|
|
Packit Service |
c5cf8c |
if (ierr .ne. MPI_SUCCESS) then
|
|
Packit Service |
c5cf8c |
errs = errs + 1
|
|
Packit Service |
c5cf8c |
print *, 'Unexpected return from MPI_INIT', ierr
|
|
Packit Service |
c5cf8c |
endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ierr = -1
|
|
Packit Service |
c5cf8c |
call mpi_comm_rank( MPI_COMM_WORLD, rank, ierr )
|
|
Packit Service |
c5cf8c |
if (ierr .ne. MPI_SUCCESS) then
|
|
Packit Service |
c5cf8c |
errs = errs + 1
|
|
Packit Service |
c5cf8c |
print *, 'Unexpected return from MPI_COMM_WORLD', ierr
|
|
Packit Service |
c5cf8c |
endif
|
|
Packit Service |
c5cf8c |
do i=1, nreqs, 2
|
|
Packit Service |
c5cf8c |
ierr = -1
|
|
Packit Service |
c5cf8c |
call mpi_isend( MPI_BOTTOM, 0, MPI_BYTE, rank, i, &
|
|
Packit Service |
c5cf8c |
& MPI_COMM_WORLD, reqs(i), ierr )
|
|
Packit Service |
c5cf8c |
if (ierr .ne. MPI_SUCCESS) then
|
|
Packit Service |
c5cf8c |
errs = errs + 1
|
|
Packit Service |
c5cf8c |
print *, 'Unexpected return from MPI_ISEND', ierr
|
|
Packit Service |
c5cf8c |
endif
|
|
Packit Service |
c5cf8c |
ierr = -1
|
|
Packit Service |
c5cf8c |
call mpi_irecv( MPI_BOTTOM, 0, MPI_BYTE, rank, i, &
|
|
Packit Service |
c5cf8c |
& MPI_COMM_WORLD, reqs(i+1), ierr )
|
|
Packit Service |
c5cf8c |
if (ierr .ne. MPI_SUCCESS) then
|
|
Packit Service |
c5cf8c |
errs = errs + 1
|
|
Packit Service |
c5cf8c |
print *, 'Unexpected return from MPI_IRECV', ierr
|
|
Packit Service |
c5cf8c |
endif
|
|
Packit Service |
c5cf8c |
enddo
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ierr = -1
|
|
Packit Service |
c5cf8c |
call mpi_waitall( nreqs, reqs, MPI_STATUSES_IGNORE, ierr )
|
|
Packit Service |
c5cf8c |
if (ierr .ne. MPI_SUCCESS) then
|
|
Packit Service |
c5cf8c |
errs = errs + 1
|
|
Packit Service |
c5cf8c |
print *, 'Unexpected return from MPI_WAITALL', ierr
|
|
Packit Service |
c5cf8c |
endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
call mtest_finalize( errs )
|
|
Packit Service |
c5cf8c |
end
|