Commit d5222444 authored by martin.hecker's avatar martin.hecker
Browse files

fix mpiExamples

parent 0caf17bb
makefile
sources.mk
objects.mk
**/Debug/*
......@@ -3,6 +3,6 @@
int main(int argc, char *argv[])
{
//return pi(argc, argv);
return sendreceive(argc, argv);
return pi(argc, argv);
//return sendreceive(argc, argv);
}
......@@ -11,9 +11,10 @@ int sendreceive(int argc, char *argv[]) {
if (myRank == 0) {
strcpy(msg, "Hello student!");
MPI_Send(msg, strlen(msg)+1, MPI_CHAR, 1, tag, MPI_COMM_WORLD);
} else {
} else if (myRank == 1) {
MPI_Recv(msg, 20, MPI_CHAR, 0, tag, MPI_COMM_WORLD, &status);
printf("received \"%s\"\n", msg);
} else {
}
MPI_Finalize();
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment