<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" dtd-version="3.0"><?xmltex \makeatother\@nolinetrue\makeatletter?>
  <front>
    <journal-meta>
<journal-id journal-id-type="publisher">GMD</journal-id>
<journal-title-group>
<journal-title>Geoscientific Model Development</journal-title>
<abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title>
<abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
</journal-title-group>
<issn pub-type="epub">1991-9603</issn>
<publisher><publisher-name>Copernicus Publications</publisher-name>
<publisher-loc>Göttingen, Germany</publisher-loc>
</publisher>
</journal-meta>

    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-9-2099-2016</article-id><title-group><article-title>A new adaptive data transfer library for model coupling</article-title>
      </title-group><?xmltex \runningtitle{A new adaptive data transfer library for model coupling}?><?xmltex \runningauthor{C. Zhang et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2">
          <name><surname>Zhang</surname><given-names>Cheng</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff3">
          <name><surname>Liu</surname><given-names>Li</given-names></name>
          <email>liuli-cess@tsinghua.edu.cn</email>
        </contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff2 aff1 aff3">
          <name><surname>Yang</surname><given-names>Guangwen</given-names></name>
          <email>ygw@tsinghua.edu.cn</email>
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2">
          <name><surname>Li</surname><given-names>Ruizhe</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff3 aff4">
          <name><surname>Wang</surname><given-names>Bin</given-names></name>
          
        </contrib>
        <aff id="aff1"><label>1</label><institution>Ministry of Education Key Laboratory for Earth System
Modeling, Center for Earth System Science (CESS),<?xmltex \hack{\newline}?> Tsinghua University,
Beijing, China</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Department of Computer Science and Technology, Tsinghua
University, Beijing, China</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Joint Center for Global Change Studies (JCGCS), Beijing,
China</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>State Key Laboratory of Numerical Modelling for
Atmospheric Sciences and Geophysical Fluid Dynamics (LASG),<?xmltex \hack{\newline}?> Institute of
Atmospheric Physics, Chinese Academy of Sciences, Beijing,
China</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Li Liu (liuli-cess@tsinghua.edu.cn) and Guangwen Yang
(ygw@tsinghua.edu.cn)</corresp></author-notes><pub-date><day>9</day><month>June</month><year>2016</year></pub-date>
      
      <volume>9</volume>
      <issue>6</issue>
      <fpage>2099</fpage><lpage>2113</lpage>
      <history>
        <date date-type="received"><day>22</day><month>September</month><year>2015</year></date>
           <date date-type="rev-request"><day>20</day><month>October</month><year>2015</year></date>
           <date date-type="rev-recd"><day>10</day><month>May</month><year>2016</year></date>
           <date date-type="accepted"><day>24</day><month>May</month><year>2016</year></date>
      </history>
      <permissions>
<license license-type="open-access">
<license-p>This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</ext-link></license-p>
</license>
</permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016.html">This article is available from https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016.html</self-uri>
<self-uri xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016.pdf</self-uri>


      <abstract>
    <p>Data transfer means transferring data fields from a sender to a receiver. It
is a fundamental and frequently used operation of a coupler. Most versions of
state-of-the-art couplers currently use an implementation based on the point-to-point (P2P) communication of the message passing interface (MPI)
(referred to as “P2P implementation” hereafter). In this paper, we reveal
the drawbacks of the P2P implementation when the parallel decompositions of
the sender and the receiver are different, including low communication
bandwidth due to small message size, variable and high number of MPI
messages, as well as network contention. To overcome these drawbacks, we
propose a butterfly implementation for data transfer. Although the butterfly
implementation outperforms the P2P implementation in many cases, it degrades
the performance when the sender and the receiver have similar parallel
decompositions or when the number of processes used for running models is
small. To ensure data transfer with optimal performance, we design and
implement an adaptive data transfer library that combines the advantages of
both butterfly implementation and P2P implementation. As the adaptive data
transfer library automatically uses the best implementation for data
transfer, it outperforms the P2P implementation in many cases while it does
not decrease the performance in any cases. Now, the adaptive data transfer
library is open to the public and has been imported into the C-Coupler1
coupler for performance improvement of data transfer. We believe that other
couplers can also benefit from this.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

      <?xmltex \hack{\newpage}?>
<sec id="Ch1.S1" sec-type="intro">
  <title>Introduction</title>
      <p>Climate system models (CSMs) and Earth system models (ESMs) are fundamental
tools for simulating, predicting, and projecting climate. A CSM or an ESM
generally integrates several component models, such as an atmosphere model, a
land surface model, an ocean model, and a sea-ice model, into a coupled system
to simulate the behaviours of the climate system, including the interactions
between components of the climate system. More and more coupled models have
sprung up in the world. For example, the number of coupled model
configurations in the Coupled Model Intercomparison Project (CMIP) has
increased from less than 30 (used for CMIP3) to more than 50 (used for
CMIP5).</p>
      <p>High-performance computing is an essential technical support for model
development, especially for higher and higher resolutions of models. Modern
high-performance computers integrate an increasing number of processor cores
for higher and higher computation performance. Therefore, efficient
parallelization, which enables a model to utilize more processor cores for
acceleration, becomes a technical focus in model development; a number of
component models with efficient parallelization have sprung up. For example,
the Community Ice CodE (CICE; Hunke and Lipscomb, 2008; Humpe et al., 2013) at 0.1<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>
horizontal resolution can scale to 30 000 processor cores on the IBM Blue
Gene/L (Dennis and Tufo, 2008); the Parallel Ocean Program (POP; Kerbyson and Jones,
2005; Smith et al., 2010) at 0.1<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> horizontal resolution can also
scale to 30 000 processor cores on the IBM Blue Gene/L and 10 000 processor
cores on a Cray XT3 (Dennis, 2007); the Community Atmosphere Model (CAM;
Morrison and Gettelman, 2008; Neale et al., 2010, 2012) with a spectral element
dynamical core (CAM-SE) at 0.25<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> horizontal resolution can scale to
86 000 processor cores on a Cray XT5 (Dennis et al., 2012).</p>
      <p>A coupler is an important component in a coupled system. It links component
models together to construct a coupled model, and controls the integration of
the whole coupled model (Valcke et al., 2012). A number of couplers are now
available, e.g. the Model Coupling Toolkit (MCT; Jacob et al., 2005), the
Ocean–Atmosphere–Sea Ice–Soil (OASIS) coupler (Redler et
al., 2010; Valcke, 2013; Valcke et al., 2015), the Earth system modelling
framework (ESMF; Hill et al., 2004), the CPL6 coupler (Craig et al., 2005),
the CPL7 coupler (Craig et al., 2012), the flexible modelling system (FMS)
coupler (Balaji et al., 2006), the bespoke framework generator (BFG; Ford et
al., 2006; Armstrong et al., 2009), and the community coupler version 1
(C-Coupler1; Liu et al., 2014).</p>
      <p>A coupler generally has much smaller overhead than the component models in
current coupled systems. However, it is potentially a time-consuming
component in future coupled models. This is because more and more component
models (such as the land-ice model, chemistry model and biogeochemical model)
will be coupled into a coupled model, and the coupling frequency between
component models will be higher and higher. Data transfer is a fundamental
and frequently used operation in a coupler. It is responsible for
transferring data fields between the processes of two component models and
for rearranging data fields among processes of the same component model for
parallel data interpolation.</p>
      <p>A coupler may become a bottleneck for efficient parallelization of future
coupled models. The most obvious reason is that the current implementation of
data transfer in a state-of-the-art coupler may be not efficient enough. For
example, due to the low efficiency of data transfer, the coupling from a
component model with a horizontal grid (576 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 384 grid points) to
another component model with a different horizontal grid (3600 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 2400
grid points) can only scale to about 500 processor cores when using the CPL7
coupler (Craig et al., 2012). Therefore, it is highly desirable to improve
the parallel data transfer of couplers.</p>
      <p>In this study, we first propose a butterfly implementation of data transfer.
Since the point-to-point (P2P) communication of the message passing interface (MPI)
(referred to as “P2P implementation” hereafter) and the butterfly implementation can outperform
each other in different cases (Sect. 5), we next develop an adaptive data
transfer library that includes both implementations and can adaptively
implement
the better one for data transfer. Performance evaluation demonstrates that
such a library significantly outperforms the P2P implementations in most
cases and does not degrade the performance in any case. This library has been
imported into the C-Coupler1 with a slight code modification. We believe that other
couplers can also benefit from it.</p>
      <p>The remainder of this paper is organized as follows. We briefly introduce the
implementation of data transfer in existing couplers in Sect. 2. Details of
the butterfly implementation and the adaptive data transfer library are
presented in Sects. 3 and 4, respectively. The performances of data transfer
implementations are evaluated in Sect. 5. Conclusions are given in Sect. 6.</p>
</sec>
<sec id="Ch1.S2">
  <title>Data transfer implementations in existing couplers</title>
<sec id="Ch1.S2.SS1">
  <title>P2P implementation</title>
      <p>Almost all state-of-the-art couplers use a similar implementation for data
transfer. To achieve parallel data transfer, MCT first generates a
communication router (known as the data mapping between processes) according
to the parallel decompositions (the distribution of grid points among the
processes) of the sender and the receiver, and then uses the P2P communication of the MPI to transfer the
data. A data field will be transferred from a process of the sender to a
process of the receiver, only when the two processes have common grid
points, i.e. “P2P implementation” for short.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><caption><p>Average execution time of the P2P implementation when transferring
14 2-D fields from CLM3 to GAMIL2. In each test, the atmosphere model GAMIL2
and the land surface model CLM3 have the same number of processes; they do
not share the same computing nodes. The horizontal grid of the 14 2-D fields
contains 7680 (128 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 60) grid points.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f01.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><caption><p>Variation of bandwidth (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of an MPI P2P communication with
respect to the message size (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). The results are generated from our
benchmark. In the benchmark, one process sends messages with different sizes
to the other process. The two processes of the P2P communication run on two
different computing nodes of Tansuo100.</p></caption>
          <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f02.png"/>

        </fig>

      <p>Since MCT has already been imported into OASIS3–MCT, the CPL6 coupler, and
the CPL7 coupler, these couplers also use the P2P implementation for data
transfer. Although the other couplers, such as ESMF, OASIS4, the FMS coupler,
and C-Coupler1, do not directly import MCT, they also use the P2P
implementation for data transfer.</p>
</sec>
<sec id="Ch1.S2.SS2">
  <title>Performance bottlenecks of the P2P implementation</title>
      <p>In this work, we first investigate the performance characteristics of the P2P
implementation, and therefore derive a benchmark from a real coupled model
GAMIL2 (Grid-Point Atmospheric Model of IAP LASG-Version 2)–CLM3 (Community Land Model version 3), which includes GAMIL2 (Li et al., 2013), i.e. an atmosphere
model and CLM3 (Oleson et al., 2004; Dickinson et al., 2006), i.e. a land
surface model. GAMIL2 and CLM3 share the same horizontal grid of 7680
(128 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 60) grid points, but have different parallel decompositions:
GAMIL2 uses a regular two-dimensional (2-D) parallel decomposition, while CLM3 uses an
irregular 2-D parallel decomposition where the grid points are assigned to
the processes in a round-robin fashion.</p>
      <p>In this benchmark, there is only the data transfer with the P2P
implementation between the sender and the receiver with the same horizontal
grid as GAMIL2–CLM3. The parallel decomposition of the sender is derived from
CLM3, and the parallel decomposition of the receiver is derived from GAMIL2.
A high-performance computer called Tansuo100 at Tsinghua University, China, is
used for the performance tests. It has 700 computing nodes, each of which
contains two six-core Intel Xeon X5670 CPUs and 32 GB main memory. All
computing nodes are connected by a high-speed InfiniBand network with peak
communication bandwidth of 5 GB s<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>.</p>
      <p>To evaluate the parallel performance of the P2P implementation, 14 2-D
coupling fields are transferred between the sender and the receiver. In each
test, the sender and the receiver use the same number of processes. Since
there are 12 processor cores on each computing node, the number of processes
is set to be an integral multiple of 12. The sender and the receiver are
located on different computing nodes and the communication of the P2P
implementation must go through the InfiniBand network.</p>
      <p>Figure 1 demonstrates that the poor parallel scalability of the P2P
implementation can be obtained when the parallel decompositions of the sender
and receiver are different. It is well known that the communication
performance heavily depends on message size. As shown in Fig. 2, the P2P
communication bandwidth achieved generally increases with message size. So
when the message size is small (for example, smaller than 4 KB), the
communication bandwidth achieved is very low. The message size in the P2P
implementation decreases when the number of model processes increases
(Fig. 3), indicating that the communication bandwidth becomes lower when
increasing the number of processes. The performance of data transfer also
heavily depends on the number of MPI messages. As shown in Fig. 4, the
variation of average number of MPI messages in the P2P implementation is
consistent with the variation of the execution time in Fig. 1: both increase
with the number of processes from 6 to 48, and go down with the number of
processes from 96 to 192. A lower execution time of the P2P implementation will
be obtained if more processes are used (the maximum number of processes in
both Figs. 1 and 4 is limited to 192 because GAMIL2–CLM3 will not be further
accelerated when using more processes) since the average number of MPI
messages will further go down.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3"><caption><p>Variation of message size of the P2P implementation (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) in
GAMIL2–CLM3 with respect to the number of processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). The
experimental set-up is similar to that shown in Fig. 1.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f03.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4"><caption><p>Variation of the number of MPI messages of one process (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis)
using the P2P implementation in GAMIL2–CLM3 with respect to the number of
processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). The experimental set-up is similar to that
shown in Fig. 1.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f04.pdf"/>

        </fig>

      <p>To further reveal possible reasons for the poor parallel scalability, we
