Skip to content
Snippets Groups Projects
Commit 46092633 authored by mathias wagner's avatar mathias wagner
Browse files

add wait to solutions

parent bc6dc9bf
Branches
No related tags found
No related merge requests found
......@@ -147,6 +147,8 @@ int main(int argc, char **argv) {
}
}
#pragma acc wait
real globalerror = 0.0;
MPI_Allreduce(&error, &globalerror, 1, MPI_REAL_TYPE, MPI_MAX, MPI_COMM_WORLD);
error = globalerror;
......
......@@ -167,6 +167,7 @@ int main(int argc, char **argv) {
error = fmaxr(error, fabsr(Anew[iy * nx + ix] - A[iy * nx + ix]));
}
}
#pragma acc wait
real globalerror = 0.0;
MPI_Allreduce(&error, &globalerror, 1, MPI_REAL_TYPE, MPI_MAX, MPI_COMM_WORLD);
......
......@@ -147,6 +147,8 @@ int main(int argc, char **argv) {
}
}
#pragma acc wait
real globalerror = 0.0;
MPI_Allreduce(&error, &globalerror, 1, MPI_REAL_TYPE, MPI_MAX, MPI_COMM_WORLD);
error = globalerror;
......
......@@ -167,6 +167,7 @@ int main(int argc, char **argv) {
error = fmaxr(error, fabsr(Anew[iy * nx + ix] - A[iy * nx + ix]));
}
}
#pragma acc wait
real globalerror = 0.0;
MPI_Allreduce(&error, &globalerror, 1, MPI_REAL_TYPE, MPI_MAX, MPI_COMM_WORLD);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment