From: Patrick Geoffray Date: January 10, 2008 4:31:17 PM CST To: mpi-21@XXXXXXXXXXXXX Subject: Re: [mpi-21] Proposal EH2: add const keyword to the C bindings Reply-To: mpi-21@XXXXXXXXXXXXX Hi Dick, Richard Treumann wrote: > (not obvious) that the rule should be relaxed. First we should > conclude > that keeping it has trivial potential for being important to some MPI > implementation in comparison the burden it puts on application > writers. > Performance matters a lot and always will. Since MPI would have to return the send buffer unmodified, it would have to rollback all changes, that means writing everything twice. So, changing data in place would be faster than doing a copy only if the amount of data modified is small compared to the whole buffer. Is there any such case ? Byte-swapping applies to the whole buffer AFAIK. > I thank those who provided examples of situations where relaxed > send buffer > rules would be helpful. To add water to the mill, the most common case I have seen is sending a column and an intersecting row of the same matrix to two different processes. I have personally never seen a process sending the exact same data twice at the same time (except useless synthetic benchmarks). It's not a big deal right now since most (all?) MPI implementations don't try to modify send buffers. However, if this status quo would change, this could generate subtle and hard to debug data corruptions with reasonable (but MPI-violating) codes. Patrick