[mpich-discuss] [mpich-devel] (no subject)
Wesley Bland
wbland at mcs.anl.gov
Wed May 21 08:22:51 CDT 2014
First, this question is now being posted to discuss at mpich.org since it's a
question about how to use MPICH, not about developing MPICH.
Second, don't drop the mailing list from the CC. doing so will not help in
getting answers.
Third, how are you launching your program? It's probably something like
this:
mpiexec -n 2 ./my_program
On Wed, May 21, 2014 at 8:20 AM, Chafik sanaa <san.chafik at gmail.com> wrote:
> when i execute my program in MS DOS whith file.exe , i have the error
> :fatal error in pmpi_send invalid rank error stack PMPI_Send(150):
> MPI_send(buf=...
> but when i execute my program whith mpiexec -n 3 file.exe , i have this
> error :aborting : failed to launch 'file.exe' on CHAFIK-PC
> Error (2) le fichier specifie est introuvable
>
>
>
> 2014-05-21 15:13 GMT+02:00 Wesley Bland <wbland at anl.gov>:
>
> How are you launching your program? A first glance at the code looks
>> fine. You're probably not using mpiexec correctly.
>>
>>
>> On Wed, May 21, 2014 at 8:07 AM, Chafik sanaa <san.chafik at gmail.com>wrote:
>>
>>> what do you mean by invalid rank ? this is my program :
>>>
>>> #include "mpi.h"
>>> #include <stdlib.h>
>>> #include <stdio.h>
>>> int main(int argc, char *argv[]) {
>>> int rang,iter,iter2;
>>> int nb_tests=9;
>>> int nb_valeurs[9];
>>> int nb_valeurs_max=7000000;
>>> int etiquette=99;
>>> double *valeurs;
>>> MPI_Status statut;
>>> double temps_debut,temps_fin;
>>>
>>> MPI_Init( &argc, &argv);
>>>
>>> nb_valeurs[0]=0,nb_valeurs[1]=1,nb_valeurs[2]=10,nb_valeurs[3]=100;
>>> nb_valeurs[4]=1000,nb_valeurs[5]=10000,nb_valeurs[6]=100000;
>>> nb_valeurs[7]=1000000,nb_valeurs[8]=7000000;
>>>
>>> MPI_Comm_rank( MPI_COMM_WORLD, &rang);
>>>
>>> valeurs = (double *) malloc(nb_valeurs_max*sizeof(double));
>>>
>>> for(iter=0; iter<nb_tests; iter++) {
>>> if (rang == 0) {
>>> for (iter2 = 0; iter2<nb_valeurs[iter]; iter2++)
>>> valeurs[iter2] = rand() / (RAND_MAX + 1.);
>>> temps_debut=MPI_Wtime();
>>>
>>> MPI_Send(valeurs,nb_valeurs[iter],MPI_DOUBLE,1,etiquette,MPI_COMM_WORLD);
>>> MPI_Recv(valeurs,nb_valeurs[iter],MPI_DOUBLE,1,etiquette,
>>> MPI_COMM_WORLD,&statut);
>>> temps_fin=MPI_Wtime();
>>> if (nb_valeurs[iter] != 0) {
>>> printf("Moi, processus 0, j'ai envoye et recu %8d valeurs"
>>> "(derniere = %4.2f) du processus 1 en %8.6f secondes, soit "
>>> "avec un debit de %7.2f Mo/s.\n",
>>> nb_valeurs[iter], valeurs[nb_valeurs[iter]-1],
>>> temps_fin-temps_debut,
>>> 2.*nb_valeurs[iter]*8/1000000./(temps_fin-temps_debut));
>>> } else
>>> printf("Moi, processus 0, j'ai envoye et recu %8d valeurs en %8.6f "
>>> "secondes, soit avec un debit de %7.2f Mo/s.\n",
>>> nb_valeurs[iter], temps_fin-temps_debut,
>>> 2.*nb_valeurs[iter]*8/1000000./(temps_fin-temps_debut));
>>> } else if(rang == 1) {
>>> MPI_Recv(valeurs,nb_valeurs[iter],MPI_DOUBLE,0,etiquette,
>>> MPI_COMM_WORLD,&statut);
>>>
>>> MPI_Send(valeurs,nb_valeurs[iter],MPI_DOUBLE,0,etiquette,MPI_COMM_WORLD);
>>> }
>>> }
>>>
>>> MPI_Finalize();
>>> return 0;
>>> }
>>>
>>>
>>>
>>> 2014-05-21 15:03 GMT+02:00 Rob Latham <robl at mcs.anl.gov>:
>>>
>>>
>>>>
>>>> On 05/21/2014 04:28 AM, Chafik sanaa wrote:
>>>>
>>>>> Hi,
>>>>> I use the Microsoft HPC Pack 2008 R2 in the visual studio 2010 , when
>>>>> i
>>>>> execute my program i have this error :
>>>>> fatal error in pmpi_send invalid rank error stack PMPI_Send(150):
>>>>> MPI_send(buf=...
>>>>> What is the problem?
>>>>>
>>>>
>>>> uh, you passed an invalid rank to MPI_Send.
>>>>
>>>> ==rob
>>>>
>>>> thank you
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> To manage subscription options or unsubscribe:
>>>>> https://lists.mpich.org/mailman/listinfo/devel
>>>>>
>>>>>
>>>> --
>>>> Rob Latham
>>>> Mathematics and Computer Science Division
>>>> Argonne National Lab, IL USA
>>>> _______________________________________________
>>>> To manage subscription options or unsubscribe:
>>>> https://lists.mpich.org/mailman/listinfo/devel
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140521/c4dcd9b5/attachment.html>
More information about the discuss
mailing list