Sorry, ich bin mir sicher, einen dummen Fehler gemacht, aber nicht geklappt.Falsche MPI-Anzahl der Prozessoren
ich die Erstellung einer einfachen mpi Hallo Welt:
#include <stdio.h>
#include <mpi.h>
int main (argc, argv)
int argc;
char *argv[];
{
int rank, size;
MPI_Init (&argc, &argv); /* starts MPI */
MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get current process id */
MPI_Comm_size (MPI_COMM_WORLD, &size); /* get number of processes */
printf("Hello world from process %d of %d\n", rank, size);
MPI_Finalize();
return 0;
}
Und:
> mpicc -o hello_world_c hello_world.c
> mpirun -np 4 hello_world_c
Aber kehrt:
Hello world from process 0 of 1
Hello world from process 0 of 1
Hello world from process 0 of 1
Hello world from process 0 of 1
Aber mein Computer ist ein Core i7 mit 4 Kernen . Und alles scheint in Ordnung zu sein, dh. cat/proc/cpuinfo zeigt die 4 Prozessoren
was passiert ??? Vielen Dank im Voraus !!!!
Sieht es nicht ein Problem mit dem MPI-Code. Welche MPI-Bibliothek hast du installiert? Wie hast du es installiert? –
mögliches Duplikat von [MPI \ _Rank gibt dieselbe Prozessnummer für alle Prozesse zurück] (http://stackoverflow.com/questions/20287564/mpi-rank-return-same-process-number-for-all-process) –