Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] RFC: New memchecker component - mempin
From: Shiqing Fan (fan_at_[hidden])
Date: 2012-10-08 09:05:53


*What:*

A new memory checking tool named MemPin was developed based on the Intel
Pin framework. It uses a callback mechanism to do the similar tasks as
Valgrind Memcheck. The new tool is tiny and flexible, and user may
implement his own callback function for different purposes.

The basic idea here for Open MPI is to watch over the communication
buffers. Every access to the buffers will be detected, and for specific
memory operation (read/write), a memory check callback will be triggered.

Only the required memory will be taken care of, so the shadow memory can
be kept to be as small as possible. The implemented shadow memory for
Open MPI is handled in bit-wise, i.e. every byte of memory has 2 bits of
shadow (4 different states. This doesn't provide bit-wise validity of
the memory like Valgirnd, where every byte of memory has 9 bits of
shadow. However, the shadow memory for this new tool is extensible.

Several predefined macros that may be used in user application and Open MPI:

  * *MEMPIN_RUNNING_WITH_PIN*: Checks whether the user application is
    running under MemPin and Pin
  * *MEMPIN_REG_MEM_WATCH*: Registers the memory entry for specific
    memory operation
  * *MEMPIN_UPDATE_MEM_WATCH:* Updates the memory entry parameters for
    specific memory operation
  * *MEMPIN_UNREG_MEM_WATCH*: Unregisters one memory entry
  * *MEMPIN_UNREG_ALL_MEM_WATCH*: Unregisters all the memory entries
  * *MEMPIN_SEARCH_MEM_INDEX*: Returns the memory entry index from the
    memory address storage
  * *MEMPIN_PRINT_CALLSTACK*: Prints the current callstack to standard
    output or a file

The new component mempin will have the same memchecker API as valgrind
component.

*WHY:*

This new implementation has similar functionalities as Valgrind
Memcheck, but it is lightweight, faster, extensible and flexible. It
also supports for Windows platforms.

*WHERE:*
       opal/mca/memchecker/
       ompi/include/ompi/memchecker.h or another header file.
       ompi/mca/pml/ob1 several memchecker macro need to be updated.

*WHEN:*
      If everything is fine, probably some time next week or later this
month.

We probably can also discuss it in the next teleconf.

Thanks,
Shiqing

-- 
---------------------------------------------------------------
Shiqing Fan
High Performance Computing Center Stuttgart (HLRS)
Tel: ++49(0)711-685-87234      Nobelstrasse 19
Fax: ++49(0)711-685-65832      70569 Stuttgart
http://www.hlrs.de/organization/people/shiqing-fan/
email: fan_at_[hidden]