<div dir="ltr">Hi Daniel,<div><br></div><div>My Github fork is totally unofficial and I don't want anyone to be confused about the authority of <a href="http://git.mpich.org/mpich.git/">http://git.mpich.org/mpich.git/</a>.</div><div><br></div><div>Generating patch files with 'git format-patch' and emailing them to the list or attaching them to a Trac ticket are better. There is also 'git send-email', but I don't know how to use it.</div><div><br></div><div>However, if you really, really like Github, you can submit a pull request to my repo and I'll push it to the MPICH review repo for you if it passes the test suite in Travis.</div><div><br></div><div>Best,</div><div><br>Jeff</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 9, 2016 at 5:14 PM, Daniel Ibanez <span dir="ltr"><<a href="mailto:dan.a.ibanez@gmail.com" target="_blank">dan.a.ibanez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Well, here is what I think is a legitimate fix based on the MPICH 3.2 tarball,</div><div>to the file src/mpi/coll/helper_fns.c</div><div><br></div><div><br></div><div><div>--- helper_fns_old.c<span style="white-space:pre-wrap"> </span>2016-01-09 19:21:21.000000000 -0500</div><div>+++ helper_fns.c<span style="white-space:pre-wrap"> </span>2016-01-09 19:22:19.000000000 -0500</div><div>@@ -760,6 +760,8 @@</div><div> to check for the error bit in the tag below, we should initialize all</div><div> tag fields here. */</div><div> status_array[i].MPI_TAG = 0;</div><div>+ /* Same as above for MPI_SOURCE */</div><div>+ status_array[i].MPI_SOURCE = MPI_PROC_NULL;</div><div> </div><div> /* Convert the MPID_Request objects to MPI_Request objects */</div><div> request_ptrs[i] = requests[i]->handle;</div></div><div><br></div><div><br></div><div>Seems like the MPID refactoring introduced both the status_static_array</div><div>optimization and properly caught the uninitialized MPI_TAG:</div><div><br></div><a href="https://github.com/jeffhammond/mpich/commit/54362c008ee413b40d5e4f654b72ee45091f1c33#diff-068b13839481e0ca992aee507263aa37R720" target="_blank">https://github.com/jeffhammond/mpich/commit/54362c008ee413b40d5e4f654b72ee45091f1c33#diff-068b13839481e0ca992aee507263aa37R720</a><div><br></div><div>Then subsequent continuations of that work added MPI_SOURCE</div><div>as something that is checked but didn't go back and initialize it:<br><div><br></div><div><a href="https://github.com/jeffhammond/mpich/commit/9a1ae5a841cd9cc5b2d258aa52fe1cb7ade4f498#diff-d340830666b4a17d656744365b99dcf3R4562" target="_blank">https://github.com/jeffhammond/mpich/commit/9a1ae5a841cd9cc5b2d258aa52fe1cb7ade4f498#diff-d340830666b4a17d656744365b99dcf3R4562</a></div></div><div><br></div><div>Apologies for the lack of version control coherence,</div><div>I'm not sure what the optimal way is to propose changes.</div><div><br></div><div>Please let me know if you can apply this patch.</div><div><br></div><div>Thanks</div></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 9, 2016 at 10:18 AM, Daniel Ibanez <span dir="ltr"><<a href="mailto:dan.a.ibanez@gmail.com" target="_blank">dan.a.ibanez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>Using MPICH 3.2, I get the following from Valgrind:</div><div><br></div><div><div>==80605== Conditional jump or move depends on uninitialised value(s)</div><div>==80605== at 0x100198C14: MPIC_Waitall (mpiimpl.h:4394)</div><div>==80605== by 0x100061D82: MPI_Dist_graph_create (dist_gr_create.c:380)</div><div>==80605== by 0x100000EC5: main (uninit.c:21)</div><div>==80605== Uninitialised value was created by a stack allocation</div><div>==80605== at 0x100198ADD: MPIC_Waitall (helper_fns.c:735)</div></div><div><br></div><div>When I run this program with 2 ranks:</div><div><div><br></div><div>int main(int argc, char** argv)</div><div>{</div><div> MPI_Init(&argc, &argv);</div><div> int n[2] = {1,1};</div><div> int sources[2] = {0,1};</div><div> int degrees[2] = {0,2};</div><div> int destinations_1[2] = {0,1};</div><div> int* destinations[2] = {0, destinations_1};</div><div> int weights_1[2] = {1,1};</div><div> int* weights[2] = {0, weights_1};</div><div> int rank;</div><div> MPI_Comm_rank(MPI_COMM_WORLD, &rank);</div><div> MPI_Comm new_comm;</div><div> MPI_Dist_graph_create(MPI_COMM_WORLD, n[rank], &sources[rank],</div><div> °rees[rank], destinations[rank], weights[rank],</div><div> MPI_INFO_NULL, 0, &new_comm);</div><div> MPI_Comm_free(&new_comm);</div><div> MPI_Finalize();</div><div>}</div></div><div><br></div><div>It seems to come from the status_static_array at</div><div>src/mpi/coll/helper_fns.c:740<br></div><div><br></div><div>It looks like status->MPI_SOURCE, when checked by MPIR_Process_status at</div><div>src/include/mpiimpl.h:4394<br></div><div>might not be initialized by MPIR_Waitall_impl</div><div>(I checked the other things used in that if statement and I'm</div><div>pretty sure its MPI_SOURCE).</div><div>I had a hard time tracing through the code further than that though.</div><div><br></div><div>I just switched from MPICH 3.1.4 and this didn't show up in that version.</div><div>I tend to like MPICH for its lack of Valgrind issues,</div><div>so let me know how I can help get this fixed.</div><div><br></div><div>Thank you,</div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/devel</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>
</div></div>