Commit 09b18960 authored by Taddeüs Kroes's avatar Taddeüs Kroes

ModSim ass4 taddeus: Merged conflicts.

parent b0861105
...@@ -19,14 +19,14 @@ void interact(int state) { ...@@ -19,14 +19,14 @@ void interact(int state) {
// Left border // Left border
if( rank ) { if( rank ) {
MPI_Sendrecv(&y[state][1], 1, MPI_DOUBLE, prev, 0, &y[state][0], 1, MPI_Sendrecv(y[state] + 1, 1, MPI_DOUBLE, prev, 0, y[state], 1,
MPI_DOUBLE, prev, MPI_ANY_TAG, MPI_COMM_WORLD, &status); MPI_DOUBLE, prev, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
} }
// Right border // Right border
if( rank < tasks - 1 ) { if( rank < tasks - 1 ) {
MPI_Sendrecv(&y[state][steps], 1, MPI_DOUBLE, next, 0, MPI_Sendrecv(y[state] + steps, 1, MPI_DOUBLE, next, 0,
&y[state][steps + 1], 1, MPI_DOUBLE, next, MPI_ANY_TAG, y[state] + steps + 1, 1, MPI_DOUBLE, next, MPI_ANY_TAG,
MPI_COMM_WORLD, &status); MPI_COMM_WORLD, &status);
} }
} }
......
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