[mpich-devel] Sessions Considering Changing MPI_COMM_WORLD
Bland, Wesley
wesley.bland at intel.com
Tue Oct 31 09:16:40 CDT 2017
I misrepresented what I was trying to say here I think. I don't believe it's necessary to remove the symbol MPI_COMM_WORLD. What it does change (at least for MPICH-derived implementations) is that before MPI_INIT(), MPI_COMM_WORLD might be MPI_COMM_NULL (or something else with no meaning), and after MPI_INIT(), the handle would be changed to something more useful. The fact that the handle would change midstream is what's different.
On Oct 30, 2017, at 5:51 PM, Jeff Hammond <jeff.science at gmail.com<mailto:jeff.science at gmail.com>> wrote:
Lots of MPI libraries create their own communicator from the compile-time constant rather than a communicator argument. Breaking even a few of these will ruin MPI’s exhalted reputation in the HPC world.
This doesn't prevent the global variable from existing. In fact, if you were blindly using MPI_COMM_WORLD before without checking whether or not MPI was initialized, bad things were going to happen anyway. What this does do is say that if you haven't called MPI_INIT(), MPI_COMM_WORLD will probably point to MPI_COMM_NULL or something.
Perhaps saying that MPI_COMM_WORLD won't be a compile time constant isn't correct. The better way of saying it is probably that MPI_COMM_WORLD won't evaluate to anything useful until it's filled in during MPI_INIT(). If you end up using the sessions interface instead, the MPI library never has to create MPI_COMM_WORLD and incur all of the associated startup cost.
The better option is to provide new headers and libraries for sessions that break backwards compatibility. Or just have users opt-in to sessions by not using MPI_COMM_WORLD at all. That way you’re only breaking code that wants this feature rather than many that don’t.
Completely breaking backward compatibility is one option that was considered, but the working group thought that if we did things this way, it would still be possible for legacy codes to work without moving to the new Sessions interface.
What’s your Fortran story? If you don’t have a trivial solution for users of mpif.h, you’ve lost approximately half if MPI’s users.
I think it's similar to what it is now. MPI_COMM_WORLD is a global variable that has no meaning until MPI_INIT() is called.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/devel/attachments/20171031/3d91099c/attachment.html>
More information about the devel
mailing list