Figure: Simulated Atmospheric Gravity Waves.
|
Figure: Gravity waves visible through clouds over British Columbia. Original photo found here. No author listed.
|
Parallelization was achieved by dividing the physical domain into sections and then assigning each one to a processor, effectively creating smaller versions of the original problem across multiple processors.
As parts 1 and 2 of the figure to the right illustrate, if there are four processors, the domain is split into four pieces along the horizontal. Each processor receives a piece, and adds new boundary domains. The original problem had one processor integrating over a 40ΔY by 14ΔX interior domain. The parallelized problem has four processors, each integrating over a 10ΔY by 14ΔX interior domain. If the original interior domain required 8 milliseconds to integrate, the parallelized domain will require something closer to 2 ms. Parallelization always comes with some computational overhead from communications between processors. The scheme applied in this project also comes with computational fees in the form of additional boundary domains. Noted above, the boundary domain is used to assure that laws of physics are followed within the interior domain. The boundary domains are of particular importance in the parallelization arrangement. The ghost cells along the vertical boundaries are used to communicate physical quantities between processors. This is summarized in the next section. |
Figure: Example of domain parallelization. The interior domain is divided into equally-sized sections, and then each processor takes a section.
|
Pseudocode of boundary sharing programming
|
temp_ID = my_processor_ID
do iteration = 1,2 if temp_ID is even send right edge info to (my_processor_ID+1) send left edge info to (my_processor_ID-1) else receive left edge info from (my_processor_ID-1) receive right edge info from (my_processor_ID+1) endif temp_ID = tempID+1 enddo |