Hi everyone,
I think I may have found some bugs in mpich tests for RMA
operations.
First, in rma/lockcontention3.c.
When calling RMA operations, the different offsets are not
taken in account on the origin_count and target_count
parameters. As the buffers are the same sizes, when the count
arguments are equal to "longcount" (such as in the tests cases
9, 10 and 11), it either overflows when the operation is
actually done, or, as it should preferably be done, it fails
with the returns of the MPI_ERR_RMA_RANGE error code.
Also, on the check function, there are some array
overflows, as the loops go from 0 to longcount-1, and the
array is accessed with the OFFSET (buf[OFFSET_1+j]).
The easiest solution would be to set bufsize (l.111) and
getbufsize (l.118) to RMA_SIZE+OFFSET_3 (OFFSET_3 being the
bigger one), and maybe allocate change l.123 to srcbuf =
malloc((RMA_SIZE + OFFSET_3)*sizeof(*srcbuf));
Also, the window is defined with the bufsize as size, which
should mean that the window is bufsize bytes long. But as it
is an array of int's, it would rather be bufsize*sizeof(int)
long. There might be a problem there as well, given the fact
that the displacement unit given is actually "sizeof(int)".
rma/manyrma3.c
No verification is done. Just accumulate, and then we
assume the result is correct. Also, winbuf is not initialized.
Sincerely yours,
C. FOYER