[mpich-devel] Correction [Re: Proposed CH4 device API -- MPID_Pre_init]

Zhou, Hui zhouh at anl.gov
Mon Jan 6 22:25:57 CST 2020

The last email about ADI change was accidentally attributed to CH4. Correction: it is an MPICH ADI addition that applies to all devices, both CH3 and CH4. While the reasons and justifications given in the last email still applies, please note this is a change that will affect all devices. Hopefully, we’ll all see this impact as trivial. Again, any comments are welcome.

Hui Zhou

On Jan 6, 2020, at 4:45 PM, Hui Zhou <hzhou321 at anl.gov<mailto:hzhou321 at anl.gov>> wrote:

Hi MPICH developers,

There is a pending PR on GitHub, https://github.com/pmodels/mpich/pull/4214, that is proposing adding a new device layer API for ch4 — MPID_Pre_init.

The current ADI a single MPID_Init(int *argc, int **argv, int required_thread_level, int *provided_thread_level). It parses command line argument and decides the thread_level among other device layer initializations. There are MPIR-layer initializations both before MPID_Init that need know the thread-level. Even inside MPID_Init, different components may need know thread_level but it is not certain at which point the thread-level is determined. Currently, in MPIR_Init_thread, we initializes with a thread-level based on user argument, which potentially will get changed by MPID_Init. That creates a potential inconsistency and as well as complications.

The PR addresses it by splitting the argument parsing part of init into MPID_Pre_Init, that is called the very first thing during the init process, guaranteeing the thread-level that each components sees is the reliable final thread-level.

While addressing the thread-level support is the motivation, once the MPID_Pre_init API is there, it will allow more flexible device initializations as well.

The PR has already went through internal reviews and is ready to be merged. We welcome any comments.

Hui Zhou

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/devel/attachments/20200107/966c8256/attachment.html>

More information about the devel mailing list