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) {
// Left border
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);
}
// Right border
if( rank < tasks - 1 ) {
MPI_Sendrecv(&y[state][steps], 1, MPI_DOUBLE, next, 0,
&y[state][steps + 1], 1, MPI_DOUBLE, next, MPI_ANY_TAG,
MPI_Sendrecv(y[state] + steps, 1, MPI_DOUBLE, next, 0,
y[state] + steps + 1, 1, MPI_DOUBLE, next, MPI_ANY_TAG,
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