358
11. Efficiency and Accuracy Improvement
working on neighbor sub-domains takes place twice per iteration - after each
set of data is updated. This local communication can be overlapped with
computation of the new values. This solver is suitable only when used in
conjunction with a multigrid method, as it is rather inefficient.
Fig. 11.11. Parallel processing in
the backward loop (right); shaded
the
are
SIP solver in the forward loops (left) and in
regions of uneven load
ILU-type methods ( e g the SIP-method presented in Sect. 5.3.4) are recursive, making parallelization less straightforward. In the SIP-algorithm, the
elements of the L and U matrices, Eqs. (5.41), depend on the elements at
the W and S nodes. One cannot start the calculation of the coefficients on
a sub-domain, other than the one in the southwest corner, before data are
obtained from its neighbors. In 2D, the best strategy is to subdivide the domain into vertical stripes i.e., use a 1D processor topology. Computation of L
and U matrices and iteration can then be performed fairly efficiently in parallel (see Bastian and Horton, 1989). The processor for sub-domain 1 needs
no data from other processors and can start immediately; it proceeds along
its bottom or southernmost line. After it has calculated the elements for the
rightmost node, it can pass those values to the processor for sub-domain 2.
While the first processor starts calculation on its next line, the second one
can compute on its bottom line. All n processors are busy when the first one
has reaches the n-th line from bottom. When the first processor reaches the
top boundary, it has to wait until the last processor, which is n lines behind,
is finished; see Fig. 11.11. In the iteration scheme, two passes are needed. The
first is done in the manner just described while the second is essentially its
mirror image.
The algorithm is as follows:
f o r j = 2 t o N j - 1 do:
r e c e i v e UE(is - 1, j ) , UN(is - 1, j ) from west neighbor;
f o r i = i , t o i , do:
c a l c u l a t e U ~ ( i , j ) ,
L w ( i , j ) , U ~ ( i , j ) ,
L s ( i , j ) , L p ( i , j ) ;
end i ;
Précédent

- 368/431

Suivant