Number of global MPI reduce ops in P2Function::dot()?
Hi,
taking a look at the P2Function::dot()
I see that there are two invocations of walberla::mpi::allReduceInplace()
, one each by
- VertexDoFFunction< ValueType >::dot()
- EdgeDoFFunction< ValueType >::dot()
Having no insight into walberla I can of course not be sure, but if this leads to two MPI reduce operations being performed, we should probably, w.r.t. 3D and HPC, avoid this.
My suggestions would be to add another optional parameter to ***DoFFunction::dot() that turns the call to walberla::mpi::allReduceInplace() on or off. Then we could perform the reduce inside P2Function::dot(), same as with P2Function::getMaxMagnitude(), see [d7a2cc47].
Opinion?
Cheers
Marcus