Thanks Joseph! I think that's a nifty trick! :-)
On Thu, Feb 17, 2022 at 4:57 PM Joseph Schuchart via users <
users@lists.open-mpi.org> wrote:
> Hi Niranda,
>
> A pattern I have seen in several places is to allreduce the pair p =
> {-x,x} with MPI_MIN or MPI_MAX. If in the resulting pair p[0] ==
Hi Niranda,
A pattern I have seen in several places is to allreduce the pair p =
{-x,x} with MPI_MIN or MPI_MAX. If in the resulting pair p[0] == -p[1],
then everyone has the same value. If not, at least one rank had a
different value. Example:
```
bool is_same(int x) {
int p[2];
p[0] =