X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4ded5a4acc16f0bd356e667056306867f7f402c7..8989e31e81c82d0a754da9b1a0850ca23a27d0d1:/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 diff --git a/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 b/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 index cd0ae1e95d..574d6490de 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 +++ b/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 @@ -7,6 +7,22 @@ ! ! Test user-defined operations. This tests a simple commutative operation ! + subroutine uop( cin, cout, count, datatype ) + use mpi + integer cin(*), cout(*) + integer count, datatype + integer i + + if (datatype .ne. MPI_INTEGER) then + print *, 'Invalid datatype (',datatype,') passed to user_op()' + return + endif + + do i=1, count + cout(i) = cin(i) + cout(i) + enddo + end + program main use mpi external uop @@ -49,19 +65,3 @@ call mtest_finalize(errs) call mpi_finalize(ierr) end - - subroutine uop( cin, cout, count, datatype ) - use mpi - integer cin(*), cout(*) - integer count, datatype - integer i - - if (datatype .ne. MPI_INTEGER) then - print *, 'Invalid datatype (',datatype,') passed to user_op()' - return - endif - - do i=1, count - cout(i) = cin(i) + cout(i) - enddo - end