test/mpi/f77/pt2pt/bsendf.f hardcodes a 400-character attached buffer for a buffered send of 10 MPI_INTEGER values. This happens to work with MPICH's native MPI_BSEND_OVERHEAD value, but it is not portable to MPI implementations or ABI layers with a larger MPI_BSEND_OVERHEAD.
With a 512-byte overhead, the test's 400-byte attached buffer is smaller than the required size for even one 10-integer buffered send. The observed behavior in VAPAA was a hang: rank 1 blocked in MPI_Recv because the rank 0 MPI_Bsend did not produce the expected message under the undersized attached buffer.
Patch
diff --git a/test/mpi/f77/pt2pt/bsendf.f b/test/mpi/f77/pt2pt/bsendf.f
index 4c76ea0..a1d7f8c 100644
--- a/test/mpi/f77/pt2pt/bsendf.f
+++ b/test/mpi/f77/pt2pt/bsendf.f
@@ -4,21 +4,23 @@ C See COPYRIGHT in top-level directory
C
C Basic test for MPI_Bsend
-C We test a basic buffered send of 10 INTEGERs and assume a buffer
-C of 400 CHARACTERs are sufficient to account for MPI_BSEND_OVERHEAD
+C We test a basic buffered send of 10 INTEGERs and size the
+C attached buffer from MPI_BSEND_OVERHEAD.
program bsend
implicit none
include 'mpif.h'
integer ierr, errs, comm
- character dummy_buf(400)
- INTEGER dummy_size
+ integer dummy_size
+ integer dummy_buf_size
+ parameter (dummy_buf_size=MPI_BSEND_OVERHEAD+400)
+ character dummy_buf(dummy_buf_size)
C
errs = 0
comm = MPI_COMM_WORLD;
call MTest_Init( ierr )
- call mpi_buffer_attach(dummy_buf, 400, ierr )
+ call mpi_buffer_attach(dummy_buf, dummy_buf_size, ierr )
call test_bsend( comm, errs )
call mpi_buffer_detach(dummy_buf, dummy_size, ierr )
call MTest_Finalize( errs )
end
test/mpi/f77/pt2pt/bsendf.fhardcodes a 400-character attached buffer for a buffered send of 10MPI_INTEGERvalues. This happens to work with MPICH's nativeMPI_BSEND_OVERHEADvalue, but it is not portable to MPI implementations or ABI layers with a largerMPI_BSEND_OVERHEAD.With a 512-byte overhead, the test's 400-byte attached buffer is smaller than the required size for even one 10-integer buffered send. The observed behavior in VAPAA was a hang: rank 1 blocked in
MPI_Recvbecause the rank 0MPI_Bsenddid not produce the expected message under the undersized attached buffer.Patch