MPI használata: lamboot probléma?

Kezdőlap Fórumok Programozás MPI használata: lamboot probléma?

1 / 1 bejegyzés megtekintése
  • Szerző
    Bejegyzés
  • #1883491
    terjekid
    Felhasználó

      Sziasztok!

      Olyan problémával találkoztam, hogy az MPI-t szeretném használni: letöltöttem a doksikat, a programot, egyszóval mindent. El is kezdtem szépen a példák alapján megérteni mit is csainálna, de olyan probléma ütköztem, hogy mikor igazából kellene futtatnom a példaprogit, akkor nem igazán azt csinálja, amit a példánál megadtak. Az MPI kósom:

      Code:
      #include
      #include

      int main(int argc, char *argv[]) {
      int rank, size;

      MPI_Init(&argc, &argv);
      MPI_Comm_rank(MPI_COMM_WORLD, &rank);
      MPI_Comm_size(MPI_COMM_WORLD, &size);

      printf(”  I am %d of %dn”, rank, size);

      MPI_Finalize();
      return 0;
      }

      a futtatás így történik:

      Code:
      #lamboot hostfile
      #mpirun -np 3 ./hello

      a host file tartalma csak ennyi: localhost cpu=3

      erre a kimenetem:

      Code:
        I am 0 of 1
        I am 0 of 1
      —————————————————————————–
      It seems that [at least] one of the processes that was started with
      mpirun did not invoke MPI_INIT before quitting (it is possible that
      more than one process did not invoke MPI_INIT — mpirun was only
      notified of the first one, which was on node n0).

      mpirun can *only* be used with MPI programs (i.e., programs that
      invoke MPI_INIT and MPI_FINALIZE).  You can use the „lamexec” program
      to run non-MPI programs over the lambooted nodes.
      —————————————————————————–

      Tud valaki segíteni, hogy mi lehet a baj? Elõre is köszi mindenkinek!

    1 / 1 bejegyzés megtekintése
    • Be kell jelentkezni a hozzászóláshoz.