evaluate the ideal performance and actual performance in Fig. 5. The ideal
performance is much better than the actual performance, and the ratio between
the ideal performance and the actual performance significantly increases when
increasing the number of processes. The significant gap between the ideal
performance and the actual performance is due to the network contention. For
example, when multiple P2P communications share the same sender process or
receiver process, they must wait in order.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <title>Butterfly implementation for better performance of data transfer</title>
      <p>The drawbacks of the P2P implementation when the sender and the receiver use
different parallel decompositions can be identified as low communication
bandwidth due to small message size, variable and high number of MPI
messages, as well as network contention. To overcome these drawbacks, a
prospective solution is to organize the transfer of data using a better
algorithm, e.g. the butterfly algorithm (Fig. 6), which has already been
studied in computing sciences (Chong and Brewer, 1994; Foster, 1995; Heckbert , 1995; Hemmert and Underwood, 2005; Kim et al., 2007; Jan et al., 2013; Petagon
and Werapun, 2016). With respect to hardware, the traditional butterfly algorithm
and its transformation have been used to design networks (Chong and Brewer, 1994;
Kim et al., 2007); with respect to software, the butterfly algorithm has been used
to improve the parallel algorithms with all-to-all communications (Foster,
1995), e.g. fast Fourier transform (FFT; Heckbert, 1995; Hemmert and Underwood, 2005), matrix transposition (Petagon and Werapun, 2016), and sorting (Jan
et al., 2013).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5"><caption><p>Ideal and actual bandwidths of the P2P implementation (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) in
GAMIL2–CLM3 when gradually increasing the number of processes per model
(<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). The experimental set-up is similar to that shown in Fig. 1. The
ideal bandwidth is calculated from the message size and the MPI bandwidth
measured in Fig. 2; and the actual bandwidth is calculated from Fig. 1.</p></caption>
        <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f05.pdf"/>

      </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6" specific-use="star"><caption><p>An example of the butterfly kernel with eight processes. Each
