<div>Mathieu,</div>
<div>I didn't spot why you included <mpi.h>? 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 <<a href="mailto:mg.mailing-list@laposte.net">mg.mailing-list@laposte.net</a>> 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  linked statically with my parallel application,<br>everything is ok; but when MorphMPI is  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're welcome ;-) )<br><br>Thank you for your support,<br>Mathieu.<br><br>PS: my problem happens in the the following example,<br><br>
#  include<morphmpi.h><br><br>#  include <mpi.h><br><br>#include<stdio.h><br><br><br>int main( int argc, char* argv[] )<br><br>{<br><br> int np, me, ier, flag=0, msglen=-1 ;<br><br> MorphMPI_Request request ;
<br><br> MorphMPI_Status status ;<br><br> int buf[1] ; buf[0]=-1 ;<br><br><br> ier = MorphMPI_Init( &argc, &argv ) ;<br><br> ier = MorphMPI_Comm_size( MorphMPI_COMM_WORLD, &np ) ;<br><br> ier = MorphMPI_Comm_rank( MorphMPI_COMM_WORLD, &me ) ;
<br><br><br> if( me > 1 ) printf( "I am the useless processor #%d on %d\n", me, np ) ;<br><br> else printf( "I am the working processor #%d on %d\n", me, np ) ;<br><br><br> ier = MorphMPI_Barrier( MorphMPI_COMM_WORLD ) ;
<br><br><br>printf( "<<< %d >>>\n", &status ) ;<br><br><br> if( ! me ) {<br><br>   buf[0] = 69 ;<br><br>   ier = MorphMPI_Isend( buf, 1, MorphMPI_INT, 1,1, MorphMPI_COMM_WORLD, &request ) ;
<br><br>   ier = MorphMPI_Wait( &request, &status ) ;<br><br> }<br><br><br> ier = MorphMPI_Barrier( MorphMPI_COMM_WORLD ) ;<br><br><br> if( me == 1 ) {<br><br>   ier = MorphMPI_Irecv( buf, 1, MorphMPI_INT, 0, 1, MorphMPI_COMM_WORLD, &request ) ;
<br><br>   ier = MorphMPI_Wait( &request, &status ) ;<br><br>   ier = MorphMPI_Get_count( &status, MorphMPI_INT, &msglen ) ;<br><br><br>   if( msglen != 1 ) printf( "ERROR: The lengh of the message is not 1\n" ) ;
<br><br>   else printf( "SUCCESS !\n" ) ;<br><br> }<br><br><br> 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>