On 11 February 2010 15:06, George Bosilca <bosilca_at_[hidden]> wrote:
> This is absolutely not true. Open MPI supports zero length collective operations (all of them actually), but if their arguments are correctly shaped.
OK, you are right here ...
> What you're asking for is a free ticket to write MPI calls that do not follow the MPI requirements when a special value for count is given.
But you did not answer my previous question... What's the rationale
for requiring sendbuf!=recvbuf when count=0? I would argue you want a
free ticket :-) to put restrictions on user code (without an actual
rationale) in order to simplify your implementation.
> While zero-length arrays/sequence/containers do appears in real code, they are not equal to NULL. If they are NULL, that means they do not contain any useful data, and they don't need to be source or target of any kind of [collective or point-to-point] communications.
Yes, I know. Moreover, I agree with you. NULL should be reserved for
invalid pointers, not for zero-length array... The problem is that
people out there seem to disagree or just do not pay any attention to
this, thus (pointer=NULL,length=0) DO APPEAR in real life (like the
Python example I previously showed you)... Additionally, some time ago
(while discussing MPI_Alloc_mem(size=0)) we commented on the different
return values for malloc(0) depending on the platform...
Well, this discussion got too far... In the end, I agree that
representing zero-length arrays with (pointer=NULL,length=0) should be
regarded as bad practice...
Centro Internacional de MÃ©todos Computacionales en IngenierÃa (CIMEC)
Instituto de Desarrollo TecnolÃ³gico para la Industria QuÃmica (INTEC)
Consejo Nacional de Investigaciones CientÃficas y TÃ©cnicas (CONICET)
PTLC - GÃ¼emes 3450, (3000) Santa Fe, Argentina