Opened 10 years ago

Last modified 5 years ago

#290 new feature

better valgrind integration

Reported by: goodell Owned by:
Priority: long-term Milestone: future
Component: mpich Keywords:

Description (last modified by balaji)

This is a catchall ticket for some of the valgrind integration features that I'd like to put into mpich2 and don't want to forget about.

  1. Add an MPIU_Assert_valid_and_not_null - This would check for a !NULL value but also look 0xefefefef if mem debugging is enabled and/or test validity via the VALGRIND_CHECK_VALUE_IS_DEFINED(_lvalue) valgrind client request macro if valgrind is available. MPIU_Assert_zero_and_not_null would be very similar.
  2. Use proper memory pool management macros to track the handle allocation. VALGRIND_CREATE_MEMPOOL and friends is what is used for this.
  3. Use VALGRIND_CREATE_BLOCK to add descriptions to regions of memory in order to make understanding valgrind messages clearer.
  4. I suspect the knem LMT code will frequently cause valgrind to think that memory is undefined when it is actually defined. Look at ways to give valgrind a better view of things.
  5. Add valgrind client requests as an alternative to the initializations performed by --enable-g=meminit. That way when Tom uses valgrind on him MPI program he doesn't get uninitialized writev warnings but doesn't have to pay a full initialization latency penalty.
  6. Figure out a good way to integrate valgrind into the nightly tests. This would help catch bugs that our current --enable-g features can't.

Change History (6)

comment:1 Changed 10 years ago by goodell

  • Description modified (diff)

tweaking ticket formatting for web-viewing...

comment:2 Changed 9 years ago by balaji

  • Milestone set to future
  • Owner set to goodell

comment:3 Changed 9 years ago by goodell

  • Status changed from new to accepted

FWIW, #6 is basically done, we just have to add MPITEST_PROGRAM_WRAPPER=valgrind into the list of jobs to be run.

comment:4 Changed 9 years ago by goodell

Some more of these are done now, specifically #2 and #3 are handled by [9a07199afb60b006fa608aaa6bfebf5db60dbabb]. #1 isn't exactly done, but something along those lines (MPIU_Assert_fmt_msg) was added in [40431573fdebf96a08ac265690fb15f5ab20642a]. When running under valgrind you will get a proper backtrace on assertion failure.

Also, direct uses of the valgrind headers and macros have been removed from MPICH2. As of [22defdc046757c5957fc7c89cb6cf3a0038fd53e] there is a new header, src/include/mpiu_valgrind.h, that provides MPIU_VG_* versions of most of the VALGRIND_* macros. These are always defined, regardless of the availability of valgrind.h/memcheck.h, which simplifies portable macro usage.

comment:5 Changed 5 years ago by balaji

  • Description modified (diff)
  • Status changed from accepted to new

comment:6 Changed 5 years ago by balaji

  • Owner goodell deleted
Note: See TracTickets for help on using tickets.