Commit 405713ef authored by William Gropp's avatar William Gropp
Browse files

[svn-r10660] Correct erroneous assumption about size of Fortran INTEGER; this...

[svn-r10660] 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
parent 7f2c84c6
......@@ -9,7 +9,6 @@ C
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 @@ C
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
......
......@@ -9,7 +9,6 @@ C
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 @@ C
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment