-
- Downloads
ENH: new broadcast version of Pstreams (#2371)
- The idea of broadcast streams is to replace multiple master to subProcs communications with a single MPI_Bcast. if (Pstream::master()) { OPBstream toAll(Pstream::masterNo()); toAll << data; } else { IPBstream fromMaster(Pstream::masterNo()); fromMaster >> data; } // vs. if (Pstream::master()) { for (const int proci : Pstream::subProcs()) { OPstream os(Pstream::commsTypes::scheduled, proci); os << data; } } else { IPstream is(Pstream::commsTypes::scheduled, Pstream::masterNo()); is >> data; } Can simply use UPstream::broadcast() directly for contiguous data with known lengths. Based on ideas from T.Aoyagi(RIST), A.Azami(RIST)
Showing
- applications/test/parallel-broadcast/Make/files 3 additions, 0 deletionsapplications/test/parallel-broadcast/Make/files
- applications/test/parallel-broadcast/Make/options 2 additions, 0 deletionsapplications/test/parallel-broadcast/Make/options
- applications/test/parallel-broadcast/Test-parallel-broadcast.C 147 additions, 0 deletions...cations/test/parallel-broadcast/Test-parallel-broadcast.C
- src/OpenFOAM/Make/files 2 additions, 0 deletionssrc/OpenFOAM/Make/files
- src/OpenFOAM/db/IOstreams/Pstreams/IPBstreams.C 107 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/IPBstreams.C
- src/OpenFOAM/db/IOstreams/Pstreams/IPstream.H 46 additions, 4 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/IPstream.H
- src/OpenFOAM/db/IOstreams/Pstreams/OPBstreams.C 109 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/OPBstreams.C
- src/OpenFOAM/db/IOstreams/Pstreams/OPstream.H 41 additions, 4 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/OPstream.H
- src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H 62 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H
- src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.H 63 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/UOPstream.H
- src/Pstream/dummy/Make/files 2 additions, 0 deletionssrc/Pstream/dummy/Make/files
- src/Pstream/dummy/UIPBstreamRead.C 55 additions, 0 deletionssrc/Pstream/dummy/UIPBstreamRead.C
- src/Pstream/dummy/UOPBstreamWrite.C 56 additions, 0 deletionssrc/Pstream/dummy/UOPBstreamWrite.C
- src/Pstream/mpi/Make/files 2 additions, 0 deletionssrc/Pstream/mpi/Make/files
- src/Pstream/mpi/UIPBstreamRead.C 140 additions, 0 deletionssrc/Pstream/mpi/UIPBstreamRead.C
- src/Pstream/mpi/UOPBstreamWrite.C 119 additions, 0 deletionssrc/Pstream/mpi/UOPBstreamWrite.C
Loading
Please register or sign in to comment