Pstream: optimisation of data exchange
Contributed by Mattijs Janssens. 1. Any non-blocking data exchange needs to know in advance the sizes to receive so it can size the buffer. For "halo" exchanges this is not a problem since the sizes are known in advance but or all other data exchanges these sizes need to be exchanged in advance. This was previously done by having all processors send the sizes of data to send to the master and send it back such that all processors - had the same information - all could work out who was sending what to where and hence what needed to be received. This is now changed such that we only send the size to the destination processor (instead of to all as previously). This means that - the list of sizes to send is now of size nProcs v.s. nProcs*nProcs before - we cut out the route to the master and back by using a native MPI call It causes a small change to the API of exchange and PstreamBuffers - they now return the sizes of the local buffers only (a labelList) and not the sizes of the buffers on all processors (labelListList) 2. Reversing the order of the way in which the sending is done when scattering information from the master processor to the other processors. This is done in a tree like fashion. Each processor has a set of processors to receive from/ send to. When receiving it will first receive from the processors with the least amount of sub-processors (i.e. the ones which return first). When sending it needs to do the opposite: start sending to the processor with the most amount of sub-tree since this is the critical path.
Showing
- applications/test/parallel/Test-parallel.C 6 additions, 7 deletionsapplications/test/parallel/Test-parallel.C
- applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C 7 additions, 10 deletions...nformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
- applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C 6 additions, 9 deletions...backgroundMeshDecomposition/backgroundMeshDecomposition.C
- src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C 4 additions, 2 deletionssrc/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C
- src/OpenFOAM/db/IOstreams/Pstreams/Pstream.H 28 additions, 7 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/Pstream.H
- src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C 6 additions, 20 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C
- src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H 2 additions, 2 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
- src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H 9 additions, 1 deletionsrc/OpenFOAM/db/IOstreams/Pstreams/UPstream.H
- src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C 3 additions, 3 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
- src/OpenFOAM/db/IOstreams/Pstreams/exchange.C 52 additions, 19 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/exchange.C
- src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C 4 additions, 2 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
- src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C 1 addition, 1 deletionsrc/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
- src/OpenFOAM/db/regIOobject/regIOobjectRead.C 3 additions, 2 deletionssrc/OpenFOAM/db/regIOobject/regIOobjectRead.C
- src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C 0 additions, 4 deletions...meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C
- src/Pstream/dummy/UPstream.C 12 additions, 1 deletionsrc/Pstream/dummy/UPstream.C
- src/Pstream/mpi/UPstream.C 48 additions, 0 deletionssrc/Pstream/mpi/UPstream.C
- src/lagrangian/basic/Cloud/Cloud.C 6 additions, 8 deletionssrc/lagrangian/basic/Cloud/Cloud.C
- src/lagrangian/basic/InteractionLists/InteractionLists.C 6 additions, 10 deletionssrc/lagrangian/basic/InteractionLists/InteractionLists.C
- src/meshTools/regionSplit/regionSplit.C 3 additions, 15 deletionssrc/meshTools/regionSplit/regionSplit.C
Please register or sign in to comment