From d345b5dad90a1ec9829011b9188185aaf4d3240a Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 28 Mar 2020 23:02:37 +0100 Subject: [PATCH] Silly workaround for coverage build with gcc-10. Error is: internal compiler error: in coverage_begin_function, at coverage.c:655 --- teshsuite/smpi/mpich3-test/f77/coll/exscanf.f | 38 +++++++++--------- .../smpi/mpich3-test/f77/coll/redscatf.f | 40 +++++++++---------- .../smpi/mpich3-test/f77/coll/reducelocalf.f | 36 ++++++++--------- .../smpi/mpich3-test/f77/coll/uallreducef.f | 34 ++++++++-------- .../smpi/mpich3-test/f90/coll/exscanf90.f90 | 36 ++++++++--------- .../smpi/mpich3-test/f90/coll/redscatf90.f90 | 35 ++++++++-------- .../mpich3-test/f90/coll/reducelocalf90.f90 | 34 ++++++++-------- .../mpich3-test/f90/coll/uallreducef90.f90 | 32 +++++++-------- 8 files changed, 143 insertions(+), 142 deletions(-) diff --git a/teshsuite/smpi/mpich3-test/f77/coll/exscanf.f b/teshsuite/smpi/mpich3-test/f77/coll/exscanf.f index 27de6b97df..2f8b897cac 100644 --- a/teshsuite/smpi/mpich3-test/f77/coll/exscanf.f +++ b/teshsuite/smpi/mpich3-test/f77/coll/exscanf.f @@ -2,25 +2,6 @@ C -*- Mode: Fortran; -*- C C (C) 2003 by Argonne National Laboratory. C See COPYRIGHT in top-level directory. -C - subroutine uop( cin, cout, count, datatype ) - implicit none - include 'mpif.h' - integer cin(*), cout(*) - integer count, datatype - integer i - - if (.false.) then - if (datatype .ne. MPI_INTEGER) then - write(6,*) 'Invalid datatype passed to user_op()' - return - endif - endif - - do i=1, count - cout(i) = cin(i) + cout(i) - enddo - end C program main implicit none @@ -107,3 +88,22 @@ C (rank)(rank-1)/2 and -i call mtest_finalize( errs ) call mpi_finalize( ierr ) end +C + subroutine uop( cin, cout, count, datatype ) + implicit none + include 'mpif.h' + integer cin(*), cout(*) + integer count, datatype + integer i + + if (.false.) then + if (datatype .ne. MPI_INTEGER) then + write(6,*) 'Invalid datatype passed to user_op()' + return + endif + endif + + do i=1, count + cout(i) = cin(i) + cout(i) + enddo + end diff --git a/teshsuite/smpi/mpich3-test/f77/coll/redscatf.f b/teshsuite/smpi/mpich3-test/f77/coll/redscatf.f index efd6c06040..ecb04e9b55 100644 --- a/teshsuite/smpi/mpich3-test/f77/coll/redscatf.f +++ b/teshsuite/smpi/mpich3-test/f77/coll/redscatf.f @@ -2,26 +2,6 @@ C -*- Mode: Fortran; -*- C C (C) 2011 by Argonne National Laboratory. C See COPYRIGHT in top-level directory. -C - subroutine uop( cin, cout, count, datatype ) - implicit none - include 'mpif.h' - integer cin(*), cout(*) - integer count, datatype - integer i - - if (.false.) then - if (datatype .ne. MPI_INTEGER) then - write(6,*) 'Invalid datatype ',datatype, - & ' passed to user_op()' - return - endif - endif - - do i=1, count - cout(i) = cin(i) + cout(i) - enddo - end C C Test of reduce scatter. C @@ -86,3 +66,23 @@ C recvbuf should be size * (rank + i) call mpi_finalize( ierr ) end +C + subroutine uop( cin, cout, count, datatype ) + implicit none + include 'mpif.h' + integer cin(*), cout(*) + integer count, datatype + integer i + + if (.false.) then + if (datatype .ne. MPI_INTEGER) then + write(6,*) 'Invalid datatype ',datatype, + & ' passed to user_op()' + return + endif + endif + + do i=1, count + cout(i) = cin(i) + cout(i) + enddo + end diff --git a/teshsuite/smpi/mpich3-test/f77/coll/reducelocalf.f b/teshsuite/smpi/mpich3-test/f77/coll/reducelocalf.f index 6037308f0d..aaaee12b45 100644 --- a/teshsuite/smpi/mpich3-test/f77/coll/reducelocalf.f +++ b/teshsuite/smpi/mpich3-test/f77/coll/reducelocalf.f @@ -6,24 +6,6 @@ C C C Test Fortran MPI_Reduce_local with MPI_OP_SUM and with user-defined operation. C - subroutine user_op( invec, outvec, count, datatype ) - implicit none - include 'mpif.h' - integer invec(*), outvec(*) - integer count, datatype - integer ii - - if (datatype .ne. MPI_INTEGER) then - write(6,*) 'Invalid datatype passed to user_op()' - return - endif - - do ii=1, count - outvec(ii) = invec(ii) * 2 + outvec(ii) - enddo - - end - program main implicit none include 'mpif.h' @@ -95,3 +77,21 @@ C Check if the result is correct call mpi_finalize(ierr) end + + subroutine user_op( invec, outvec, count, datatype ) + implicit none + include 'mpif.h' + integer invec(*), outvec(*) + integer count, datatype + integer ii + + if (datatype .ne. MPI_INTEGER) then + write(6,*) 'Invalid datatype passed to user_op()' + return + endif + + do ii=1, count + outvec(ii) = invec(ii) * 2 + outvec(ii) + enddo + + end diff --git a/teshsuite/smpi/mpich3-test/f77/coll/uallreducef.f b/teshsuite/smpi/mpich3-test/f77/coll/uallreducef.f index 566d294b92..6a74bf01a3 100644 --- a/teshsuite/smpi/mpich3-test/f77/coll/uallreducef.f +++ b/teshsuite/smpi/mpich3-test/f77/coll/uallreducef.f @@ -6,23 +6,6 @@ C C C Test user-defined operations. This tests a simple commutative operation C - subroutine uop( cin, cout, count, datatype ) - implicit none - include 'mpif.h' - integer cin(*), cout(*) - integer count, datatype - integer i - -C if (datatype .ne. MPI_INTEGER) then -C print *, 'Invalid datatype (',datatype,') passed to user_op()' -C return -C endif - - do i=1, count - cout(i) = cin(i) + cout(i) - enddo - end - program main implicit none include 'mpif.h' @@ -61,3 +44,20 @@ C Check that all results are correct call mtest_finalize(errs) call mpi_finalize(ierr) end + + subroutine uop( cin, cout, count, datatype ) + implicit none + include 'mpif.h' + integer cin(*), cout(*) + integer count, datatype + integer i + +C if (datatype .ne. MPI_INTEGER) then +C print *, 'Invalid datatype (',datatype,') passed to user_op()' +C return +C endif + + do i=1, count + cout(i) = cin(i) + cout(i) + enddo + end diff --git a/teshsuite/smpi/mpich3-test/f90/coll/exscanf90.f90 b/teshsuite/smpi/mpich3-test/f90/coll/exscanf90.f90 index 59cb7e447b..5444f380dc 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/exscanf90.f90 +++ b/teshsuite/smpi/mpich3-test/f90/coll/exscanf90.f90 @@ -3,24 +3,6 @@ ! ! (C) 2003 by Argonne National Laboratory. ! See COPYRIGHT in top-level directory. -! - subroutine uop( cin, cout, count, datatype ) - use mpi - integer cin(*), cout(*) - integer count, datatype - integer i - - if (.false.) then - if (datatype .ne. MPI_INTEGER) then - write(6,*) 'Invalid datatype passed to user_op()' - return - endif - endif - - do i=1, count - cout(i) = cin(i) + cout(i) - enddo - end ! program main use mpi @@ -108,3 +90,21 @@ 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 (.false.) then + if (datatype .ne. MPI_INTEGER) then + write(6,*) 'Invalid datatype passed to user_op()' + return + endif + endif + + do i=1, count + cout(i) = cin(i) + cout(i) + enddo + end diff --git a/teshsuite/smpi/mpich3-test/f90/coll/redscatf90.f90 b/teshsuite/smpi/mpich3-test/f90/coll/redscatf90.f90 index 496d178277..12b51b22a8 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/redscatf90.f90 +++ b/teshsuite/smpi/mpich3-test/f90/coll/redscatf90.f90 @@ -4,23 +4,6 @@ ! (C) 2011 by Argonne National Laboratory. ! See COPYRIGHT in top-level directory. ! - subroutine uop( cin, cout, count, datatype ) - use mpi - integer cin(*), cout(*) - integer count, datatype - integer i - - if (.false.) then - if (datatype .ne. MPI_INTEGER) then - write(6,*) 'Invalid datatype ',datatype,' passed to user_op()' - return - endif - endif - - do i=1, count - cout(i) = cin(i) + cout(i) - enddo - end ! ! Test of reduce scatter. ! @@ -88,3 +71,21 @@ call mpi_finalize( ierr ) end + + subroutine uop( cin, cout, count, datatype ) + use mpi + integer cin(*), cout(*) + integer count, datatype + integer i + + if (.false.) then + if (datatype .ne. MPI_INTEGER) then + write(6,*) 'Invalid datatype ',datatype,' passed to user_op()' + return + endif + endif + + do i=1, count + cout(i) = cin(i) + cout(i) + enddo + end diff --git a/teshsuite/smpi/mpich3-test/f90/coll/reducelocalf90.f90 b/teshsuite/smpi/mpich3-test/f90/coll/reducelocalf90.f90 index 14229525b9..d678ca95aa 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/reducelocalf90.f90 +++ b/teshsuite/smpi/mpich3-test/f90/coll/reducelocalf90.f90 @@ -7,23 +7,6 @@ ! ! Test Fortran MPI_Reduce_local with MPI_OP_SUM and with user-defined operation. ! - subroutine user_op( invec, outvec, count, datatype ) - use mpi - integer invec(*), outvec(*) - integer count, datatype - integer ii - - if (datatype .ne. MPI_INTEGER) then - write(6,*) 'Invalid datatype passed to user_op()' - return - endif - - do ii=1, count - outvec(ii) = invec(ii) * 2 + outvec(ii) - enddo - - end - program main use mpi integer max_buf_size @@ -94,3 +77,20 @@ call mpi_finalize(ierr) end + + subroutine user_op( invec, outvec, count, datatype ) + use mpi + integer invec(*), outvec(*) + integer count, datatype + integer ii + + if (datatype .ne. MPI_INTEGER) then + write(6,*) 'Invalid datatype passed to user_op()' + return + endif + + do ii=1, count + outvec(ii) = invec(ii) * 2 + outvec(ii) + enddo + + end diff --git a/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 b/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 index 574d6490de..cd0ae1e95d 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 +++ b/teshsuite/smpi/mpich3-test/f90/coll/uallreducef90.f90 @@ -7,22 +7,6 @@ ! ! 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 @@ -65,3 +49,19 @@ 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 -- 2.20.1