Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] valgrind invalid reads for large self-sends using thread_multiple
From: Daniel Ibanez (dan.a.ibanez_at_[hidden])
Date: 2014-02-10 11:29:47


I have used OpenMPI in conjunction with Valgrind for a long time now, and
developed a list of suppressions for known false positives over time.

Now I am developing a library for inter-thread communication that is based
on using OpenMPI with MPI_THREAD_MULTIPLE support. I have noticed that
sending large messages from one thread to another in the same process will
cause valgrind to complain about invalid reads. I have narrowed it down to
one function being executed on four threads in one process. Attached is a
tarball containing the error-reproducing program, valgrind suppression
file, and valgrind output.

The strange thing is that the valgrind error message doesn't fit the
pattern of read-after-free or read-past-the-end. I'd like to know the

1) Should I even worry ? The code doesn't crash, only valgrind complains.
Is it a harmless false positive ?
2) If it is an issue, am I using MPI right?
3) If I'm using it right, then what causes this ? some kind of internal
buffering issue ?

Note that I use Issend, so nothing should be freed until its completely
been read (in theory).

Thank you,

Dan Ibanez