[Mpi-forum] MPI_DATATYPE_NULL when count=0

Fab Tillier ftillier at microsoft.com
Tue Jan 12 23:22:17 CST 2016


Don't datatypes with absolute addresses rely on MPI_BOTTOM, and a portable program can't assume that MPI_BOTTOM == NULL?

I think from an ease of use perspective, if I have a count of zero, having to pick an arbitrary committed datatype is non-intuitive.  If count is zero, there is no buffer or datatype, and there should be no requirement such non-existent datatype be committed.

Cheers,
-Fab

From: mpi-forum [mailto:mpi-forum-bounces at lists.mpi-forum.org] On Behalf Of William Gropp
Sent: Wednesday, 13 January 2016 4:52 p.m.
To: Main MPI Forum mailing list <mpi-forum at lists.mpi-forum.org>
Subject: Re: [Mpi-forum] MPI_DATATYPE_NULL when count=0

Yes, NULL buffers are valid - they aren't an MPI object.  There is no prohibition about passing them; only if they are used to form an invalid address (note that a datatype with absolute addresses relies on NULL as the buffer address).

Bill

William Gropp
Director, Parallel Computing Institute
Thomas M. Siebel Chair in Computer Science
Chief Scientist, NCSA
University of Illinois Urbana-Champaign




On Jan 12, 2016, at 9:49 PM, Jeff Hammond <jeff.science at gmail.com<mailto:jeff.science at gmail.com>> wrote:


Who wrote Example 4.23 of MPI 3.1?

I propose to add the exception rather than delete that example. I do not want to have to use real datatypes when sending nothing.

Is NULL a valid buffer handle? Can I pass null pointers when count=0?


Jeff


On Tuesday, January 12, 2016, William Gropp <wgropp at illinois.edu<mailto:wgropp at illinois.edu>> wrote:
The standard says that the null handles are invalid for input unless explicitly permitted.  There's no exemption for a datatype argument where the associated count is zero.

Bill

William Gropp
Director, Parallel Computing Institute
Thomas M. Siebel Chair in Computer Science
Chief Scientist, NCSA
University of Illinois Urbana-Champaign




On Jan 12, 2016, at 9:26 PM, Jeff Hammond <jeff.science at gmail.com<javascript:_e(%7B%7D,'cvml','jeff.science at gmail.com');>> wrote:


Is it allowed to communicate messages with (buffer=NULL,count=0,type=MPI_DATATYPE_NULL)?

George thinks MPI_DATATYPE_NULL cannot be used even when count=0, which I think is ridiculous, particularly when one makes the analogy to buffer=NULL.

See http://www.open-mpi.org/community/lists/users/2016/01/28255.php<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2furldefense.proofpoint.com%2fv2%2furl%3fu%3dhttp-3A__www.open-2Dmpi.org_community_lists_users_2016_01_28255.php%26d%3dBQMFaQ%26c%3d8hUWFZcy2Z-Za5rBPlktOQ%26r%3d195OD1c98cxYlIPBUDzl00KueizThEKs34a9DvL37eY%26m%3dtWmZZT774xAE-RjUpTuHeZ0-hHkwEoE5sQADPmobarg%26s%3d7rkfIDjMiCphV1WD00EIRKeH44dIa97JAz6C3HTPF7M%26e%3d&data=01%7c01%7cFTILLIER%40exchange.microsoft.com%7c9b61fb2b8f7c45c2fb0e08d31bcced13%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=UjhSvh%2fNiolRuN%2bvHUJc7YppwVTJK%2bbCedSNkpq2iYo%3d> for the thread in question.

There is example code in MPI that uses this behavior.  George and I agree that example text is non-normative, but I cannot imagine how this example came to exist without the Forum believing it to be valid.

Jeff

--
Jeff Hammond
jeff.science at gmail.com<javascript:_e(%7B%7D,'cvml','jeff.science at gmail.com');>
http://jeffhammond.github.io/<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2furldefense.proofpoint.com%2fv2%2furl%3fu%3dhttp-3A__jeffhammond.github.io_%26d%3dBQMFaQ%26c%3d8hUWFZcy2Z-Za5rBPlktOQ%26r%3d195OD1c98cxYlIPBUDzl00KueizThEKs34a9DvL37eY%26m%3dtWmZZT774xAE-RjUpTuHeZ0-hHkwEoE5sQADPmobarg%26s%3dl_bf2ha5FZxeiaQWAM3hSLdzVFrXjR7lP6X99U3j8Yo%26e%3d&data=01%7c01%7cFTILLIER%40exchange.microsoft.com%7c9b61fb2b8f7c45c2fb0e08d31bcced13%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=rDL5xchAfjl%2bZ78pap0CoBqeA1mTY%2fP1TR%2bR3bS9O4U%3d>
_______________________________________________
mpi-forum mailing list
mpi-forum at lists.mpi-forum.org<javascript:_e(%7B%7D,'cvml','mpi-forum at lists.mpi-forum.org');>
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2furldefense.proofpoint.com%2fv2%2furl%3fu%3dhttp-3A__lists.mpi-2Dforum.org_mailman_listinfo.cgi_mpi-2Dforum%26d%3dBQMFaQ%26c%3d8hUWFZcy2Z-Za5rBPlktOQ%26r%3d195OD1c98cxYlIPBUDzl00KueizThEKs34a9DvL37eY%26m%3dWmu6aeEpNfbRkhCoCXwh90QkD-Ztu59Ei30APosLG80%26s%3ddYDLJ4Oab5_LyCaITy8knLTMhrw6dXW8Ry7V9buTsrE%26e%3d&data=01%7c01%7cFTILLIER%40exchange.microsoft.com%7c9b61fb2b8f7c45c2fb0e08d31bcced13%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ecxlWptNnCnEkA2ciHW6zIekxfmR7k8nH3SAt89RxWA%3d>



--
Jeff Hammond
jeff.science at gmail.com<mailto:jeff.science at gmail.com>
http://jeffhammond.github.io/<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2furldefense.proofpoint.com%2fv2%2furl%3fu%3dhttp-3A__jeffhammond.github.io_%26d%3dBQMFaQ%26c%3d8hUWFZcy2Z-Za5rBPlktOQ%26r%3d195OD1c98cxYlIPBUDzl00KueizThEKs34a9DvL37eY%26m%3dWmu6aeEpNfbRkhCoCXwh90QkD-Ztu59Ei30APosLG80%26s%3dR0kDXAHJcNQ0KlEDXZgbFYadSfH6Zn2jb-IW4lqLGPk%26e%3d&data=01%7c01%7cFTILLIER%40exchange.microsoft.com%7c9b61fb2b8f7c45c2fb0e08d31bcced13%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=yRa3%2bxycihybY4SJ0m9i0Dg%2fl2BE%2bGvaZFv3WSDGFAQ%3d>
_______________________________________________
mpi-forum mailing list
mpi-forum at lists.mpi-forum.org<mailto:mpi-forum at lists.mpi-forum.org>
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20160113/c001fe5a/attachment-0001.html>


More information about the mpi-forum mailing list