Re: [mpiwg-tools] PMPI and sessions init
Am 09.11.20 um 11:00 schrieb Marc-André Hermanns via mpiwg-tools:
Hi Joachim,
if I understood the discussion about MPI_Session_init and PMPI right, I don't think there exists an issue. By ld-preloading the PMPI tool, the tool can also intercept a call to MPI_Session_init, which might come from a library constructor before main. Even a function called from the library constructor of a static library can be intercepted by a ld-preloaded tool.
For libraries, which are explicitly loaded by the MPI runtime during initialization, this would also work. For others, it depends on the ordering of calling the library constructor (might work by chance :).
Wasn't the problem the fact not necessarily that the tools can not intercept MPI_Session_init in time, but our current decision to disallow tool *registration* after MPI was initialized, a library using session init inside a constructor would cut off registration for any tool not registered at the time.
Maybe I am missing something here or misunderstood something in the discussion?
If a tool calls session init in the constructor, the MPI library would load all tools by an implementation defined mechanism (env variable), allowing them to register before finishing initialization. A challenge for the MPI library might be that it must be prepared for possible re-entrance of session init by different tools: Tool A - constructor -> MPI session init -> load tool B Tool B - constructor -> MPI register tool -> MPI session init (re-entering in nesting) -> load tool C ...
This was one of my main motivation of having such an environmental variable.
I think the environment variable is separate (or orthogonal) to the problem above. It's not so much that MPI won't eventually know all the tools and their order, but that a "rogue" library would just use (and with that initialize) MPI at a time out of control of the tool registration process.
At least that was my understanding of the discussion.
The env variable works like a barrier: MPI initialitation cannot complete until all tools are loaded and registered. - Joachim
Cheers, Marc-Andre
_______________________________________________ mpiwg-tools mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpiwg-tools
_______________________________________________ mpiwg-tools mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpiwg-tools
-- Dipl.-Inf. Joachim Protze IT Center Group: High Performance Computing Division: Computational Science and Engineering RWTH Aachen University Seffenter Weg 23 D 52074 Aachen (Germany) Tel: +49 241 80- 24765 Fax: +49 241 80-624765 [email protected] www.itc.rwth-aachen.de
participants (1)
-
Joachim Protze