<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Dear Max,</div><div class=""><br class=""></div><div class="">I’m not sure I completely understand what you mean by a « pmpi.h » however I may have some initial elements below.</div><div class=""><br class=""></div><div class="">The PMPI interface is currently targeting MPI functions only and indeed some of the values you’ll find in your executable will be compile time constants.</div><div class="">In fact, most MPI types/Constants are implementation dependent, there is no unified ABI.</div><div class=""><br class=""></div><div class=""><div class="">Nonetheless, you might be able to interpret them in your wrapper library in order to have them « rerouted » to your target implementation.</div></div><div class="">I mean, knowing the value of MPI_COMM_WORLD you could rewrite it to be MPI_COMM_WORLD2. </div><div class="">And for sure you wont’t find a PMPI_COMM_WORLD.</div><div class=""><br class=""></div><div class="">I can help on writing a wrapper for the whole PMPI interface. See my repo here: <a href="https://github.com/besnardjb/mpi-snippets" class="">https://github.com/besnardjb/mpi-snippets</a></div><div class="">There is a simple python script generating VIM snippets for MPI from JSON specs, it can easily be converted to a script generating the whole MPI interface.</div><div class=""><br class=""></div><div class="">Eventually, an approach close to what you want to do might be <a href="https://github.com/cea-hpc/wi4mpi" class="">https://github.com/cea-hpc/wi4mpi</a> which operates this systematic handler conversion between MPI flavors, but this clearly involves some rewriting.</div><div class=""><br class=""></div><div class="">Hope this helps.</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Jean-Baptiste.</div><br class=""><div><blockquote type="cite" class=""><div class="">Le 4 oct. 2017 à 10:35, Max Sagebaum <<a href="mailto:max.sagebaum@scicomp.uni-kl.de" class="">max.sagebaum@scicomp.uni-kl.de</a>> a écrit :</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div class="">
<div class=""><span class="">
<pre class=""><div style="font-family: Cantarell; white-space: normal;" class="">Hello @ all,</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">my question is concerning the PMPI specification. I hope the list is the correct place to ask.</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">I want to write a complete wrapper for MPI. That is every define, typedef and function will be wrapped and might be completely changed. Currently I prefixed everything with AMPI_ such that no name clashes exist. But the user would need to rename every occurrence of MPI_ with AMPI_</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">I would now like to use the PMPI definition of MPI to define my wrappers as the MPI version which then use the PMPI definitions. Unfortunately I could not find tutorials for a complete wrapper.</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">As an example take MPI_COMM_WORLD. I made a grep on the openmpi installation on my linux machine for PMPI_COMM_WORLD but the result was empty. The definition of MPI_COMM_WORLD was </div><div style="font-family: Cantarell; white-space: normal;" class="">#define MPI_COMM_WORLD OMPI_PREDEFINED_GLOBAL( MPI_Comm, ompi_mpi_comm_world)</div><div style="font-family: Cantarell; white-space: normal;" class="">without any chance to switch to PMPI_COMM_WORLD as a predefined macro.</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">I also checked the newest source tarball of openmpi and I could not find anything for PMPI_COMM_WORLD there.</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">In the mpi 3.0 standard on page 555 in section 14.2.1 the requirements are just listed for functions. Was the definition of the PMPI_ supplements for defines, types etc. never discussed?</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">I would have expected, that I can just include a pmpi.h and then I would have all the PMPI_ symbols without the MPI symbols available.</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">Do you know of any way I could make my idea work?</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><div style="font-family: Cantarell; white-space: normal;" class="">Cheers</div><div style="font-family: Cantarell; white-space: normal;" class=""><br class=""></div><pre class=""><span style="font-family: Cantarell; white-space: normal;" class="">Max</span></pre><pre class=""><br class=""></pre><pre class="">-- <br class=""></pre>Max Sagebaum
Chair for Scientific Computing,
TU Kaiserslautern,
Bldg/Geb 34, Paul-Ehrlich-Strasse,
67663 Kaiserslautern, Germany
Phone: +49 (0)631 205 5638
Fax: +49 (0)631 205 3056
Email: <a href="mailto:max.sagebaum@scicomp.uni-kl.de" class="">max.sagebaum@scicomp.uni-kl.de</a>
URL: <a href="http://www.scicomp.uni-kl.de" class="">www.scicomp.uni-kl.de</a>
</pre>
</span></div>
</div>
_______________________________________________<br class="">mpiwg-tools mailing list<br class=""><a href="mailto:mpiwg-tools@lists.mpi-forum.org" class="">mpiwg-tools@lists.mpi-forum.org</a><br class="">https://lists.mpi-forum.org/mailman/listinfo/mpiwg-tools</div></blockquote></div><br class=""></body></html>