Subject: Bug report on COMMS3.f in PARKBENCH2.0

From: [email-masked] (Harikumar Sivaraman)
Date: Fri, 28 Jun 96 9:50:26 CDT

DISCLAIMER: The contents of this mail are not an official HP position.
	    I do not speak for HP.

The COMMS3 benchmark in PARKBENCH2.0 is in apparent violation of 
the specifications in the MPI standard. The benchmark attempts to do an
MPI_RECV into the same buffer on which it has posted an MPI_ISEND
before it does an MPI_WAIT. The relevant code fragment is as below:

COMMS3  (This code fragments applies in the case of two processors)
------
CALL MPI_ISEND(A, IWORD, MPI_DOUBLE_PRECISION, .....

CALL MPI_RECV(A, IWORD, MPI_DOUBLE_PRECISION, ......

CALL MPI_WAIT(request(NSLAVE), status, ierr)

COMMS3  (Multiple processors)
------

do i = 1, #processors
   CALL MPI_ISEND(A, IWORD, MPI_DOUBLE_PRECISION, .....
enddo

// The MPI_ISEND statements in the loop violate the MPI standard since the buffer "A"
//  is reused inside the loop.

do i = 1, #processors
   CALL MPI_RECV(A, IWORD, MPI_DOUBLE_PRECISION, ......
enddo

do i = 1, #processors
   CALL MPI_WAIT(request(NSLAVE), status, ierr)
enddo

Comments:
---------
The MPI standards (page 40, last but one paragraph) says "the sender should
not access any part of the send buffer after a nonblocking send operation 
is called, until the send completes." Page 41, line 1 of the MPI standards says 
"the functions MPI_WAIT and MPI_TEST are used to complete a nonblocking
communication". Clearly the reuse of buffer "A" in the code fragments
above is in violation of the standard. 

-------
H. Sivaraman                                  (214) 497 - 4374
HP; 3000 Waterview Pk.way
Dallas, TX - 75080