From b6539cd02ea058a0291ecb1774478b6e92ad03d6 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 15 Oct 2021 14:42:21 +0200 Subject: [PATCH] ENH: additional MPI gather/scatter routines, globalIndex gather methods - UPstream::mpiGather (MPI_Gather) - used by Pstream::listGatherValues - UPstream::mpiScatter (MPI_Scatter) - used by Pstream::listScatterValues These are much simpler forms for gather/scatter of fixed-sized contiguous types data types (eg, primitives, simple pairs etc). In the gather form, creates a list of gathered values on the master process. The subranks have a list size of zero. Similarly, scatter will distribute a list of values to single values on each process. Instead of labelList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()] = sendData.size(); Pstream::gatherList(sendSizes); Can write const labelList sendSizes ( UPstream::listGatherValues