Hi,

Regarding your question about marking memory read only and using this for MPI 
Message checking I would recommend, you read the following paper from a former 
colleque of mine:

Memory Debugging of MPI-Parallel Applications in Open MPI
Rainer Keller, Shiqing Fan, and Michael Resch

I'm currently re-evaluating the implementation with respect to a major Open MPI 
version update.
If you are interested in it do not hesitate to contact me.

Best regards
Christoph Niethammer

--

Christoph Niethammer
High Performance Computing Center Stuttgart (HLRS)
Nobelstrasse 19
70569 Stuttgart

Tel: ++49(0)711-685-87203
email: nietham...@hlrs.de
http://www.hlrs.de/people/niethammer


----- Original Message -----
From: "John Reiser" <jrei...@bitwagon.com>
To: "valgrind-users" <valgrind-users@lists.sourceforge.net>
Sent: Wednesday, March 9, 2016 5:25:25 PM
Subject: Re: [Valgrind-users] can memchecker mark memory as read-only ?

> Currently, my understanding is that valgrind memchecker can mark a
> memory area as non accessible via the VALGRIND_MAKE_MEM_NOACCESS()
> macro, but there is currently no way to mark it as read-only.

Yes. READ_ONLY is not a recognized state.

> if yes, is there any plan to develop such a feature ?

No.  The accounting bits are organized into two phases: is the address legal
at all, and is the byte writable and initialized.  Adding a new state
READ_ONLY would be a large task with significant runtime costs.
It might be best applied to the first phase, but complications
regarding overlap [or splitting] between existing regions and new READ_ONLY
regions, plus granularity assumptions (pages now, bytes for READ_ONLY)
probably would be messy.

>>From an OpenMPI developer point of view, it would be nice to mark the send
> buffer as read-only between MPI_Isend() and MPI_Wait() so valgrind can trap
> incorrect user code that modifies the send buffer when it is not allowed.

Use LD_PRELOAD to intercept MPI_Isend() [etc.].  Allocate a new buffer,
copy the message into it, mark the original buffer as NOACCESS, call the
original MPI_Isend on the new buffer. Reverse the effects after
the original MPI_Isend() is complete, waited, and checked.
See the manual page for "man dlsym" and the RTLD_NEXT functionality.
Search the web, too.





------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to