coloured row stands for one process (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. There are multiple stages
(each column of arrows represents a stage (stage 1 to stage 3)) in the
butterfly kernel. Each arrow stands for an MPI P2P communication from one
process to another. <inline-formula><mml:math display="inline"><mml:mrow><mml:msubsup><mml:mi>D</mml:mi><mml:mi>j</mml:mi><mml:mi>i</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> means the data are originally in process
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> according to the source parallel decomposition and is finally in
process <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> according to the target parallel decomposition.</p></caption>
        <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f06.pdf"/>

      </fig>

      <p>Unfortunately, the classical butterfly algorithm cannot be used as it is to
improve data transfer, because it requires that one process communicates with
every other process, that the communication load among processes is balanced,
and that the number of processes must be a power of 2. In practice, data
transfer for model coupling has different characteristics: one process
needs to communicate with a part of other processes, the communication load
among processes is always unbalanced, and the number of processes cannot be
restricted to a power of 2. Therefore, we propose here a new implementation
of data transfer involving an additional butterfly kernel to transfer data
from the sender with the source parallel decomposition to the receiver with
the target parallel decomposition. As the number of processes of the
butterfly kernel must be a power of 2, while the number of processes of the
sender or the receiver are not necessarily, the butterfly kernel has its own
source and target parallel decompositions, and process mappings are required
from the sender onto the butterfly kernel and from the butterfly kernel onto
the receiver (see Fig. 7). Next, we present the butterfly kernel and the
process mappings.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7"><caption><p>The butterfly implementation, which is composed of three parts: the
butterfly kernel, process mapping from the sender to the butterfly kernel,
and process mapping from the butterfly kernel to the receiver.</p></caption>
        <?xmltex \igopts{width=142.26378pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f07.pdf"/>

      </fig>

<sec id="Ch1.S3.SS1">
  <title>Butterfly kernel</title>
      <p>The first question for the butterfly kernel is how to decide its number of
processes. Any process of the sender or receiver can be used as a process for
the butterfly kernel. Given that the total number of unique processes of the
sender and receiver is <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>T</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>, the number of processes of the butterfly
kernel (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>B</mml:mtext></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> can be any power of 2, which is no larger than
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>T</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>. We propose to select the maximum number in order to maximize
utilization of resources. We prefer to pick out unique processes first from
the sender, and then from the receiver if the sender does not have enough
processes.</p>
      <p>The butterfly kernel is responsible for rearranging the distribution of data
among the processes from the source parallel decomposition to the target
parallel decomposition. Given the number of processes <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mn mathvariant="normal">2</mml:mn><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>, there are
<inline-formula><mml:math display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> stages in the butterfly kernel. In a stage, all processes are divided
into a number of pairs and the two processes of a pair use MPI P2P
communication to exchange data. After each stage, the number of butterfly
kernel processes that may have the data that will finally belong to any one
process on the target parallel decomposition will become a half. Figure 6 is
an example for further illustration, where <inline-formula><mml:math display="inline"><mml:mrow><mml:msubsup><mml:mi>D</mml:mi><mml:mi>j</mml:mi><mml:mi>i</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> means the data are
originally in process <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> according to the source parallel decomposition
and are finally in process <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> according to the target parallel
decomposition. Before the first stage, all processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>) may
have the data of <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> on the target parallel decomposition. After the
first stage, only four processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">6</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> may
have that data; and after the second stage, only two processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> may have it.</p>
      <p>To reveal the advantages and disadvantages of the two implementations, we
measure the characteristics of the two implementations based on the benchmark
introduced in Sect. 2.2. The results show that the total amount of data
transferred by the butterfly implementation is larger than that transferred by the P2P
implementation (Fig. 8), which is the major disadvantage of the butterfly
implementation. Meanwhile, compared with the P2P implementation, the
butterfly implementation can have the following advantages:
<list list-type="order"><list-item><p>bigger message size for better communication bandwidth (Fig. 9);</p></list-item><list-item><p>balanced and smaller number of MPI processes among processes (Fig. 10);</p></list-item><list-item><p>ordered communications among processes and fewer communications operated
concurrently (Fig. 10), which can dramatically reduce network contention.</p></list-item></list></p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8"><caption><p>Total amount of data transferred by P2P implementation and butterfly
implementation (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) in GAMIL2–CLM3, when varying the number of
processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). The experimental set-up is similar to that
shown in Fig. 1.</p></caption>
          <?xmltex \igopts{width=199.169291pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f08.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9"><caption><p>Average message size transferred by P2P implementation and butterfly
implementation (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) in GAMIL2–CLM3, when varying the number of
processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). The experimental set-up is similar to that
shown in Fig. 1.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f09.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S3.SS2">
  <title>Process mapping</title>
      <p>In this subsection, we will introduce the process mappings from the sender
to the butterfly kernel and from the butterfly kernel to the receiver. To
minimize the overhead of process mapping from the butterfly kernel to the
receiver, we map one or multiple processes of the butterfly kernel onto a
process of the receiver if the butterfly kernel has more processes than the
receiver; otherwise, we map a process of the butterfly kernel onto one or
multiple processes of the receiver. In other words, there is no
multiple-to-multiple process mapping between the butterfly kernel and the
receiver. Similarly, there is no multiple-to-multiple process mapping
between the sender and the butterfly kernel.</p>
      <p>Processes of the sender or the receiver may be unbalanced in terms of the
data size transferred, which may result in unbalanced communications among
processes of the butterfly kernel. As mentioned in Sect. 3.1, at each stage
of the butterfly kernel, all processes are divided into a number of pairs,
each of which is involved in P2P communications. To improve the balance of
communications among the processes in the butterfly kernel, one solution is
to try to make the process pairs at each stage more balanced in terms of the data
size of P2P communications, so we propose to reorder the processes of the
sender or the receiver according to data size. At the first stage,
we pick out the process with the largest data size and the process with the
smallest data size from the remaining processes that have not been paired, to
generate a process group. For the next stage, the outputs of two process
groups from the previous stage are paired into bigger process groups in a
similar way. After finishing the iterative pairing throughout all stages, all
processes of the sender or the receiver are reordered.</p>
      <p>The iterative pairing also requires the number of processes to be a power of
2. Given that the number of processes of the sender (or receiver) is
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>C</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and the number of processes of the butterfly kernel is
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>B</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>, we first pad empty processes (whose data size is zero) before
the iterative pairing to make the number of processes of the sender (or
receiver) be a power of 2 (donated <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>P</mml:mtext></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, which is no smaller than
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>B</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>. Therefore, the reordered <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>P</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> processes after the
iterative pairing can be divided into <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>B</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> groups, each of which
contains <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mtext>P</mml:mtext></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mtext>B</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> processes with consecutive reordered indexes
and maps onto a unique process of the butterfly kernel.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10"><caption><p>Maximum number of MPI messages, average number of MPI messages and
minimum MPI messages in P2P implementation and butterfly implementation
(<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis), when varying the number of processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis) in
GAMIL2–CLM3. The experimental set-up is similar to that shown in Fig. 1.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f10.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11" specific-use="star"><caption><p>An example of process mappings, given that the sender has 5
processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, the receiver has 10 processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">9</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>
(there is no common process between the sender and receiver), and the
butterfly kernel contains 8 processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>B</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>B</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>.
Panels <bold>(a)</bold> and <bold>(b)</bold> show how to iteratively pair processes
of the sender and receiver, respectively. There are multiple stages in the
iterative pairing of processes of the sender and receiver. In each stage, the
processes in the same colour are grouped into one process pair.
Panel <bold>(c)</bold> shows how to map the reordered processes of the sender and
receiver onto the processes of the butterfly kernel.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f11.pdf"/>

        </fig>

      <p>Figure 11 shows an example of the process mapping, where the sender has 5
processes (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Fig. 11a), the receiver has 10 processes
(<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">9</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Fig. 11b), and the butterfly kernel uses 8 processes
(<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>B</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>B</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Fig. 11c). At first, empty processes are padded to the
sender (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in Fig. 11a) and the receiver (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>10</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>–<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>15</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> in
Fig. 11b). Next, the iterative pairing is conducted for the sender and the
receiver. The iterative pairing has three stages for the
sender. At the first stage, the eight processes of the sender are divided
into four groups <inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced close="}" open="{"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mfenced></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">6</mml:mn></mml:msub></mml:mfenced></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msub></mml:mfenced></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced close="}" open="{"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mfenced></mml:mrow></mml:math></inline-formula> (Fig. 11a), according to the data size corresponding to each
process. These four process groups are divided into two bigger groups
<inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced close="}" open="{"><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mfenced><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mfenced close="}" open="{"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msub></mml:mfenced></mml:mfenced></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced open="{" close="}"><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mfenced><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mfenced close="}" open="{"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">6</mml:mn></mml:msub></mml:mfenced></mml:mfenced></mml:mrow></mml:math></inline-formula> at the
second stage (Fig. 11a). Finally, one process group <inline-formula><mml:math display="inline"><mml:mrow><mml:mfenced close="}" open="{"><mml:mfenced open="{" close="}"><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mfenced><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msub></mml:mfenced></mml:mfenced><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mfenced open="{" close="}"><mml:mfenced open="{" close="}"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mfenced><mml:mo>,</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mfenced close="}" open="{"><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">6</mml:mn></mml:msub></mml:mfenced></mml:mfenced></mml:mfenced></mml:mrow></mml:math></inline-formula>
is obtained at the third stage (Fig. 11a), and the eight processes of the
sender are reordered as <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">6</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, each one being mapped onto 1 process of the butterfly
kernel (Fig. 11c). Similarly, the iterative pairing has four stages for the
receiver, and the 16 processes of the receiver are reordered as <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">9</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>15</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">7</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>12</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">8</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>10</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>14</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>13</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">6</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mn>11</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>,
with pairs of these being mapped onto 1 process of the butterfly kernel
(Fig. 11c).</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <title>Adaptive data transfer library</title>
      <p>Now, we have two kinds of implementations (the P2P implementation and the
butterfly implementation) for data transfer. Although the butterfly
implementation can effectively improve the performance of data transfer in
many cases (examples are given in Sect. 5), it has some drawbacks: (1) it
generally has a larger total amount of data transferred than the P2P
implementation; (2) its number of stages is <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>log⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mi>N</mml:mi></mml:mrow></mml:math></inline-formula> (where <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> is the
number of processes for the butterfly kernel) (Foster, 1995), which may be
bigger than the average number of MPI messages in the P2P implementation in
some cases (for example, when the sender and the receiver use the similar
parallel decompositions). Therefore, it is possible that the P2P
implementation outperforms the butterfly implementation in some cases. To
achieve optimal performance for data transfer, we propose an adaptive data
transfer library that can take the advantages of the two implementations in
all cases.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F12" specific-use="star"><caption><p>An example of the adaptive data transfer library with eight
processes, where stage 2 of the butterfly implementation is skipped and
replaced by P2P communication of three MPI messages per process.</p></caption>
        <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f12.pdf"/>

      </fig>

      <p>As introduced in Sect. 3.1, the butterfly implementation is divided into
multiple stages. Actually, the data transfer in one stage can be viewed as a
P2P implementation with only one MPI message per process. Inspired by this
fact, we try to design an adaptive approach that can combine the butterfly
and P2P implementations, where some stages in the butterfly implementation
are skipped and replaced by P2P communication of more MPI messages per
process. When all stages of the butterfly implementation are skipped, the
adaptive data transfer library completely switches to the original P2P
implementation. That is to say, the adaptive data transfer can adaptively
choose the optimal implementation from the P2P implementation and the
butterfly implementation. Figure 12 shows an example of the adaptive data
transfer library with eight processes, where stage 2 of the butterfly
implementation is skipped and replaced by P2P communication of three MPI
messages per process.</p>
      <p>The most significant challenge of such an adaptive approach is to determine
which stage(s) of the butterfly implementation should be skipped. The first
attempt was to design a cost model that can accurately predict the
performance of data transfer in various implementations. We eventually gave
up this approach as it was almost impossible to accurately predict the
performance of the communications on a high-performance computer, especially
when a lot of users share the computer to run various applications.
Performance profiling, which means directly measuring the performance of data
transfer, is more practical to determine an appropriate implementation,
because the simulation of Earth system modelling always takes a long time to
run. Figure 13 shows our flow chart of how the adaptive data transfer library
determines an appropriate implementation. It consists of an initialization
segment and a profiling segment. The initialization segment generates the
process mappings and a candidate implementation that is a butterfly
implementation with no skipped stages. The profiling segment iterates
through each stage of the butterfly implementation to determine whether the
current stage should be skipped or kept. In an iteration, the profiling
segment first generates a temporary implementation based on the candidate
implementation where the current stage is skipped, and then runs the
temporary implementation to get the time the data transfer takes. When the
temporary implementation is more efficient than the candidate
implementation, the current stage is skipped and the temporary
implementation replaces the candidate implementation. When the profiling
segment finishes, the appropriate implementation is set to be the candidate
implementation. To reduce the overhead introduced by the adaptive data
transfer library, the profiling segment truly transfers the data for model
coupling. In other words, before obtaining an optimal implementation, the
data is transferred by the profiling segment.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F13"><caption><p>A flow chart for determining an appropriate implementation of the
adaptive data transfer library.</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f13.pdf"/>

      </fig>

</sec>
<sec id="Ch1.S5">
  <title>Performance evaluation</title>
      <p>In this section, we empirically evaluate the adaptive data transfer library,
through comparing it to the P2P implementation and the butterfly
implementation. Both toy models and realistic models (GAMIL2–CLM3 and CESM – Community Earth System Model)
are used for the performance evaluation. GAMIL2–CLM3 has been introduced in
Sect. 2.2. CESM (Hurrell et al., 2013) is a state-of-the-art ESM developed by
the National Center for Atmospheric Research (NCAR). All the experiments are
run on the high-performance computer Tansuo100.</p>
      <p>Next, we will evaluate the overhead of initialization, the performance of
transferring data fields between two toy models and between different
realistic component models, and the performance of rearranging data fields
within a component model for parallel interpolation.</p>
<sec id="Ch1.S5.SS1">
  <title>Overhead of initialization</title>
      <p>We first evaluate the initialization overhead of data transfer
implementations. As shown in Fig. 14, the initialization overhead of each
implementation increases when increasing the number of processes. The
initialization overhead of the butterfly implementation is a little higher
than that of the P2P implementation, while the initialization overhead of the
adaptive data transfer library is 2–3-fold higher than that of the P2P
implementation, because the adaptive data transfer library uses extra time on
the performance profiling (see Sect. 4). Considering that one data transfer
instance should only be initialized at the beginning and executed many times
in a coupled model, we can conclude that the initialization overhead of the
adaptive data transfer library is reasonable, especially when the simulation
is executed for a very long time.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F14"><caption><p>Initialization time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between two toy
models using a rectangular grid (of 192 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 96 grid points) when
varying the number of processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). There are 10 2-D
coupling fields transferred from the source toy model to the target toy
model. In each test, all processes of the sender in the P2P implementation
have the same number of MPI messages. If the number of processes per model is
less than 24, the number of MPI messages per sender process in the P2P
implementation is equal to the number of processes per model; otherwise, the
number of MPI messages per sender process in the P2P implementation is 24.
The parallel decompositions of the sender and the receiver for a given
average number of MPI messages are generated by Algorithm 1.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f14.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F15"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between two
toy models with the same rectangular grid (of 192 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 480 grid points)
when varying the number of MPI messages per sender process in the P2P
implementation (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). Each toy model is run with 1024 processes. There
are 10 2-D coupling fields transferred from the source toy model to the
target toy model.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f15.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F16" specific-use="star">
          <?xmltex \igopts{width=426.791339pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-g01.pdf"/>
        </fig>

</sec>
<sec id="Ch1.S5.SS2">
  <title>Performance of data transfer between toy models</title>
      <p>The factors that can impact the performance of a data transfer implementation
generally include the number of MPI messages, the size of the data to be
transferred (also referred to as the number of fields in this evaluation) and
the number of processes used. In this subsection, we evaluate the impact of
each factor on the performance of data transfer for different
implementations. We first build two toy models that both use the same
logically rectangular grid of 192 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 480 grid points. Coupling fields
are transferred between the two toy models. For any test, the two toy models
use the same number of processes. Next, we evaluate the performance of data
transfer through varying one factor while fixing the other two factors.</p>
      <p>In the first experiment, we fix the number of processes to be 1024 and the
number of coupling fields to be 10, while varying the number of MPI
messages in the P2P implementation. In each test, all processes of the sender
have the same number of MPI messages. As the number of MPI messages is
determined by the parallel decompositions of the sender and the receiver, we
design an algorithm (Algorithm 1) that can generate the parallel
decompositions of the two toy models according to the average number of MPI
messages of the sender in the P2P implementation. Figure 15 shows the
execution time of one data transfer with different implementations when
increasing the number of MPI messages per sender process in the P2P
implementation from 1 to 90. The P2P implementation can outperform the
butterfly implementation when the number of MPI messages is small (e.g.
smaller than 12 in Fig. 15), while the butterfly implementation can
outperform the P2P implementation when the number of MPI messages is big
(e.g. bigger than 12 in Fig. 15). The adaptive data transfer library can
adaptively choose the optimal implementation from the P2P implementation and
the butterfly implementation and, moreover, it improves the performance based
on the butterfly implementation when the number of MPI messages is big,
since some butterfly stages of the butterfly implementation are skipped.
When the number of MPI messages is 90, the adaptive data transfer library can
achieve a 19.2-fold performance speed-up compared to the P2P implementation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F17" specific-use="star"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between two
toy models with the same rectangular grid (of 192 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 480 grid points)
when varying the number of coupling fields transferred (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). There are
four simulation tests for the evaluation. In simulation <bold>(a)</bold>, each
toy model is run with 256 processes, and the number of MPI messages per
sender process in the P2P implementation is 12. In simulation <bold>(b)</bold>,
each toy model is run with 1024 processes, and the number of MPI messages per
sender process is in the P2P implementation 12. In simulation <bold>(c)</bold>,
each toy model is run with 256 processes, and the number of MPI messages per
sender process in the P2P implementation is 48. In simulation <bold>(d)</bold>,
each toy model is run with 1024 processes, and the number of MPI messages per
sender process in the P2P implementation is 48.</p></caption>
          <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f16.pdf"/>

        </fig>

      <p>In the second experiment, we fix the number of processes and the number of
MPI processes per sender process in the P2P implementation, and vary the
number of coupling fields transferred. Figure 16 shows the execution time of
one data transfer with different implementations in this experiment. The
results show that the execution time of each implementation increases with
the increment of data size. When the number of MPI processes per sender
process in the P2P implementation is small (Fig. 16a, b), the performance
of the butterfly implementation is poorer than that of the P2P
implementation, especially when the number of 2-D coupling fields gets
bigger. When the number of MPI messages per sender process in the P2P
implementation is big (Fig. 16c, d), the butterfly implementation
significantly outperforms the P2P implementation; however, the advantage of
the butterfly implementation decreases when increasing the number of coupling
fields. The results also demonstrate that the adaptive data transfer library
can adaptively choose the optimal implementation from the P2P implementation
and the butterfly implementation, and can further improve the performance
based on the butterfly implementation.</p>
      <p>In the third experiment, we fix the number of MPI messages per sender process
in the P2P implementation to be 24 and the number of coupling fields
transferred to be 10, and vary the number of processes used. Figure 17 shows
the execution time of one data transfer with different implementations when
varying the number of processes. The P2P implementation outperforms the
butterfly implementation when a small number of processes are used (e.g.
smaller than 256 in Fig. 17), while the butterfly implementation outperforms
the P2P implementation when a large number of processes are used (e.g. larger
than 256 in Fig. 17). Similar to the above two experiments, the adaptive data
transfer library can adaptively choose the optimal implementation from the
P2P implementation and the butterfly implementation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F18"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between two
toy models with the same rectangular grid (of 192 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 480 grid points)
when varying the number of processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis). There are 10 2-D
coupling fields transferred from the source toy model to the target toy
model. In each test, the number of MPI messages per sender process in the P2P
implementation is 24.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f17.pdf"/>

        </fig>

      <p>The resolution of models becomes higher and higher these days. How about the
performance of the data transfer implementations when model resolution
becomes higher? Higher model resolution means that a model will use more
processes for accelerating a simulation, while the average number of grid
points per process can remain constant. Considering that the numbers of grid
points are always balanced among the processes of a model, we make each
process (which runs on a unique processor core) of the toy models evenly have
around 96 grid points in this evaluation, while enabling processes to have
different number of MPI messages and different message sizes (the average
number of MPI messages of the sender in P2P implementation is 34). As shown
in Fig. 18, although the execution times of all data transfer implementations
increase when increasing the number of processes (from 64 to 1024), the
butterfly implementation significantly outperforms the P2P implementation. So
the adaptive data transfer library adaptively chooses the butterfly
implementation, and further slightly outperforms the butterfly implementation
when each model uses more than 512 processes because some butterfly stages
are skipped.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F19"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between two
toy models. In this evaluation, each process (running on a unique processor
core) of the toy models has 96 grid points, while different processes have
a different number of MPI messages and different message sizes in the P2P
implementation. The number of coupling fields transferred is set to 20.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f18.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS3">
  <title>Performance of data transfer between realistic models</title>
      <p>In this subsection, we evaluate the performance using two realistic models:
GAMIL2–CLM3 (horizontal resolution of 2.8<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 2.8<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>)
and CESM (resolution of 1.9x2.5_gx1v6).</p>
      <p>For CESM, we use the data transfer between the coupler CPL7 (Craig et al.,
2012) and the land surface model CLM4 (Oleson et al., 2004), where 32 2-D
coupling fields on the CLM4 horizontal grid (the grid size is
144 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 96 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 13 824) are transferred. Figure 19 shows the
performance of one data transfer of different implementations when increasing
the number of processes of both CPL7 and CLM4 from 6 to 192. When the number
of processes is small (e.g. smaller than 24 in Fig. 19), the butterfly
implementation is much poorer than the P2P implementation. In this case, the
adaptive data transfer library chooses the P2P implementation as the optimal
implementation. However, when the number of processes gets bigger (e.g.
larger than 24 in Fig. 19), the butterfly implementation outperforms the P2P
implementation. In this case, the adaptive data transfer library, based on the
butterfly implementation, skips some stages, outperforming the butterfly
implementation. Figure 19 also shows that the butterfly implementation and
the adaptive transfer library seem to converge when increasing the number of
processes per model. When each model uses 192 processes, the adaptive data
transfer library is 4.01 times faster than the P2P implementation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F20"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between the
land surface model CLM4 and the coupler CPL7 in CESM when varying the number
of processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis): 32 coupling fields on the CLM horizontal
grid (the grid size is 144 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 96 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 13 824) are transferred from
the land surface model CLM4 to the coupler CPL7. The performance results of
the P2P implementation are obtained through running the adaptive data
transfer library forcing it to completely switch to the original P2P
implementation.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f19.pdf"/>

        </fig>

      <p>For GAMIL2–CLM3, we use the data transfer from CLM3 to GAMIL2 where 14 2-D
