Commit 22843821 authored by Lukas Werner's avatar Lukas Werner
Browse files

Gather intersections only on root

parent d96abb3d
Pipeline #7011 failed with stage
in 79 minutes and 2 seconds
......@@ -338,13 +338,14 @@ void Raytracer::rayTrace(const size_t timestep) {
for (auto& info: intersections) {
sendBuffer << info.imageX << info.imageY << info.bodySystemID << info.t;
}
int gatheredIntersectionCount = 0;
std::vector<real_t> fullImage(pixelsHorizontal_ * pixelsVertical_, inf);
mpi::RecvBuffer recvBuffer;
mpi::allGathervBuffer(sendBuffer, recvBuffer);
mpi::gathervBuffer(sendBuffer, recvBuffer, 0);
//mpi::allGathervBuffer(sendBuffer, recvBuffer);
WALBERLA_ROOT_SECTION() {
BodyIntersectionInfo info;
while (!recvBuffer.isEmpty()) {
recvBuffer >> info.imageX;
......@@ -360,6 +361,7 @@ void Raytracer::rayTrace(const size_t timestep) {
gatheredIntersectionCount++;
}
}
tp_["Reduction"].end();
......
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