<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi C. FOYER,<br>
<br>
Thanks for reporting bugs to us.<br>
<br>
However, the places in test rma/lockcontention3.c are correct. <br>
The buffers' size is RMA_SIZE (2048) count of int. In case 9, 10, 11
the operations' size is longcount(512) count of int, and the largest
target displacement is OFFSET_3(157), which means the window buffer
is accessed in range int[157: 157+512]. Thus no overflows.<br>
<br>
In rma/manyrma3.c, as you reported, we missed verification and
winbuf initialization. We will fix it.<br>
<br>
Min<br>
<br>
<div class="moz-cite-prefix">On 7/12/16 3:08 AM, Clément Foyer
wrote:<br>
</div>
<blockquote cite="mid:CAJGsLRiNtCaTH1KtyegFS1+G0v0Kmb9-unb_L6HezgQFoG_X8w@mail.gmail.com" type="cite">
<div dir="ltr">Hi everyone,
<div><br>
</div>
<div>I think I may have found some bugs in mpich tests for RMA
operations.</div>
<div><br>
</div>
<div>First, in rma/lockcontention3.c.</div>
<div>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.</div>
<div>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]).</div>
<div>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));</div>
<div>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)".</div>
<div><br>
</div>
<div>rma/manyrma3.c</div>
<div>No verification is done. Just accumulate, and then we
assume the result is correct. Also, winbuf is not initialized.</div>
<div><br>
</div>
<div>Sincerely yours,</div>
<div><br>
</div>
<div>C. FOYER</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
discuss mailing list <a class="moz-txt-link-abbreviated" href="mailto:discuss@mpich.org">discuss@mpich.org</a>
To manage subscription options or unsubscribe:
<a class="moz-txt-link-freetext" href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></pre>
</blockquote>
<br>
</body>
</html>