coupling fields on the GAMIL2 horizontal grid (whose grid size is
128 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 60 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 7680) are transferred. Figure 20 shows the execution
time of one data transfer of each implementation when increasing the number
of processes of both GAMIL2 and CLM3 from 6 to 192. The results in Fig. 20
confirm that the adaptive data transfer library can adaptively choose the
optimal implementation from the P2P implementation and the butterfly
implementation. Compared to the P2P implementation, the adaptive data
transfer library achieves an 11.68-fold performance speed-up when the number
of processes is 96, but achieves a much lower speed-up (only 3.48-fold) when
the number of processes is 192. This is because the average number of MPI
messages per process in the P2P implementation reduces from 32 to 18 when the
number of process increases from 96 to 192.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F21"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data transfer between the
atmosphere model GAMIL2 and the land surface model CLM3 in GAMIL2–CLM3 when
varying the number of processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis): 14 coupling fields on
the GAMIL2 horizontal grid (the grid size is 128 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 60 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 7680)
are transferred from the land surface model CLM3 to the atmosphere model
GAMIL2.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f20.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS4">
  <title>Performance of data rearrangement for interpolation</title>
      <p>Besides data transfer between different component models, there is another
kind of data transfer in model coupling that rearranges data inside a model
for parallel interpolation of fields between different grids. Here, we use
the data rearrangement for the parallel interpolation from the atmosphere
grid (whose grid size is 144 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 96 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 13 824) to the ocean grid
(whose grid size is 320 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 384 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 122 880) in the coupled model
CESM for further evaluation. As shown on Fig. 21, the P2P implementation
significantly outperforms the butterfly implementation. This is because the
parallel decompositions before and after data rearrangement are always
similar, which leads to small number of MPI messages. For example, the average
number of MPI messages in the P2P implementation corresponding to Fig. 21 is
only 6.49 when the model uses 96 processes. In this case, the P2P
implementation is chosen as the optimal implementation of the data transfer
library, so the data transfer library does not provide real benefit compared
to the P2P implementation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F22"><caption><p>Average execution time (<inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) of one data rearrangement for the
parallel interpolation from the atmosphere grid (the grid size is
144 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 96 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 13 824) to the ocean grid (the grid size is
320 <inline-formula><mml:math display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 384 <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 122 880) in CESM when varying the number of
processes per model (<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis).</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f21.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS5">
  <title>Performance improvement for a coupled model</title>
      <p>With the performance improvement of data transfer, we expect that the
