next up previous
Next: A mix of lag Up: Coupling algorithms - SEQ Previous: The lag concept

The sequence concept

To exchange the coupling fields going through OASIS3 main process (i.e. with status EXPORTED, AU-
XILARY, or EXPOUT, see section 5), in a given order at each coupling timestep, a sequence index SEQ must be defined for each of them. This is not required for I/O fields or for coupling fields exchanged directly between the component models, i.e. with status IGNOUT, INPUT or OUTPUT. SEQ gives the position of the coupling field in the sequence.

Figure 4.6: The SEQ concept
\includegraphics[scale=.6]{figures/fig_seq_concept}

A coupling algorithm, showing the SEQ concept, is illustrated on figure 4.6. All coupling field produced by the source model at the coupling timestep can be ``consumed'' by the target model at the same timestep without causing any deadlock situation; therefore, LAG = 0 for all coupling fields. However, at each coupling timestep, a particular order of exchange must be respected; $F_1$ must be received by model A before it can send $F_2$, which in turn must be received by model B before it can send $F_3$. Therefore, SEQ = 1, 2, 3 must be defined respectively for $F_1$, $F_2$ and $F_3$. As all fields can be consumed at the time they are produced (LAG=0 for all fields), there no reading/writing from/to coupling restart files.

An appropriate use of the SEQ index can optimise a coupled run when one of the component model is much slower than the other. This is illustrated on figure 4.7 and figure 4.8.

In figure 4.7 , a coupled run with no use of the SEQ index is illustrated. When the fast model reaches a coupling period, it sends its output coupling fields to OASIS that receives them and then waits until the slow model has also reaches the coupling period. Once OASIS3 has received the fields from both the fast and the slow components, it transforms them and send them respectively to the slow and the fast components. Only then the fast and the slow components are able to go on. The total elapse time for a coupling period is the sum of the slow model running time and the OASIS3 working time.

Figure 4.7: Optimisation of a coupled run using the SEQ index : case A
\includegraphics[scale=.6]{figures/fig_seq_optim1}

In the figure 4.8, an index SEQ = 1 is assigned to the coupling fields going from the fast to the slow component and an index SEQ = 2 is assigned to the coupling fields going from the slow to the fast component. When the fast model reaches a coupling period, it sends its output coupling fields to OASIS3 that receives them, treats them and sends them to the slow model. As soon as the slow model also reaches the coupling period, it sends its output coupling fields to OASIS, receives its input coupling fields right after, and is then able to go on without any delay. Concurrently, OASIS3 treats the slow model output component fields and sends them to the fast model that is then able to go on. Here the total elapse time for a coupling period is very close to the slow model running time only. One can see that using the SEQ index in this way results in ``hiding'' OASIS3 working time behind the slow model running time. Note that in this case, the default buffered send must be used (i.e the NOBSEND option cannot be specified in the namcouple, see section 5.2).

Figure 4.8: Optimisation of a coupled run using the SEQ index : case B
\includegraphics[scale=.6]{figures/fig_seq_optim2}


next up previous
Next: A mix of lag Up: Coupling algorithms - SEQ Previous: The lag concept
Laure Coquart 2013-06-11