[mpich-commits] r10660 - mpich2/trunk/test/mpi/f77/coll

gropp at mcs.anl.gov gropp at mcs.anl.gov
Fri Nov 23 08:06:51 CST 2012


Author: gropp
Date: 2012-11-23 08:06:50 -0600 (Fri, 23 Nov 2012)
New Revision: 10660

Modified:
   mpich2/trunk/test/mpi/f77/coll/nonblocking_inpf.f
   mpich2/trunk/test/mpi/f77/coll/vw_inplacef.f
Log:
Correct erroneous assumption about size of Fortran INTEGER; this assumption causes these tests to fail with a valid Fortran program when Fortran INTEGERs are not 4 bytes

Modified: mpich2/trunk/test/mpi/f77/coll/nonblocking_inpf.f
===================================================================
--- mpich2/trunk/test/mpi/f77/coll/nonblocking_inpf.f	2012-11-22 00:41:46 UTC (rev 10659)
+++ mpich2/trunk/test/mpi/f77/coll/nonblocking_inpf.f	2012-11-23 14:06:50 UTC (rev 10660)
@@ -9,7 +9,6 @@
        implicit none
        include 'mpif.h'
        integer SIZEOFINT
-       parameter (SIZEOFINT=4)
        integer MAX_SIZE
        parameter (MAX_SIZE=1024)
        integer rbuf(MAX_SIZE)
@@ -25,6 +24,7 @@
        comm = MPI_COMM_WORLD
        call mpi_comm_rank( comm, rank, ierr )
        call mpi_comm_size( comm, size, ierr )
+       call mpi_type_size( MPI_INTEGER, SIZEOFINT, ierr )
 
        do i=1,MAX_SIZE
            rbuf(i) = -1

Modified: mpich2/trunk/test/mpi/f77/coll/vw_inplacef.f
===================================================================
--- mpich2/trunk/test/mpi/f77/coll/vw_inplacef.f	2012-11-22 00:41:46 UTC (rev 10659)
+++ mpich2/trunk/test/mpi/f77/coll/vw_inplacef.f	2012-11-23 14:06:50 UTC (rev 10660)
@@ -9,7 +9,6 @@
        implicit none
        include 'mpif.h'
        integer SIZEOFINT
-       parameter (SIZEOFINT=4)
        integer MAX_SIZE
        parameter (MAX_SIZE=1024)
        integer rbuf(MAX_SIZE)
@@ -26,7 +25,13 @@
        comm = MPI_COMM_WORLD
        call mpi_comm_rank( comm, rank, ierr )
        call mpi_comm_size( comm, size, ierr )
+       call mpi_type_size( MPI_INTEGER, SIZEOFINT, ierr )
 
+       if (size .gt. MAX_SIZE) then
+          print *, ' At most ', MAX_SIZE, ' processes allowed'
+          call mpi_abort( MPI_COMM_WORLD, 1, ierr )
+       endif
+C
        do i=1,MAX_SIZE
            rbuf(i) = -1
        enddo



More information about the commits mailing list