adaptive data transfer library will improve the performance of coupled
models. For this evaluation, we first imported the adaptive data transfer
library into C-Coupler1, used it in the coupled model GAMIL2–CLM3, and
measured performance results. As shown in Fig. 22, the adaptive data transfer
library achieves higher speed-up with respect to the whole model time (when
the P2P implementation is used as the baseline) for GAMIL2–CLM3 when using
more than 16 processes. When each component model uses 128 processes, the
butterfly implementation achieves <inline-formula><mml:math display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 4.6 % performance improvement,
and the adaptive data transfer library achieves <inline-formula><mml:math display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 6.9 % performance
improvement. Therefore, the data transfer library can improve the performance of data
transfer, and then improve the performance of the whole coupled model.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F23"><caption><p>Performance improvement with respect to the whole model time for the
coupled model GAMIL2–CLM3 achieved by the butterfly implementation and the
adaptive data transfer library, using the P2P implementation as the
baseline.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/2099/2016/gmd-9-2099-2016-f22.pdf"/>

        </fig>

</sec>
</sec>
<sec id="Ch1.S6" sec-type="conclusions">
  <title>Conclusions</title>
      <p>Data transfer is a fundamental and frequently used operation in a coupler.
This paper showed that the P2P implementation currently used in most
state-of-the-art couplers for data transfer is inefficient when the parallel
decompositions of the sender and the receiver are different, and further
revealed the corresponding performance bottlenecks. We showed that the
butterfly implementation can outperform the P2P implementation in many cases
but degrades the performance in some cases, for example when a small number
of processes are used to run models or when the parallel decompositions of
the sender and receiver are similar. We therefore designed and implemented an
adaptive data transfer library that automatically chooses an optimal
implementation between the P2P implementation and the butterfly implementation and also further
improves the performance based on the butterfly implementation through
skipping some butterfly stages. Compared to the P2P implementation, the
adaptive data transfer library can improve the performance of data transfer
when the parallel decompositions of the sender and the receiver are
different.</p>
      <p>The initialization overhead for the adaptive data transfer library could
become expensive when using a large number of processes. In the future
version, the adaptive data transfer will allow users to record the results of
performance profiling offline to save the time used for performance profiling
in the next run of the same coupled model.</p>
<sec id="Ch1.S6.SSx1" specific-use="unnumbered">
  <title>Code availability</title>
      <p>The source code of the adaptive data transfer library version 1.0 is
available at <uri>https://github.com/zhang-cheng09/Data_transfer_lib</uri>.</p>
</sec>
</sec>

      
      </body>
    <back><ack><title>Acknowledgements</title><p>This work is supported in part by the Natural Science Foundation of China
(no. 41275098), the National Grand Fundamental Research 973 Program of China
(no. 2013CB956603), and the Tsinghua University Initiative Scientific Research
Program (no. 20131089356).<?xmltex \hack{\newline}?><?xmltex \hack{\newline}?> Edited by:
S. Valcke</p></ack><ref-list>
    <title>References</title>

      <ref id="bib1.bib1"><label>1</label><mixed-citation>Armstrong, C. W., Ford, R. W., and Riley, G. D.: Coupling integrated Earth
