This efficiency of the multi-domain method can be measured by the speedup coefficient. That is the ratio between the elapsed time of the original computation and the elapsed time obtained with the multi-domains method.
If the CPU cost of the main program (RAD2RAD) and time spent in communications are negligible,
and that the time step and the cost per cycle of each domain are constant during the
computation, an estimation of the speedup can be computed in order to determine if
the use of multi-domains is relevant or not.
In the case of 2 domains, A and B, A being the domain with the smallest time step, the speedup
can be obtained using the following formula:
(1)
Where,
-
- Number of cycles for each domain
-
- Number of elements of each domain
-
- Average cost per element and per cycle for each domain
The formula can be rewritten as:
(2)
Where,
-
- Average cost per cycle ratio between domains
-
- Time step ratio
-
- Percentage of elements in the domain with the smallest time step
If the average cost per cycle is the same in the 2 domains then the formula becomes:
(3)
Therefore, the speedup is very high when
and
are close to zero, meaning that domain A is small compared
to B and time step ratio is high. This is what is depicted in Figure 2.