<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>RE: [mpich-discuss] How does the fortran binding work?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>&nbsp;Hi,<BR>
&nbsp; In MPICH2 implementation on windows the fortran bindings work as below,<BR>
<BR>
1) Fortran bindings (see src/binding/f77/*) are wrapper funcs which do minimal work and call PMPI_* funcs to do the real work (This is done by fmpich2.dll).<BR>
<BR>
2) PMPI_* (read as &quot;Profiling&quot;MPI_* -- check the standard, <A HREF="http://www.mpi-forum.org/docs/mpi-11-html/mpi-report.html">http://www.mpi-forum.org/docs/mpi-11-html/mpi-report.html</A>, for more information on the MPI Profiling interface ) are defined to be MPI_* functions if no profiling library (MPE -- see section &quot;Runtime environment&quot;--&gt; &quot;Performance Analysis&quot; in the windows developer's guide, available at <A HREF="http://www.mcs.anl.gov/research/projects/mpich2/documentation/index.php?s=docs">http://www.mcs.anl.gov/research/projects/mpich2/documentation/index.php?s=docs</A>, for information on how you can use MPE with your programs) is provided or are defined as PMPI_* functions when a profiling library is provided. (This is done by mpich2mpi.dll)<BR>
<BR>
3) Either the profiling library (mpe.dll) or the windows binding library (mpich2mpi.dll) calls the MPI_* functions defined in mpich2.dll (for single threaded sock channel - in case of other channels variants of mpich2.dll) to do the real work.<BR>
<BR>
&nbsp;Let us know if you have any questions.<BR>
<BR>
(PS: This is different from the way its handled in MPICH2 on unix.)<BR>
<BR>
Regards,<BR>
Jayesh<BR>
<BR>
-----Original Message-----<BR>
From: owner-mpich-discuss@mcs.anl.gov [<A HREF="mailto:owner-mpich-discuss@mcs.anl.gov">mailto:owner-mpich-discuss@mcs.anl.gov</A>] On Behalf Of Anthony Chan<BR>
Sent: Wednesday, July 30, 2008 9:46 AM<BR>
To: mpich-discuss@mcs.anl.gov<BR>
Cc: mpich-discuss@mcs.anl.gov<BR>
Subject: Re: [mpich-discuss] How does the fortran binding work?<BR>
<BR>
<BR>
No.&nbsp; PMPI is the MPI profiling interface and is standardized by the MPI forum.<BR>
Fortran/C++ MPI binding just calls the C MPI routine.<BR>
<BR>
A.Chan<BR>
<BR>
----- &quot;Ruini Xue&quot; &lt;xueruini@gmail.com&gt; wrote:<BR>
<BR>
&gt; On Wed, Jul 30, 2008 at 8:54 PM, Dave Goodell &lt; goodell@mcs.anl.gov &gt;<BR>
&gt; wrote:<BR>
&gt;<BR>
&gt;<BR>
&gt; Hi Andrew,<BR>
&gt;<BR>
&gt; Yes, the fortran and c++ bindings are just wrappers over the C<BR>
&gt; bindings. The C binding implements the functionality directly.<BR>
&gt;<BR>
&gt; Are they wrappers of MPI_XXX() or PMPI_XXX()?<BR>
&gt;<BR>
&gt; Best<BR>
&gt;<BR>
&gt; Andrew<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; -Dave<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; On Jul 30, 2008, at 6:11 AM, Ruini Xue wrote:<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Hello, everyone,<BR>
&gt;<BR>
&gt; I am working with MPICH2 on Windows platfrom. The fortran MIP<BR>
&gt; application is linked to fmpich.lib, and fmpich2.dll is loaded in<BR>
&gt; runtime, which in turn loads mipch2mpi.dll.<BR>
&gt; mpich2mpi.dll contains all MPI APIs which exported C interface. What I<BR>
&gt; want to know is: what is the 'underlying' relation between fmpich2.dll<BR>
&gt; and mpich2mip.dll? Do all Fortran MPI calls are converted to c<BR>
&gt; bindings in mpich2mpi.dll? For example, does MPI_BCAST() in fmich2.dll<BR>
&gt; directly calls MPI_Bcast() in mpich2mpi.dll? Is MPI_BCAST() just a<BR>
&gt; stub while MPI_Bcast() do the real job?<BR>
&gt;<BR>
&gt; Thanks<BR>
&gt;<BR>
&gt; Andrew<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>