[mpich-devel] uninit status_static_array

Daniel Ibanez dan.a.ibanez at gmail.com
Sat Jan 9 09:18:55 CST 2016


Hello,

Using MPICH 3.2, I get the following from Valgrind:

==80605== Conditional jump or move depends on uninitialised value(s)
==80605==    at 0x100198C14: MPIC_Waitall (mpiimpl.h:4394)
==80605==    by 0x100061D82: MPI_Dist_graph_create (dist_gr_create.c:380)
==80605==    by 0x100000EC5: main (uninit.c:21)
==80605==  Uninitialised value was created by a stack allocation
==80605==    at 0x100198ADD: MPIC_Waitall (helper_fns.c:735)

When I run this program with 2 ranks:

int main(int argc, char** argv)
{
  MPI_Init(&argc, &argv);
  int n[2] = {1,1};
  int sources[2] = {0,1};
  int degrees[2] = {0,2};
  int destinations_1[2] = {0,1};
  int* destinations[2] = {0, destinations_1};
  int weights_1[2] = {1,1};
  int* weights[2] = {0, weights_1};
  int rank;
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm new_comm;
  MPI_Dist_graph_create(MPI_COMM_WORLD, n[rank], &sources[rank],
      &degrees[rank], destinations[rank], weights[rank],
      MPI_INFO_NULL, 0, &new_comm);
  MPI_Comm_free(&new_comm);
  MPI_Finalize();
}

It seems to come from the status_static_array at
src/mpi/coll/helper_fns.c:740

It looks like status->MPI_SOURCE, when checked by MPIR_Process_status at
src/include/mpiimpl.h:4394
might not be initialized by MPIR_Waitall_impl
(I checked the other things used in that if statement and I'm
pretty sure its MPI_SOURCE).
I had a hard time tracing through the code further than that though.

I just switched from MPICH 3.1.4 and this didn't show up in that version.
I tend to like MPICH for its lack of Valgrind issues,
so let me know how I can help get this fixed.

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/devel/attachments/20160109/6a21f905/attachment.html>


More information about the devel mailing list