Re: [OMPI devel] MPI_ALLOC_MEM warning when requesting 0 (zero) bytes

2007-07-26 Thread Jeff Squyres
On Jul 26, 2007, at 12:42 PM, Lisandro Dalcin wrote: Be sure to read this thread in order -- the conclusion of the thread was that we now actually *do* return NULL, per POSIX advice. OK, I got confused. And now, MPI_Free_mem is going to fail with a NULL pointer? Not sure what POSIX says, but t

Re: [OMPI devel] MPI_ALLOC_MEM warning when requesting 0 (zero) bytes

2007-07-26 Thread Lisandro Dalcin
On 7/25/07, Jeff Squyres wrote: Be sure to read this thread in order -- the conclusion of the thread was that we now actually *do* return NULL, per POSIX advice. OK, I got confused. And now, MPI_Free_mem is going to fail with a NULL pointer? Not sure what POSIX says, but then OMPI should also

Re: [OMPI devel] MPI_ALLOC_MEM warning when requesting 0 (zero) bytes

2007-07-25 Thread Jeff Squyres
Be sure to read this thread in order -- the conclusion of the thread was that we now actually *do* return NULL, per POSIX advice. On Jul 25, 2007, at 10:52 AM, Lisandro Dalcin wrote: On 7/23/07, Jeff Squyres wrote: I think that this will require a little tomfoolery to fix properly because

Re: [OMPI devel] MPI_ALLOC_MEM warning when requesting 0 (zero) bytes

2007-07-25 Thread Lisandro Dalcin
On 7/23/07, Jeff Squyres wrote: I think that this will require a little tomfoolery to fix properly because we can't simply return NULL (you can't expect to use the pointer that we return to store anything, but you should be able to expect to be able to dereference it without seg faulting). Exc

Re: [OMPI devel] MPI_ALLOC_MEM warning when requesting 0 (zero) bytes

2007-07-23 Thread Jeff Squyres
Excellent point. Thanks! I think that this will require a little tomfoolery to fix properly because we can't simply return NULL (you can't expect to use the pointer that we return to store anything, but you should be able to expect to be able to dereference it without seg faulting). I'll

[OMPI devel] MPI_ALLOC_MEM warning when requesting 0 (zero) bytes

2007-07-23 Thread Lisandro Dalcin
If I understand correctly the standard, http://www.mpi-forum.org/docs/mpi-20-html/node54.htm#Node54 MPI_ALLOC_MEM with size=0 is valid ('size' is a nonnegative integer) Then, using branch v1.2, I've got the following warning at runtime: malloc debug: Request for 0 bytes (base/mpool_base_alloc.c