Changes between Version 10 and Version 11 of AstroBearAmr


Ignore:
Timestamp:
05/23/11 14:09:53 (14 years ago)
Author:
Brandon Shroyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • AstroBearAmr

    v10 v11  
    324324 * {{{InheritNeighborsNewChildren(n)}}}
    325325
    326 [[[BR]]]
     326[[BR]]
    327327== Communication ==
    328 == Data ==
    329 There are essentially four basic data routines that involve sharing of data between grids
    330  * !ProlongateParentsData - Parent to Child (Inter-Level)
    331  * !ApplyChildrenData - Child to Parent (Inter-Level)
    332  * !ApplyOverlaps - Old Grids to Current Grids (Intra-Level)
    333  * !SyncFluxes - Current Grids to Current Grids (Intra-Level)
    334 For parallel applications this requires some degree of communication.  In order to overlap computation with communication, it is good to post the sends as soon as the data is available - and to do as much computation as possible until having to wait for the receives to complete.  When the sends are checked for completion and when the receives are first posted is somewhat arbitrary.  It is reasonable to post the receivites before you expect the sends to post and to complete the sends sometime after you expect the receives to have finished.
    335 
    336 For each operation there is likely to be a degree of local sharing between grids.  The basic approach therefore is to post the receives followed by the sends.  Then perform the local sharing before waiting on the receives to complete, and then the sends.  Sometimes the posting of the receives is shifted earlier, and the completion of the sends is put off until later.  For example the parallel version of !ApplyOverlaps is
     328
     329Communication in AstroBEAR comes in two varieties: ''data'' communication, which is concerned with passing actual grid data between processors, and ''tree'' communication, which passes AMR tree data.
     330
     331[[BR]]
     332=== Data Communication ===
     333There are four basic data routines that involve sharing of data between grids:
     334 * {{{ProlongateParentsData()}}} -- Parents to children (Inter-Level)
     335 * {{{ApplyChildrenData()}}} -- Children to parents (Inter-Level)
     336 * {{{ApplyOverlaps()}}} -- Old Grids to current grids (Intra-Level)
     337 * {{{SyncFluxes()}}} -- Current Grids to current grids (Intra-Level)
     338
     339This description of communication is from a data domain perspective, though, and does not take interprocess communications into account.  In a parallel application, the routines above will pass data to other processors as well as moving it between local grids.
     340
     341AstroBEAR's point-to-point communications are all non-blocking.  Once it knows the data requirements, the code uses {{{Post}}} routines set up a level's transmissions, and later on it uses {{{Comp}}} routines to block until the required transmissions are done (see the example below).  To ensure the best possible performance, we want to post the data sends as soon as the data is available and wait until we absolutely need the data before completing the receives.  This keeps the processors busy crunching numbers and swapping data between local grids while they wait for data to arrive.  Completion of sends and posting of receives is a less precise art, but in general early posts and delayed receives lead to better performance.
    337342
    338343{{{
     
    345350  CALL CompSendOverlaps
    346351}}}
    347 
    348 == Tree ==
    349  In a similar manner there are five tree operations that require some communication between nodes
    350  * !CreateChildren
    351  * !InheritNeighborsChildren
    352  * !InheritOldNodeOverlapsChildren
    353  * !InheritNewNodeOverlapsChildren
    354  * !InheritOverlapsOldChildren
    355  * !InheritOverlapsNewChildren
     352[[BR]]
     353=== Tree Communication ===
     354
     355There are five tree operations that require some communication between processors:
     356 * {{{CreateChildren()}}}
     357 * {{{InheritNeighborsChildren()}}}
     358 * {{{InheritOldNodeOverlapsChildren()}}}
     359 * {{{InheritNewNodeOverlapsChildren()}}}
     360 * {{{InheritOverlapsOldChildren()}}}
     361 * {{{InheritOverlapsNewChildren()}}}
     362
    356363As in the case with data operations, each of these requires four communication calls in order to overlap the computation with communication.  In all of these cases, it is node's children that are being communicated - since this is the only tree data that is created locally.
    357364