System Model components with BFG2, Concurrency and Computation: Practice and
Experience, 21, 767–791, <ext-link xlink:href="http://dx.doi.org/10.1002/cpe.1348" ext-link-type="DOI">10.1002/cpe.1348</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bib2"><label>2</label><mixed-citation>Balaji, V., Anderson, J., Held, I., Winton, M., Durachta, J., Malyshev, S.,
and Stouffer, R. J.: The Exchange Grid: a mechanism for data exchange between
Earth system components on independent grids, in: Parallel Computational
Fluid Dynamics 2005 Theory and Applications, 179–186,
<ext-link xlink:href="http://dx.doi.org/10.1016/B978-044452206-1/50021-5" ext-link-type="DOI">10.1016/B978-044452206-1/50021-5</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bib3"><label>3</label><mixed-citation>
Chong, F. T. and Brewer, E. A.: Packaging and multiplexing of hierarchical
scalable expanders, Parallel Computer Routing and Communication, Springer
Berlin Heidelberg, 200–214, 1994.</mixed-citation></ref>
      <ref id="bib1.bib4"><label>4</label><mixed-citation>
Craig, A. P., Jacob, R., Kauffman, B., Bettge, T., Larson, J., Ong, E., Ding,
C., and He, Y.: CPL6: the New Extensible, High Performance Parallel Coupler
for the Community Climate System Model, Int. J. High Perform. C., 19,
309–327, 2005.</mixed-citation></ref>
      <ref id="bib1.bib5"><label>5</label><mixed-citation>Craig, A. P., Vertenstein, M., and Jacob, R.: A new flexible coupler for
Earth system modelling developed for CCSM4 and CESM1, Int. J. High Perform.
C., 26, 31–42, <ext-link xlink:href="http://dx.doi.org/10.1177/1094342011428141" ext-link-type="DOI">10.1177/1094342011428141</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bib6"><label>6</label><mixed-citation>
Dennis, J. M.: Inverse space-filling curve partitioning of a global ocean
model, in: IEEE International Parallel &amp; Distributed Processing Symposium,
Long Beach, CA, 2007.</mixed-citation></ref>
      <ref id="bib1.bib7"><label>7</label><mixed-citation>Dennis, J. M. and Tufo, H. M.: Scaling climate simulation applications on the
IBM Blue Gene/L system, IBM J. Res. Dev., 52, 117–126,
<ext-link xlink:href="http://dx.doi.org/10.1147/rd.521.0117" ext-link-type="DOI">10.1147/rd.521.0117</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bib8"><label>8</label><mixed-citation>Dennis, J. M., Edwards, J., Evans, K. J., Guba, O., Lauritzen, P. H., Mirin,
A. A., St-Cyr, A., Taylor, M. A., and Worley, P. H.: CAM-SE: a scalable
spectral element dynamical core for the Community Atmosphere Model, Int. J.
High Perform. C., 26, 74–89, <ext-link xlink:href="http://dx.doi.org/10.1177/1094342011428142" ext-link-type="DOI">10.1177/1094342011428142</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bib9"><label>9</label><mixed-citation>
Dickinson, R. E., Oleson, K. W., Bonan, G., Hoffman, F., Thornton, P.,
Vertenstein, M., Yang, Z.-L., and Zeng, X.: The Community Land surface model
and its climate statistics as a component of the Community Climate System
Model, J. Climate, 19, 2302–2324, 2006.</mixed-citation></ref>
      <ref id="bib1.bib10"><label>10</label><mixed-citation>
Ford, R. W., Riley, G. D., Bane, M. K., Armstrong, C. W., and Freeman, T. L.:
GCF: a general coupling framework, Concurr. Comp. Pract. E., 18, 163–181,
2006.</mixed-citation></ref>
      <ref id="bib1.bib11"><label>11</label><mixed-citation>
Foster, I.: Designing and building parallel programs: concepts and tools for
parallel software engineering, Addison-Wesley, 1995.</mixed-citation></ref>
      <ref id="bib1.bib12"><label>12</label><mixed-citation>
Heckbert P.: Fourier Transforms and the Fast Fourier Transform (FFT)
Algorithm, Comp. Graph., 2, 15–463, 1995.</mixed-citation></ref>
      <ref id="bib1.bib13"><label>13</label><mixed-citation>
Hemmert, K. S. and Underwood, K. D.: An analysis of the double-precision
floating-point FFT on FPGAs, Field-Programmable Custom Computing Machines,
2005, FCCM 2005, 13th Annual IEEE Symposium on IEEE, 171–180, 2005.</mixed-citation></ref>
      <ref id="bib1.bib14"><label>14</label><mixed-citation>
Hill, C., DeLuca, C., Balaji, V., Suarez, M., and da Silva, A.: The
Architecture of the Earth System Modelling Framework, Comput. Sci. Eng., 6,
18–28, 2004.</mixed-citation></ref>
      <ref id="bib1.bib15"><label>15</label><mixed-citation>
Hurrell, J. W., Holland, M. M., Gent, P. R., Ghan, S., Kay, J. E., Kushner,
P. J., Lamarque, J.-F., Large, W. G., Lawrence, D., Lindsay, K., Lipscomb, W.
H., Long, M. C., Mahowald, N., Marsh, D. R., Neale, R. B., Rasch, P., Vavrus,
S., Vertenstein, M., Bader, D., Collins, W. D., Hack, J. J., Kiehl, J., and
Marshall, S.: The Community Earth System Model: a framework for collaborative
research, B. Am. Meteorol. Soc., 94, 1339–1360, 2013.</mixed-citation></ref>
      <ref id="bib1.bib16"><label>16</label><mixed-citation>
Hunke, E. C. and Lipscomb W. H.: CICE: the Los Alamos Sea Ice Model
Documentation and Software User's Manual 4.0, Technical Report LA-CC-06-012,
Los Alamos National Laboratory, T-3 Fluid Dynamics Group, 2008.</mixed-citation></ref>
      <ref id="bib1.bib17"><label>17</label><mixed-citation>
Hunke, E. C., Lipscomb, W. H., Turner, A. K., Jeffery, N., and Elliott, S.:
CICE: the Los Alamos Sea Ice Model Documentation and Software User's Manual
Version 5.0, LA-CC-06-012, Los Alamos National Laboratory, Los Alamos NM,
87545, 115, 2013.</mixed-citation></ref>
      <ref id="bib1.bib18"><label>18</label><mixed-citation>Jacob, R., Larson, J., and Ong, E.: <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>M</mml:mi><mml:mo>×</mml:mo><mml:mi>N</mml:mi></mml:mrow></mml:math></inline-formula> Communication and Parallel
Interpolation in Community Climate System Model version 3 using the Model
Coupling Toolkit, Int. J. High Perform. C., 19, 293–307, 2005.</mixed-citation></ref>
      <ref id="bib1.bib19"><label>19</label><mixed-citation>Jan, B., Montrucchio, B., Ragusa, C., Khan, F. G., and Khan, O.:
Parallel butterfly sorting algorithm on gpu, Artificial Intelligence and Applications, Innsbruck, Austria, <ext-link xlink:href="http://dx.doi.org/10.2316/P.2013.795-026" ext-link-type="DOI">10.2316/P.2013.795-026</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bib20"><label>20</label><mixed-citation>Kerbyson, D. J. and Jones, P. W.: A performance model of the parallel ocean
program, Int. J. High Perform. C., 19, 261–276,
<ext-link xlink:href="http://dx.doi.org/10.1177/1094342005056114" ext-link-type="DOI">10.1177/1094342005056114</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bib21"><label>21</label><mixed-citation>
Kim J., Dally W. J., and Abts D.: Flattened butterfly: A cost-efficient
topology for high-radix networks, ISCA, 35, 126–137, 2007.</mixed-citation></ref>
      <ref id="bib1.bib22"><label>22</label><mixed-citation>Li, L. J., Wang, B., Dong, L., Liu, L., Shen, S., Hu, N., Sun, W., Wang, Y.,
Huang, W., Shi, X., Pu, Y., and Yang, G.: Evaluation of Grid-point
Atmospheric Model of IAP LASG version 2 (GAMIL2), Advances in Atmospheric
Sciences, 30, 855–867, <ext-link xlink:href="http://dx.doi.org/10.1007/s00376-013-2157-5" ext-link-type="DOI">10.1007/s00376-013-2157-5</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bib23"><label>23</label><mixed-citation>Liu, L., Yang, G., Wang, B., Zhang, C., Li, R., Zhang, Z., Ji, Y., and Wang,
L.: C-Coupler1: a Chinese community coupler for Earth system modeling,
Geosci. Model Dev., 7, 2281–2302, <ext-link xlink:href="http://dx.doi.org/10.5194/gmd-7-2281-2014" ext-link-type="DOI">10.5194/gmd-7-2281-2014</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bib24"><label>24</label><mixed-citation>Morrison, H. and Gettelman, A.: A new two-moment bulk stratiform cloud
microphysics scheme in the Community Atmosphere Model, version 3 (CAM3). Part
I: Description and numerical tests, J. Climate, 21, 3642–3659,
<ext-link xlink:href="http://dx.doi.org/10.1175/2008JCLI2105.1" ext-link-type="DOI">10.1175/2008JCLI2105.1</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bib25"><label>25</label><mixed-citation>Neale, R. B., Richter, J. H., Conley, A. J., Park, S., Lauritzen, P. H.,
Gettelman, A., Williamson, D. L., Rasch, P. J., Vavrus, S. J., Taylor, M. A.,
Collins, W. D., Zhang, M., and Lin, S.: Description of the NCAR Community
Atmosphere Model (CAM 4.0), National Center for Atmospheric Research Ncar
Koha Opencat, TN-485<inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula>STR, 222 pp., 2010.</mixed-citation></ref>
      <ref id="bib1.bib26"><label>26</label><mixed-citation>Neale, R. B., Chen, C. C., Gettelman, A., Lauritzen, P. H., Park, S.,
