Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3106 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  installation MPI ( pour C++)

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

installation MPI ( pour C++)

n°2042184
nastymushr​oom2
Posté le 14-12-2010 à 22:56:57  profilanswer
 

Bonjour,  
 
Je m'aprête a me lancer dans la programmation parallèle et ca commence mal.
J'ai installé MPI sur mon ordi ( Fedora 9 ) et me voila avec un probleme que je n'arrive pas a googliser ...
Voila le test classique pour l'installation de mpi :
 

Code :
  1. #include "mpi.h"
  2. int main(int argc,char** argv)
  3. {
  4.   int myid,nprocs;
  5.   MPI_Init(&argc,&argv);
  6.   MPI_Comm_rank(MPI_COMM_WORLD,&myid);
  7.   MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
  8.   printf("Hello from CPU %d of %d\n",1+myid,nprocs);
  9.   MPI_Finalize();
  10.   return 0;
  11. }


 
je compile avec mpic++, je lance avec mpirun -np 3 et j'obtiens :
Hello from CPU 1 of 1
Hello from CPU 1 of 1
Hello from CPU 1 of 1

 
Je ne comprends pas et je ne sais pas quelle question me poser ....
 
Merci d'avance !!

mood
Publicité
Posté le 14-12-2010 à 22:56:57  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  installation MPI ( pour C++)

 

Sujets relatifs
[Shell/Batch] Installation de programme en chaîne[C]Récupérer un espace avec fgets
Temporisation en C++cours en langage C/C++ et javascript
[C++] ShellExecuteEx + Wow64DisableWow64FsRedirectionbioskey() sous Dev C++
Structure + Tableau dynamique en langage C[Algo C] Question sur calcul b parité
[C sur µprocesseur] Calcul de bit de paritéDébutant, problème master mind en C.
Plus de sujets relatifs à : installation MPI ( pour C++)


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR