X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/18831c99f9114246958847f3648d49e5e2c97533..4137195804cd6cf88d6077d42a80cd6b41e09814:/teshsuite/smpi/mpich3-test/f90/pt2pt/statusesf90.f90 diff --git a/teshsuite/smpi/mpich3-test/f90/pt2pt/statusesf90.f90 b/teshsuite/smpi/mpich3-test/f90/pt2pt/statusesf90.f90 new file mode 100644 index 0000000000..940555464a --- /dev/null +++ b/teshsuite/smpi/mpich3-test/f90/pt2pt/statusesf90.f90 @@ -0,0 +1,56 @@ +! This file created from test/mpi/f77/pt2pt/statusesf.f with f77tof90 +! -*- Mode: Fortran; -*- +! +! (C) 2003 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! + program main +! Test support for MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE + use mpi + integer nreqs + parameter (nreqs = 100) + integer reqs(nreqs) + integer ierr, rank, i + integer errs + + ierr = -1 + errs = 0 + call mpi_init( ierr ) + if (ierr .ne. MPI_SUCCESS) then + errs = errs + 1 + print *, 'Unexpected return from MPI_INIT', ierr + endif + + ierr = -1 + call mpi_comm_rank( MPI_COMM_WORLD, rank, ierr ) + if (ierr .ne. MPI_SUCCESS) then + errs = errs + 1 + print *, 'Unexpected return from MPI_COMM_WORLD', ierr + endif + do i=1, nreqs, 2 + ierr = -1 + call mpi_isend( MPI_BOTTOM, 0, MPI_BYTE, rank, i, & + & MPI_COMM_WORLD, reqs(i), ierr ) + if (ierr .ne. MPI_SUCCESS) then + errs = errs + 1 + print *, 'Unexpected return from MPI_ISEND', ierr + endif + ierr = -1 + call mpi_irecv( MPI_BOTTOM, 0, MPI_BYTE, rank, i, & + & MPI_COMM_WORLD, reqs(i+1), ierr ) + if (ierr .ne. MPI_SUCCESS) then + errs = errs + 1 + print *, 'Unexpected return from MPI_IRECV', ierr + endif + enddo + + ierr = -1 + call mpi_waitall( nreqs, reqs, MPI_STATUSES_IGNORE, ierr ) + if (ierr .ne. MPI_SUCCESS) then + errs = errs + 1 + print *, 'Unexpected return from MPI_WAITALL', ierr + endif + + call mtest_finalize( errs ) + call mpi_finalize( ierr ) + end