<div>Mathieu,</div>
<div>I didn&#39;t spot why you included &lt;mpi.h&gt;? It seems you work thru morph_mpi.h wrappers, right? Perhaps I misunderstand?</div>
<div>Peter<br><br></div>
<div class="gmail_quote">On Dec 4, 2007 2:03 PM, Mathieu Gontier &lt;<a href="mailto:mg.mailing-list@laposte.net">mg.mailing-list@laposte.net</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi all,<br><br>I am currently working with a project named MorphMPI. Its main purpose<br>is to offer a generic interface for the developers of parallel
<br>applications, and chose the MPI library/interconnect at the runtime by<br>rebuilding a shared morph library against the desire MPI library. (The<br>final application is linked against a shared morph library instead of
<br>the real MPI library.)<br>For more information about that, you can follow these links:<br>- <a href="http://www.clustermonkey.net//content/view/213/32/" target="_blank">http://www.clustermonkey.net//content/view/213/32/
</a><br>- <a href="http://sourceforge.net/projects/morphmpi" target="_blank">http://sourceforge.net/projects/morphmpi</a><br><br>So, I meet a little problem whatever the MPI library used (I tried with<br>MPICH-1.2.5.2, MPICHGM and IntelMPI).
<br>When MorphMPI is &nbsp;linked statically with my parallel application,<br>everything is ok; but when MorphMPI is &nbsp;linked dynamically with my<br>parallel application, MPI_Get_count return a wrong value.<br><br>I concluded it is difficult to use a MPI library thought a shared
<br>library. I wonder if someone have more information about it (in this<br>case, you&#39;re welcome ;-) )<br><br>Thank you for your support,<br>Mathieu.<br><br>PS: my problem happens in the the following example,<br><br>
# &nbsp;include&lt;morphmpi.h&gt;<br><br># &nbsp;include &lt;mpi.h&gt;<br><br>#include&lt;stdio.h&gt;<br><br><br>int main( int argc, char* argv[] )<br><br>{<br><br>&nbsp;int np, me, ier, flag=0, msglen=-1 ;<br><br>&nbsp;MorphMPI_Request request ;
<br><br>&nbsp;MorphMPI_Status status ;<br><br>&nbsp;int buf[1] ; buf[0]=-1 ;<br><br><br>&nbsp;ier = MorphMPI_Init( &amp;argc, &amp;argv ) ;<br><br>&nbsp;ier = MorphMPI_Comm_size( MorphMPI_COMM_WORLD, &amp;np ) ;<br><br>&nbsp;ier = MorphMPI_Comm_rank( MorphMPI_COMM_WORLD, &amp;me ) ;
<br><br><br>&nbsp;if( me &gt; 1 ) printf( &quot;I am the useless processor #%d on %d\n&quot;, me, np ) ;<br><br>&nbsp;else printf( &quot;I am the working processor #%d on %d\n&quot;, me, np ) ;<br><br><br>&nbsp;ier = MorphMPI_Barrier( MorphMPI_COMM_WORLD ) ;
<br><br><br>printf( &quot;&lt;&lt;&lt; %d &gt;&gt;&gt;\n&quot;, &amp;status ) ;<br><br><br>&nbsp;if( ! me ) {<br><br>&nbsp; &nbsp;buf[0] = 69 ;<br><br>&nbsp; &nbsp;ier = MorphMPI_Isend( buf, 1, MorphMPI_INT, 1,1, MorphMPI_COMM_WORLD, &amp;request ) ;
<br><br>&nbsp; &nbsp;ier = MorphMPI_Wait( &amp;request, &amp;status ) ;<br><br>&nbsp;}<br><br><br>&nbsp;ier = MorphMPI_Barrier( MorphMPI_COMM_WORLD ) ;<br><br><br>&nbsp;if( me == 1 ) {<br><br>&nbsp; &nbsp;ier = MorphMPI_Irecv( buf, 1, MorphMPI_INT, 0, 1, MorphMPI_COMM_WORLD, &amp;request ) ;
<br><br>&nbsp; &nbsp;ier = MorphMPI_Wait( &amp;request, &amp;status ) ;<br><br>&nbsp; &nbsp;ier = MorphMPI_Get_count( &amp;status, MorphMPI_INT, &amp;msglen ) ;<br><br><br>&nbsp; &nbsp;if( msglen != 1 ) printf( &quot;ERROR: The lengh of the message is not 1\n&quot; ) ;
<br><br>&nbsp; &nbsp;else printf( &quot;SUCCESS !\n&quot; ) ;<br><br>&nbsp;}<br><br><br>&nbsp;ier = MorphMPI_Finalize() ;<br><br>}<br><br><br><br>--<br>Mathieu Gontier<br>Core Development Engineer<br><br>Read the attached v-card for telephone, fax, adress
<br>Look at our web-site <a href="http://www.fft.be/" target="_blank">http://www.fft.be</a><br><br><br>_______________________________________________<br>Beowulf mailing list, <a href="mailto:Beowulf@beowulf.org">Beowulf@beowulf.org
</a><br>To change your subscription (digest mode or unsubscribe) visit <a href="http://www.beowulf.org/mailman/listinfo/beowulf" target="_blank">http://www.beowulf.org/mailman/listinfo/beowulf</a><br></blockquote></div><br>


!DSPAM:4755b351306111543480883!