<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>This thread is not about MPICH development. Please post to the discuss list.</div><div><br></div><div>And use an appropriate email subject in the future. It will endear you to the experts to use good email etiquette. </div><div><br></div><div>Thanks,</div><div><br></div><div>Jeff<br><br>Sent from my iPhone</div><div><br>On May 21, 2014, at 6:07 AM, Chafik sanaa <<a href="mailto:san.chafik@gmail.com">san.chafik@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">what do you mean by invalid rank ? this is my program :<br><br>#include "mpi.h"<br>#include <stdlib.h><br>#include <stdio.h><br>int main(int argc, char *argv[]) {<br> int rang,iter,iter2;<br>
int nb_tests=9;<br> int nb_valeurs[9];<br> int nb_valeurs_max=7000000;<br> int etiquette=99;<br> double *valeurs;<br> MPI_Status statut;<br> double temps_debut,temps_fin;<br><br> MPI_Init( &argc, &argv);<br>
<br> nb_valeurs[0]=0,nb_valeurs[1]=1,nb_valeurs[2]=10,nb_valeurs[3]=100;<br> nb_valeurs[4]=1000,nb_valeurs[5]=10000,nb_valeurs[6]=100000;<br> nb_valeurs[7]=1000000,nb_valeurs[8]=7000000;<br><br> MPI_Comm_rank( MPI_COMM_WORLD, &rang);<br>
<br> valeurs = (double *) malloc(nb_valeurs_max*sizeof(double));<br><br> for(iter=0; iter<nb_tests; iter++) {<br> if (rang == 0) {<br> for (iter2 = 0; iter2<nb_valeurs[iter]; iter2++)<br> valeurs[iter2] = rand() / (RAND_MAX + 1.);<br>
temps_debut=MPI_Wtime();<br> MPI_Send(valeurs,nb_valeurs[iter],MPI_DOUBLE,1,etiquette,MPI_COMM_WORLD);<br> MPI_Recv(valeurs,nb_valeurs[iter],MPI_DOUBLE,1,etiquette,<br> MPI_COMM_WORLD,&statut);<br>
temps_fin=MPI_Wtime();<br> if (nb_valeurs[iter] != 0) {<br> printf("Moi, processus 0, j'ai envoye et recu %8d valeurs"<br> "(derniere = %4.2f) du processus 1 en %8.6f secondes, soit "<br>
"avec un debit de %7.2f Mo/s.\n",<br> nb_valeurs[iter], valeurs[nb_valeurs[iter]-1],<br> temps_fin-temps_debut,<br> 2.*nb_valeurs[iter]*8/1000000./(temps_fin-temps_debut));<br>
} else<br> printf("Moi, processus 0, j'ai envoye et recu %8d valeurs en %8.6f "<br> "secondes, soit avec un debit de %7.2f Mo/s.\n",<br> nb_valeurs[iter], temps_fin-temps_debut,<br>
2.*nb_valeurs[iter]*8/1000000./(temps_fin-temps_debut));<br> } else if(rang == 1) {<br> MPI_Recv(valeurs,nb_valeurs[iter],MPI_DOUBLE,0,etiquette,<br> MPI_COMM_WORLD,&statut);<br> MPI_Send(valeurs,nb_valeurs[iter],MPI_DOUBLE,0,etiquette,MPI_COMM_WORLD);<br>
}<br> }<br><br> MPI_Finalize();<br> return 0;<br>}<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-21 15:03 GMT+02:00 Rob Latham <span dir="ltr"><<a href="mailto:robl@mcs.anl.gov" target="_blank">robl@mcs.anl.gov</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
On 05/21/2014 04:28 AM, Chafik sanaa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I use the Microsoft HPC Pack 2008 R2 in the visual studio 2010 , when i<br>
execute my program i have this error :<br>
fatal error in pmpi_send invalid rank error stack PMPI_Send(150):<br>
MPI_send(buf=...<br>
What is the problem?<br>
</blockquote>
<br></div></div>
uh, you passed an invalid rank to MPI_Send.<br>
<br>
==rob<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
thank you<br>
<br>
<br>
______________________________<u></u>_________________<br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/devel" target="_blank">https://lists.mpich.org/<u></u>mailman/listinfo/devel</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Rob Latham<br>
Mathematics and Computer Science Division<br>
Argonne National Lab, IL USA<br>
______________________________<u></u>_________________<br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/devel" target="_blank">https://lists.mpich.org/<u></u>mailman/listinfo/devel</a><br>
</font></span></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>To manage subscription options or unsubscribe:</span><br><span><a href="https://lists.mpich.org/mailman/listinfo/devel">https://lists.mpich.org/mailman/listinfo/devel</a></span></div></blockquote></body></html>