Williamson, D. L., Conley, A. J., Garcia, R., Kinnison, D., Lamarque, J. F.,
Marsh, D., Mills, M., Smith, A. K., Tilmes, S., Vitt, F., Morrison, H.,
Cameron-Smith, P., Collins, W. D., Iacono, M. J., Easter, R. C., Ghan, S. J.,
Liu, X., Rasch, P. J., and Taylor, M. A.: Description of the NCAR Community
Atmosphere Model (CAM 5.0), National Center for Atmospheric Research Ncar
Koha Opencat, TN-486<inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula>STR, 289 pp., 2012.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bib27"><label>27</label><mixed-citation>Oleson, K. W., Dai, Y., Bonan, G., Bosilovich, M., Dickinson, R., Dirmeyer,
P., Hoffman, F., Houser, P., Levis, S., Niu, G. Y., Thornton, P.,
Vertenstein, M., Yang, Z. L., and Zeng, X.: Technical Description of the
Community Land Surface Model (CLM), National Center for Atmospheric Research
Ncar Koha Opencat, TN-461<inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula>STR, 186 pp., 2004.</mixed-citation></ref>
      <ref id="bib1.bib28"><label>28</label><mixed-citation>Petagon, R. and Werapun, J.: Embedding the optimal all-to-all personalized
exchange on multistage interconnection networks <inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula> mathContainer Loading
Mathjax, J. Parallel Distr. Com., 88, 16–30, 2016.</mixed-citation></ref>
      <ref id="bib1.bib29"><label>29</label><mixed-citation>Redler, R., Valcke, S., and Ritzdorf, H.: OASIS4 – a coupling software for
next generation earth system modelling, Geosci. Model Dev., 3, 87–104,
<ext-link xlink:href="http://dx.doi.org/10.5194/gmd-3-87-2010" ext-link-type="DOI">10.5194/gmd-3-87-2010</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bib30"><label>30</label><mixed-citation>Smith, R., Jones, P., Briegleb, B., Bryan, F., Danabasoglu, G., Dennis, J.,
Dukowicz, J., Eden, C., Fox-Kemper, B., Gent, P., Hecht, M., Jayne, S.,
Jochum, M., Large, W., Lindsay, K., Maltrud, M., Norton, N., Peacock, S.,
Vertenstein, M., and Yeager, S.: The Parallel Ocean Program (POP) reference
manual ocean component of the Community Climate System Model (CCSM) and
Community Earth System Model (CESM), Los Alamos National Laboratory,
LAUR-10-01853, available at:
<uri>http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/sci/POPRefManual.pdf</uri>
(last access: 15 October 2015), 141 pp., 2010.</mixed-citation></ref>
      <ref id="bib1.bib31"><label>31</label><mixed-citation>Valcke, S., Balaji, V., Craig, A., DeLuca, C., Dunlap, R., Ford, R. W.,
Jacob, R., Larson, J., O'Kuinghttons, R., Riley, G. D., and Vertenstein, M.:
Coupling technologies for Earth System Modelling, Geosci. Model Dev., 5,
1589–1596, <ext-link xlink:href="http://dx.doi.org/10.5194/gmd-5-1589-2012" ext-link-type="DOI">10.5194/gmd-5-1589-2012</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bib32"><label>32</label><mixed-citation>Valcke, S.: The OASIS3 coupler: a European climate modelling community
software, Geosci. Model Dev., 6, 373–388, <ext-link xlink:href="http://dx.doi.org/10.5194/gmd-6-373-2013" ext-link-type="DOI">10.5194/gmd-6-373-2013</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bib33"><label>33</label><mixed-citation>Valcke, S., Craig, T., and Coquart, L.: OASIS3-MCT User Guide,
OASIS3-MCT_3.0, Technical Report TR/CMGC/15/38, Cerfacs, France, available
at:
<uri>http://www.cerfacs.fr/oa4web/oasis3-mct_3.0/oasis3mct_UserGuide.pdf</uri> (last access: 7 June 2016),
2015.</mixed-citation></ref>

  </ref-list><app-group content-type="float"><app><title/>

    </app></app-group></back>
    <!--<article-title-html>A new adaptive data transfer library for model coupling</article-title-html>
