Skip to content
Snippets Groups Projects
  • Mark OLESEN's avatar
    173c9ac1
    ENH: reduce storage and startup communication for processorTopology · 173c9ac1
    Mark OLESEN authored
    - previously built the entire adjacency table (full communication!)
      but this is only strictly needed when using 'scheduled' as the
      default communication mode. For blocking/nonBlocking modes this
      information is not necessary at that point.
    
      The processorTopology::New now generally creates a smaller amount of
      data at startup: the processor->patch mapping and the patchSchedule.
    
      If the default communication mode is 'scheduled', the behaviour is
      almost identical to previously.
    
    - Use Map<label> for the processor->patch mapping for a smaller memory
      footprint on large (ie, sparsely connected) cases. It also
      simplifies coding and allows recovery of the list of procNeighbours
      on demand.
    
    - Setup the processor initEvaluate/evaluate states with fewer loops
      over the patches.
    
    ========
    BREAKING: procNeighbours() method changed definition
    
    - this was previously the entire adjacency table, but is now only the
      processor-local neighbours. Now use procAdjacency() to create or
      recover the entire adjacency table.
    
      The only known use is within Cloud<ParticleType>::move and there it
      was only used to obtain processor-local information.
    
      Old:
          const labelList& neighbourProcs =
              mesh.globalData().topology().procNeighbours()[Pstream::myProcNo()];
    
      New:
          const labelList& neighbourProcs =
              mesh.globalData().topology().procNeighbours();
    
          // If needed, the old definition (with communication!)
          const labelListList& connectivity =
              mesh.globalData().topology().procAdjacency();
    173c9ac1
    History
    ENH: reduce storage and startup communication for processorTopology
    Mark OLESEN authored
    - previously built the entire adjacency table (full communication!)
      but this is only strictly needed when using 'scheduled' as the
      default communication mode. For blocking/nonBlocking modes this
      information is not necessary at that point.
    
      The processorTopology::New now generally creates a smaller amount of
      data at startup: the processor->patch mapping and the patchSchedule.
    
      If the default communication mode is 'scheduled', the behaviour is
      almost identical to previously.
    
    - Use Map<label> for the processor->patch mapping for a smaller memory
      footprint on large (ie, sparsely connected) cases. It also
      simplifies coding and allows recovery of the list of procNeighbours
      on demand.
    
    - Setup the processor initEvaluate/evaluate states with fewer loops
      over the patches.
    
    ========
    BREAKING: procNeighbours() method changed definition
    
    - this was previously the entire adjacency table, but is now only the
      processor-local neighbours. Now use procAdjacency() to create or
      recover the entire adjacency table.
    
      The only known use is within Cloud<ParticleType>::move and there it
      was only used to obtain processor-local information.
    
      Old:
          const labelList& neighbourProcs =
              mesh.globalData().topology().procNeighbours()[Pstream::myProcNo()];
    
      New:
          const labelList& neighbourProcs =
              mesh.globalData().topology().procNeighbours();
    
          // If needed, the old definition (with communication!)
          const labelListList& connectivity =
              mesh.globalData().topology().procAdjacency();