Programme avec les librairie MPI en languag C
angelique1
Messages postés
81
Date d'inscription
Statut
Membre
Dernière intervention
-
Char Snipeur Messages postés 9813 Date d'inscription Statut Contributeur Dernière intervention -
Char Snipeur Messages postés 9813 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Bonjour,
svp mon programe na aucune erreur mais quand je l'execute
j'ai une erreur de genrerank:
node: exit code: message:
0: localhost: -101: Fatal error in MPI_Bcast: Invalid root, error stack:
MPI_Bcast(791): MPI_Bcast(buf=0x0012FAB4, count=1, MPI_INT, root=2, MPI_COMM_WOR
LD) failed
MPI_Bcast(732): Invalid root (value given was 2)
mon prgm est
#include<mpi.h>
#include<stdio.h>
int main(int argc,char *argv[])
{int rang,valeur,p;
MPI_Init (& argc,& argv) ;
MPI_Comm_size(MPI_COMM_WORLD,& p);
MPI_Comm_rank(MPI_COMM_WORLD,& rang);
if (rang ==2) valeur= rang+1000;
MPI_Bcast(&valeur,1,MPI_INT,2,MPI_COMM_WORLD);
printf("processus %d, j'ai recu %d du processus 2 \n",rang,valeur);
MPI_Finalize();return (0);
}
Bonjour,
svp mon programe na aucune erreur mais quand je l'execute
j'ai une erreur de genrerank:
node: exit code: message:
0: localhost: -101: Fatal error in MPI_Bcast: Invalid root, error stack:
MPI_Bcast(791): MPI_Bcast(buf=0x0012FAB4, count=1, MPI_INT, root=2, MPI_COMM_WOR
LD) failed
MPI_Bcast(732): Invalid root (value given was 2)
mon prgm est
#include<mpi.h>
#include<stdio.h>
int main(int argc,char *argv[])
{int rang,valeur,p;
MPI_Init (& argc,& argv) ;
MPI_Comm_size(MPI_COMM_WORLD,& p);
MPI_Comm_rank(MPI_COMM_WORLD,& rang);
if (rang ==2) valeur= rang+1000;
MPI_Bcast(&valeur,1,MPI_INT,2,MPI_COMM_WORLD);
printf("processus %d, j'ai recu %d du processus 2 \n",rang,valeur);
MPI_Finalize();return (0);
}
A voir également:
- Programme avec les librairie MPI en languag C
- Programme demarrage windows - Guide
- Mettre en veille un programme - Guide
- Message programmé iphone - Guide
- Programme word gratuit - Guide
- Cette action ne peut pas être réalisée car le fichier est ouvert dans un autre programme - Guide
1 réponse
je ne comprends pas ce que tu veux faire.
regarde là : http://pwet.fr/man/linux/fonctions_bibliotheques/mpi_bcast/
il y a ça :
regarde là : http://pwet.fr/man/linux/fonctions_bibliotheques/mpi_bcast/
il y a ça :
MPI_ERR_ROOT - Invalid root. The root must be specified as a rank in the communicator. Ranks must be between zero and the size of the communicator minus one.peut être que 2 est trop grand.