<abstract-html><p class="p">Data transfer means transferring data fields from a sender to a receiver. It
is a fundamental and frequently used operation of a coupler. Most versions of
state-of-the-art couplers currently use an implementation based on the point-to-point (P2P) communication of the message passing interface (MPI)
(referred to as “P2P implementation” hereafter). In this paper, we reveal
the drawbacks of the P2P implementation when the parallel decompositions of
the sender and the receiver are different, including low communication
bandwidth due to small message size, variable and high number of MPI
messages, as well as network contention. To overcome these drawbacks, we
propose a butterfly implementation for data transfer. Although the butterfly
implementation outperforms the P2P implementation in many cases, it degrades
the performance when the sender and the receiver have similar parallel
decompositions or when the number of processes used for running models is
small. To ensure data transfer with optimal performance, we design and
implement an adaptive data transfer library that combines the advantages of
both butterfly implementation and P2P implementation. As the adaptive data
transfer library automatically uses the best implementation for data
transfer, it outperforms the P2P implementation in many cases while it does
not decrease the performance in any cases. Now, the adaptive data transfer
library is open to the public and has been imported into the C-Coupler1
coupler for performance improvement of data transfer. We believe that other
couplers can also benefit from this.</p></abstract-html>
<ref-html id="bib1.bib1"><label>1</label><mixed-citation>
Armstrong, C. W., Ford, R. W., and Riley, G. D.: Coupling integrated Earth
System Model components with BFG2, Concurrency and Computation: Practice and
Experience, 21, 767–791, <a href="http://dx.doi.org/10.1002/cpe.1348" target="_blank">doi:10.1002/cpe.1348</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>2</label><mixed-citation>
Balaji, V., Anderson, J., Held, I., Winton, M., Durachta, J., Malyshev, S.,
and Stouffer, R. J.: The Exchange Grid: a mechanism for data exchange between
Earth system components on independent grids, in: Parallel Computational
Fluid Dynamics 2005 Theory and Applications, 179–186,
<a href="http://dx.doi.org/10.1016/B978-044452206-1/50021-5" target="_blank">doi:10.1016/B978-044452206-1/50021-5</a>, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>3</label><mixed-citation>
Chong, F. T. and Brewer, E. A.: Packaging and multiplexing of hierarchical
scalable expanders, Parallel Computer Routing and Communication, Springer
Berlin Heidelberg, 200–214, 1994.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>4</label><mixed-citation>
Craig, A. P., Jacob, R., Kauffman, B., Bettge, T., Larson, J., Ong, E., Ding,
C., and He, Y.: CPL6: the New Extensible, High Performance Parallel Coupler
for the Community Climate System Model, Int. J. High Perform. C., 19,
309–327, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>5</label><mixed-citation>
Craig, A. P., Vertenstein, M., and Jacob, R.: A new flexible coupler for
Earth system modelling developed for CCSM4 and CESM1, Int. J. High Perform.
C., 26, 31–42, <a href="http://dx.doi.org/10.1177/1094342011428141" target="_blank">doi:10.1177/1094342011428141</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>6</label><mixed-citation>
Dennis, J. M.: Inverse space-filling curve partitioning of a global ocean
model, in: IEEE International Parallel &amp; Distributed Processing Symposium,
Long Beach, CA, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>7</label><mixed-citation>
Dennis, J. M. and Tufo, H. M.: Scaling climate simulation applications on the
IBM Blue Gene/L system, IBM J. Res. Dev., 52, 117–126,
<a href="http://dx.doi.org/10.1147/rd.521.0117" target="_blank">doi:10.1147/rd.521.0117</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>8</label><mixed-citation>
Dennis, J. M., Edwards, J., Evans, K. J., Guba, O., Lauritzen, P. H., Mirin,
A. A., St-Cyr, A., Taylor, M. A., and Worley, P. H.: CAM-SE: a scalable
spectral element dynamical core for the Community Atmosphere Model, Int. J.
High Perform. C., 26, 74–89, <a href="http://dx.doi.org/10.1177/1094342011428142" target="_blank">doi:10.1177/1094342011428142</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>9</label><mixed-citation>
Dickinson, R. E., Oleson, K. W., Bonan, G., Hoffman, F., Thornton, P.,
Vertenstein, M., Yang, Z.-L., and Zeng, X.: The Community Land surface model
and its climate statistics as a component of the Community Climate System
Model, J. Climate, 19, 2302–2324, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>10</label><mixed-citation>
Ford, R. W., Riley, G. D., Bane, M. K., Armstrong, C. W., and Freeman, T. L.:
GCF: a general coupling framework, Concurr. Comp. Pract. E., 18, 163–181,
2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>11</label><mixed-citation>
Foster, I.: Designing and building parallel programs: concepts and tools for
parallel software engineering, Addison-Wesley, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>12</label><mixed-citation>
Heckbert P.: Fourier Transforms and the Fast Fourier Transform (FFT)
Algorithm, Comp. Graph., 2, 15–463, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>13</label><mixed-citation>
Hemmert, K. S. and Underwood, K. D.: An analysis of the double-precision
floating-point FFT on FPGAs, Field-Programmable Custom Computing Machines,
2005, FCCM 2005, 13th Annual IEEE Symposium on IEEE, 171–180, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>14</label><mixed-citation>
Hill, C., DeLuca, C., Balaji, V., Suarez, M., and da Silva, A.: The
Architecture of the Earth System Modelling Framework, Comput. Sci. Eng., 6,
18–28, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>15</label><mixed-citation>
Hurrell, J. W., Holland, M. M., Gent, P. R., Ghan, S., Kay, J. E., Kushner,
P. J., Lamarque, J.-F., Large, W. G., Lawrence, D., Lindsay, K., Lipscomb, W.
H., Long, M. C., Mahowald, N., Marsh, D. R., Neale, R. B., Rasch, P., Vavrus,
S., Vertenstein, M., Bader, D., Collins, W. D., Hack, J. J., Kiehl, J., and
Marshall, S.: The Community Earth System Model: a framework for collaborative
research, B. Am. Meteorol. Soc., 94, 1339–1360, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>16</label><mixed-citation>
Hunke, E. C. and Lipscomb W. H.: CICE: the Los Alamos Sea Ice Model
Documentation and Software User's Manual 4.0, Technical Report LA-CC-06-012,
Los Alamos National Laboratory, T-3 Fluid Dynamics Group, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>17</label><mixed-citation>
Hunke, E. C., Lipscomb, W. H., Turner, A. K., Jeffery, N., and Elliott, S.:
CICE: the Los Alamos Sea Ice Model Documentation and Software User's Manual
Version 5.0, LA-CC-06-012, Los Alamos National Laboratory, Los Alamos NM,
87545, 115, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>18</label><mixed-citation>
Jacob, R., Larson, J., and Ong, E.: <i>M</i> × <i>N</i> Communication and Parallel
Interpolation in Community Climate System Model version 3 using the Model
Coupling Toolkit, Int. J. High Perform. C., 19, 293–307, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>19</label><mixed-citation>
Jan, B., Montrucchio, B., Ragusa, C., Khan, F. G., and Khan, O.:
Parallel butterfly sorting algorithm on gpu, Artificial Intelligence and Applications, Innsbruck, Austria, <a href="http://dx.doi.org/10.2316/P.2013.795-026" target="_blank">doi:10.2316/P.2013.795-026</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>20</label><mixed-citation>
Kerbyson, D. J. and Jones, P. W.: A performance model of the parallel ocean
program, Int. J. High Perform. C., 19, 261–276,
<a href="http://dx.doi.org/10.1177/1094342005056114" target="_blank">doi:10.1177/1094342005056114</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>21</label><mixed-citation>
Kim J., Dally W. J., and Abts D.: Flattened butterfly: A cost-efficient
topology for high-radix networks, ISCA, 35, 126–137, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>22</label><mixed-citation>
Li, L. J., Wang, B., Dong, L., Liu, L., Shen, S., Hu, N., Sun, W., Wang, Y.,
Huang, W., Shi, X., Pu, Y., and Yang, G.: Evaluation of Grid-point
Atmospheric Model of IAP LASG version 2 (GAMIL2), Advances in Atmospheric
Sciences, 30, 855–867, <a href="http://dx.doi.org/10.1007/s00376-013-2157-5" target="_blank">doi:10.1007/s00376-013-2157-5</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>23</label><mixed-citation>
Liu, L., Yang, G., Wang, B., Zhang, C., Li, R., Zhang, Z., Ji, Y., and Wang,
L.: C-Coupler1: a Chinese community coupler for Earth system modeling,
Geosci. Model Dev., 7, 2281–2302, <a href="http://dx.doi.org/10.5194/gmd-7-2281-2014" target="_blank">doi:10.5194/gmd-7-2281-2014</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>24</label><mixed-citation>
Morrison, H. and Gettelman, A.: A new two-moment bulk stratiform cloud
microphysics scheme in the Community Atmosphere Model, version 3 (CAM3). Part
I: Description and numerical tests, J. Climate, 21, 3642–3659,
<a href="http://dx.doi.org/10.1175/2008JCLI2105.1" target="_blank">doi:10.1175/2008JCLI2105.1</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>25</label><mixed-citation>
Neale, R. B., Richter, J. H., Conley, A. J., Park, S., Lauritzen, P. H.,
Gettelman, A., Williamson, D. L., Rasch, P. J., Vavrus, S. J., Taylor, M. A.,
Collins, W. D., Zhang, M., and Lin, S.: Description of the NCAR Community
Atmosphere Model (CAM 4.0), National Center for Atmospheric Research Ncar
Koha Opencat, TN-485+STR, 222 pp., 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>26</label><mixed-citation>
Neale, R. B., Chen, C. C., Gettelman, A., Lauritzen, P. H., Park, S.,
Williamson, D. L., Conley, A. J., Garcia, R., Kinnison, D., Lamarque, J. F.,
Marsh, D., Mills, M., Smith, A. K., Tilmes, S., Vitt, F., Morrison, H.,
Cameron-Smith, P., Collins, W. D., Iacono, M. J., Easter, R. C., Ghan, S. J.,
Liu, X., Rasch, P. J., and Taylor, M. A.: Description of the NCAR Community
Atmosphere Model (CAM 5.0), National Center for Atmospheric Research Ncar
Koha Opencat, TN-486+STR, 289 pp., 2012.

</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>27</label><mixed-citation>
Oleson, K. W., Dai, Y., Bonan, G., Bosilovich, M., Dickinson, R., Dirmeyer,
P., Hoffman, F., Houser, P., Levis, S., Niu, G. Y., Thornton, P.,
Vertenstein, M., Yang, Z. L., and Zeng, X.: Technical Description of the
Community Land Surface Model (CLM), National Center for Atmospheric Research
Ncar Koha Opencat, TN-461+STR, 186 pp., 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>28</label><mixed-citation>
Petagon, R. and Werapun, J.: Embedding the optimal all-to-all personalized
exchange on multistage interconnection networks + +  mathContainer Loading
Mathjax, J. Parallel Distr. Com., 88, 16–30, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>29</label><mixed-citation>
Redler, R., Valcke, S., and Ritzdorf, H.: OASIS4 – a coupling software for
next generation earth system modelling, Geosci. Model Dev., 3, 87–104,
<a href="http://dx.doi.org/10.5194/gmd-3-87-2010" target="_blank">doi:10.5194/gmd-3-87-2010</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>30</label><mixed-citation>
Smith, R., Jones, P., Briegleb, B., Bryan, F., Danabasoglu, G., Dennis, J.,
Dukowicz, J., Eden, C., Fox-Kemper, B., Gent, P., Hecht, M., Jayne, S.,
Jochum, M., Large, W., Lindsay, K., Maltrud, M., Norton, N., Peacock, S.,
Vertenstein, M., and Yeager, S.: The Parallel Ocean Program (POP) reference
manual ocean component of the Community Climate System Model (CCSM) and
Community Earth System Model (CESM), Los Alamos National Laboratory,
LAUR-10-01853, available at:
<a href="http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/sci/POPRefManual.pdf" target="_blank">http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/sci/POPRefManual.pdf</a>
(last access: 15 October 2015), 141 pp., 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>31</label><mixed-citation>
Valcke, S., Balaji, V., Craig, A., DeLuca, C., Dunlap, R., Ford, R. W.,
Jacob, R., Larson, J., O'Kuinghttons, R., Riley, G. D., and Vertenstein, M.:
Coupling technologies for Earth System Modelling, Geosci. Model Dev., 5,
1589–1596, <a href="http://dx.doi.org/10.5194/gmd-5-1589-2012" target="_blank">doi:10.5194/gmd-5-1589-2012</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>32</label><mixed-citation>
Valcke, S.: The OASIS3 coupler: a European climate modelling community
software, Geosci. Model Dev., 6, 373–388, <a href="http://dx.doi.org/10.5194/gmd-6-373-2013" target="_blank">doi:10.5194/gmd-6-373-2013</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>33</label><mixed-citation>
Valcke, S., Craig, T., and Coquart, L.: OASIS3-MCT User Guide,
OASIS3-MCT_3.0, Technical Report TR/CMGC/15/38, Cerfacs, France, available
at:
<a href="http://www.cerfacs.fr/oa4web/oasis3-mct_3.0/oasis3mct_UserGuide.pdf" target="_blank">http://www.cerfacs.fr/oa4web/oasis3-mct_3.0/oasis3mct_UserGuide.pdf</a> (last access: 7 June 2016),
2015.
</mixed-citation></ref-html>--></article>
