- //receive name - string
- int length;
- MPI_Recv(&length, 1, MPI_INT, sender, 2001, MPI_COMM_WORLD, &status);
-
- char buf[length];
- MPI_Recv(&buf, length, MPI_CHAR, sender, 2001, MPI_COMM_WORLD, &status);
- name = buf;
-
- //receive aligned - string
- MPI_Recv(&length, 1, MPI_INT, sender, 2001, MPI_COMM_WORLD, &status);
-
- char buf2[length];
- MPI_Recv(&buf2, length, MPI_CHAR, sender, 2001, MPI_COMM_WORLD, &status);
- aligned = buf2;
-
- setAligned(aligned);
-
- return 0;
-
- }
- catch(exception& e) {
- m->errorOut(e, "Sequence", "MPIRecv");
- exit(1);
- }