<?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?><?xmltex \bartext{}?>
  <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-731-2016</article-id><title-group><article-title>Bitwise identical compiling setup: prospective for reproducibility and
reliability of Earth system modeling</article-title>
      </title-group><?xmltex \runningtitle{Bitwise identical compiling setup}?><?xmltex \runningauthor{R.~Li et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2">
          <name><surname>Li</surname><given-names>R.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff3">
          <name><surname>Liu</surname><given-names>L.</given-names></name>
          <email>liuli-cess@tsinghua.edu.cn</email>
        </contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff2 aff3">
          <name><surname>Yang</surname><given-names>G.</given-names></name>
          <email>ygw@tsinghua.edu.cn</email>
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2">
          <name><surname>Zhang</surname><given-names>C.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff3 aff4">
          <name><surname>Wang</surname><given-names>B.</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 Modeling 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">L. Liu (liuli-cess@tsinghua.edu.cn) and  G. Yang
(ygw@tsinghua.edu.cn)</corresp></author-notes><pub-date><day>19</day><month>February</month><year>2016</year></pub-date>
      
      <volume>9</volume>
      <issue>2</issue>
      <fpage>731</fpage><lpage>748</lpage>
      <history>
        <date date-type="received"><day>19</day><month>September</month><year>2015</year></date>
           <date date-type="rev-request"><day>10</day><month>November</month><year>2015</year></date>
           <date date-type="rev-recd"><day>18</day><month>January</month><year>2016</year></date>
           <date date-type="accepted"><day>2</day><month>February</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/731/2016/gmd-9-731-2016.html">This article is available from https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016.html</self-uri>
<self-uri xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016.pdf</self-uri>


      <abstract>
    <p>Reproducibility and reliability are fundamental principles of scientific
research. A compiling setup that includes a specific compiler version and
compiler flags is an essential technical support for Earth system modeling.
With the fast development of computer software and hardware, a compiling
setup has to be updated frequently, which challenges the reproducibility and
reliability of Earth system modeling. The existing results of a simulation
using an original compiling setup may be irreproducible by a newer compiling
setup because trivial round-off errors introduced by the change in compiling
setup can potentially trigger significant changes in simulation results.
Regarding the reliability, a compiler with millions of lines of code may
have bugs that are easily overlooked due to the uncertainties or unknowns in
Earth system modeling. To address these challenges, this study shows that
different compiling setups can achieve exactly the same (bitwise identical)
results in Earth system modeling, and a set of bitwise identical compiling
setups of a model can be used across different compiler versions and
different compiler flags. As a result, the original results can be more
easily reproduced; for example, the original results with an older compiler
version can be reproduced exactly with a newer compiler version. Moreover,
this study shows that new test cases can be generated based on the
differences of bitwise identical compiling setups between different models,
which can help detect software bugs in the codes of models and compilers and
finally improve the reliability of Earth system modeling.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <title>Introduction</title>
      <p>Earth system modeling simulates interactions between components of the
climate system (e.g., atmosphere, oceans, land surface, sea ice). It
plays a critical role in understanding the past and present climate, and in
predicting future climate. An increasing number of models have sprung up all
over the world, including stand-alone component models and coupled models
consisting of multiple component models, such as climate system models
(CSMs) and Earth system models (ESMs).</p>
      <p>The development of models for Earth system modeling heavily depends on the
advancement of computer supports, not only in terms of hardware (such as
high-performance computers) but also in terms of software such as compiling
setups that include compiler versions and compiler flags. During the
continuous evolution of the models, the compiling setups have to be updated
frequently for the compatibility of newer high-performance computers with
new processors and for better computing performance.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1" specific-use="star"><caption><p>Compiler families used for Earth system modeling. They are from the
supported compiler lists of several ESMs.
</p></caption><oasis:table frame="topbot"><?xmltex \begin{scaleboxenv}{.85}[.85]?><oasis:tgroup cols="4">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">Compiler family</oasis:entry>  
         <oasis:entry colname="col2">Free or commercial</oasis:entry>  
         <oasis:entry colname="col3">Supported hardware platforms</oasis:entry>  
         <oasis:entry colname="col4">Supported programming languages</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">GNU</oasis:entry>  
         <oasis:entry colname="col2">Free</oasis:entry>  
         <oasis:entry colname="col3">Almost all common platforms</oasis:entry>  
         <oasis:entry colname="col4">Fortran, C, C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula>, etc.</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">Intel</oasis:entry>  
         <oasis:entry colname="col2">Commercial</oasis:entry>  
         <oasis:entry colname="col3">x86 and x86-64bit architectures</oasis:entry>  
         <oasis:entry colname="col4">Fortran, C, C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">PGI</oasis:entry>  
         <oasis:entry colname="col2">Commerical</oasis:entry>  
         <oasis:entry colname="col3">x86, x86-64bit, CUDA, and ARM architectures</oasis:entry>  
         <oasis:entry colname="col4">Fortran, C, C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">Lahey</oasis:entry>  
         <oasis:entry colname="col2">Commercial</oasis:entry>  
         <oasis:entry colname="col3">x86 and x86-64bit architectures</oasis:entry>  
         <oasis:entry colname="col4">Fortran</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">PathScale EKOPath</oasis:entry>  
         <oasis:entry colname="col2">Commercial</oasis:entry>  
         <oasis:entry colname="col3">x86 and x86-64bit architectures</oasis:entry>  
         <oasis:entry colname="col4">Fortran, C, C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">Cray</oasis:entry>  
         <oasis:entry colname="col2">Commercial</oasis:entry>  
         <oasis:entry colname="col3">Cray supercomputer series (x86, x86-64bit, and CUDA architectures)</oasis:entry>  
         <oasis:entry colname="col4">Fortran, C, C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup><?xmltex \end{scaleboxenv}?></oasis:table></table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T2"><caption><p>Five latest versions of the Intel compilers.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">Compiler version</oasis:entry>  
         <oasis:entry colname="col2">Release date</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">11.1</oasis:entry>  
         <oasis:entry colname="col2">23 June 2009</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">12.1</oasis:entry>  
         <oasis:entry colname="col2">8 September 2011</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">13.0</oasis:entry>  
         <oasis:entry colname="col2">5 September 2012</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">14.0.1</oasis:entry>  
         <oasis:entry colname="col2">18 October 2013</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">15.0.1</oasis:entry>  
         <oasis:entry colname="col2">30 October 2014</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p>One may think it is easy to update compiling setups, just by installing new
compiler version or changing compiler flags. However, it is challenging to
update compiling setups for Earth system modeling, because researchers may
get significantly different results from the same experiment when using
different compiling setups (Liu et al., 2015b). A compiler not only
translates the code in a high-level programming language to a low-level
language but also tries to improve computational performance of the codes
with compiler optimization schemes. Compilers from different families (for
example, those in Table 1) and different versions from the same compiler
family generally differ in performance optimization schemes as well as the
corresponding implementations. On the other hand, different compiler flags
of the same compiler version enable and disable different sets of
performance optimization schemes. That is why different compiling setups can
lead to different results of the same program. The updating of compiling
setups therefore will introduce at least two challenges to Earth system
modeling. The first challenge concerns reproducibility of simulation
results. Due to the chaotic nature of the climate system, more and more
studies have shown that trivial round-off errors can trigger significant
changes in simulation results of Earth system modeling (Hong et al., 2013;
Liu et al., 2015b; Song et al., 2012). Due to the differences of performance
optimization schemes among different compiling setups, a change of compiling
setups potentially introduces round-off errors. As a result, the results of
a simulation obtained with a compiling setup may be irreproducible by
another compiling setup.</p>
      <p>The second challenge is the reliability of the simulation results. Compilers
are large-scale programs with millions of lines of code. It is well
understood that with more lines of code there are more potential bugs in the
program. Therefore, although there is generally a large amount of software
testing before releasing a compiler version, there still can be unknown
bugs. Models for Earth system modeling are also large-scale numerical
programs with more and more lines of code (Easterbrook and Johns, 2009).
There are already ESMs with nearly one million lines of codes (Alexander and
Easterbrook, 2015). Therefore, it is possible that some bugs in a compiler
version may be triggered by some code segments in a model.</p>
      <p>In response to these challenges, several issues about compiling setups
should be investigated:
<list list-type="order"><list-item><p>Can different compiling setups achieve the same (bitwise identical)
simulation results? If yes, it will be much easier to reproduce previous
simulation results.</p></list-item><list-item><p>How can compiler flags be selected to compile the codes of a model. Since
a compiler version always contains many performance optimization schemes,
there are several choices of compiler flags.</p></list-item><list-item><p>How to determine whether compiler bugs are triggered in a model simulation.
If compiler bugs can be detected, researchers can modify the code to avoid
the compiler bugs or select a <italic>safer</italic> compiling setup. Compiler bugs are
very difficult to detect, especially when they do not lead to a crash of the
simulation. There are many uncertainties and unknowns in Earth system
modeling, so compiler bugs can easily be overlooked due to these
uncertainties or unknowns.</p></list-item></list></p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T3" specific-use="star"><caption><p>Intel compiler optimization options that may impact the precision
of floating-point calculation. They are common to the compiler versions
listed in Table 2.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="justify" colwidth="284.527559pt"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">Compiler optimization option</oasis:entry>  
         <oasis:entry colname="col2">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-fp-model [fast<inline-formula><mml:math display="inline"><mml:mo>|</mml:mo></mml:math></inline-formula>precise<inline-formula><mml:math display="inline"><mml:mo>|</mml:mo></mml:math></inline-formula>strict] [source]</oasis:entry>  
         <oasis:entry colname="col2">Controls the semantics of floating-point calculations: <?xmltex \hack{\hfill\break}?>fast: enables more aggressive optimizations on floating-point data. <?xmltex \hack{\hfill\break}?>precise: enables value-safe optimizations on floating-point data. <?xmltex \hack{\hfill\break}?>strict: enables precise and except, disables contractions, and enables pragma stdc fenv_access. <?xmltex \hack{\hfill\break}?>Source: rounds intermediate results to source-defined precision and enables value-safe optimizations.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-fp-speculation fast<inline-formula><mml:math display="inline"><mml:mo>|</mml:mo></mml:math></inline-formula>safe<inline-formula><mml:math display="inline"><mml:mo>|</mml:mo></mml:math></inline-formula>strict</oasis:entry>  
         <oasis:entry colname="col2">Tells the compiler the mode in which to speculate on floating-point operations. <?xmltex \hack{\hfill\break}?>fast: tells the compiler to speculate on floating-point operations. <?xmltex \hack{\hfill\break}?>safe: tells the compiler to disable speculation if there is a possibility that the speculation may cause a floating-point exception. <?xmltex \hack{\hfill\break}?>strict: tells the compiler to disable speculation on floating-point operations.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-mp1</oasis:entry>  
         <oasis:entry colname="col2">Improves floating-point precision and consistency.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-[no-]vec</oasis:entry>  
         <oasis:entry colname="col2">Enables or disables vectorization.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-[no-]simd</oasis:entry>  
         <oasis:entry colname="col2">Enables or disables the SIMD (Single instruction, multiple data) vectorization feature of the compiler.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-[no-]fp-port</oasis:entry>  
         <oasis:entry colname="col2">Rounds floating-point results after floating-point operations.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-[no-]ftz</oasis:entry>  
         <oasis:entry colname="col2">Flushes denormal results to zero.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-pc[n]</oasis:entry>  
         <oasis:entry colname="col2">Enables control of floating-point significant precision.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-[no-]prec-div</oasis:entry>  
         <oasis:entry colname="col2">Improves precision of floating-point divides.</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">-[no-]prec-sqrt</oasis:entry>  
         <oasis:entry colname="col2">Improves precision of square root implementations.</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T4"><caption><p>Five latest versions of the GCC compilers. The release date of a
given compiler version in the table is the release date of its latest
revision version.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">Compiler version</oasis:entry>  
         <oasis:entry colname="col2">Release date</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">4.6.4</oasis:entry>  
         <oasis:entry colname="col2">12 April 2013</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">4.7.4</oasis:entry>  
         <oasis:entry colname="col2">13 April 2013</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">4.8.5</oasis:entry>  
         <oasis:entry colname="col2">23 June 2015</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">4.9.3</oasis:entry>  
         <oasis:entry colname="col2">26 June 2015</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">5.1</oasis:entry>  
         <oasis:entry colname="col2">22 April 2015</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T5" specific-use="star"><caption><p>GCC compiler optimization options that may impact the precision of
floating-point calculation. They are common to the compiler versions listed
in Table 4.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="justify" colwidth="284.527559pt"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">Compiler flag</oasis:entry>  
         <oasis:entry colname="col2">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-ffloat-store</oasis:entry>  
         <oasis:entry colname="col2">Do not store floating-point variables in registers, and inhibit other options that might change whether a floating-point value is taken from a register or memory.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-ffast-math</oasis:entry>  
         <oasis:entry colname="col2">Sets -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans and -fcx-limited-range.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-f[no-]unsafe-math-optimizations</oasis:entry>  
         <oasis:entry colname="col2">Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid and (b) may violate IEEE or ANSI standards. When used at link-time, it may include libraries or startup files that change the default FPU control word or other similar optimizations.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-f[no-]associative-math</oasis:entry>  
         <oasis:entry colname="col2">Allow re-association of operands in series of floating-point operations.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-f[no-]reciprocal-math</oasis:entry>  
         <oasis:entry colname="col2">Allow the reciprocal of a value to be used instead of dividing by the value if this enables optimizations.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-f[no-]finite-math-only</oasis:entry>  
         <oasis:entry colname="col2">Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or <inline-formula><mml:math display="inline"><mml:mo>±</mml:mo></mml:math></inline-formula> Infs.</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">-f[no-]rounding-math</oasis:entry>  
         <oasis:entry colname="col2">Disable transformations and optimizations that assume default floating-point rounding behavior.</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">-f[no-]cx-limited-range</oasis:entry>  
         <oasis:entry colname="col2">When enabled, this option states that a range reduction step is not needed when performing complex division. Also, there is no checking whether the result of a complex multiplication or division is “NaN <inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula> I*NaN”, with an attempt to rescue the situation in that case.</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p>There are already efforts for the abovementioned issues. It has been
demonstrated that with a certain compiler flag, different compiler versions
can achieve bitwise identical simulation results for a given model (Liu et
al., 2015a). But it is still not known whether compiling setups with the
same compiler version but different compiler flags can achieve bitwise
identical simulation results. In this paper, we call the compiling setups
that can achieve bitwise identical simulation results <italic>bitwise identical compiling setups</italic>. It is also unknown whether the bitwise identical
compiling setups of one model are appropriate for another model. Baker et al. (2015) proposed a new ensemble-based consistency test for the Community
Earth System Model (CESM; Hurrell et al., 2013). It can effectively verify
whether two compiling setups can achieve consistent simulation results,
especially when they do not achieve bitwise identical simulation results.
However, we cannot be sure whether a compiling setup is right or wrong. In
other words, it cannot help detect compiler bugs. As a result, it is
possible that a compiling setup with compiler bugs has been used for the
development of a model for a number of years, while a new compiling setup
with bug fixes cannot be used for the model development due to the failure
in consistency tests.</p>
      <p>The results in this paper show that the bitwise identical compiling setup
sets of a model can extend to different compiler versions and different
compiler flags. They can facilitate the reproduction of original simulation
results, assist researchers to determine the compiler flags for model
simulations, help researchers build more test cases to detect bugs in models
and compilers, and finally improve the reproducibility and reliability of
Earth system modeling.</p>
      <p>The rest of this paper is organized as follows. Section 2 briefly introduces
compiler optimizations. Section 3 shows the bitwise identical compiling
setups of three models. Section 4 uses examples to show what can be learned
from the comparison of bitwise identical compiling setups between different
models. We conclude this paper with discussion in Sect. 5.</p>
</sec>
<sec id="Ch1.S2">
  <title>Brief introduction to compiler optimizations</title>
      <p>Models for Earth system modeling are generally programmed in languages such
as Fortran, C, and C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula>. A number of compilers have been used for Earth
system modeling, such as the compiler families listed in Table 1. In the
following context, we further introduce the Intel compiler family and GNU
Compiler Collection (GCC) with details.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T6" specific-use="star"><caption><p>Intel compiler flags that are based on the compiler optimization
options given in Table 3. The first compiler flag is the strictest one
(which limits compiler optimizations most significantly), while every other
compiler flag is derived from the first one through changing only one
compiler optimization option.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">No.</oasis:entry>  
         <oasis:entry colname="col2">Compiler flag</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">1</oasis:entry>  
         <oasis:entry colname="col2">-fp-model strict -fp-speculation=strict -mp1 -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2</oasis:entry>  
         <oasis:entry colname="col2">-fp-model precise -fp-speculation=strict -mp1 -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">3</oasis:entry>  
         <oasis:entry colname="col2">-fp-model fast -fp-speculation=strict -mp1 -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">4</oasis:entry>  
         <oasis:entry colname="col2">-fp-model source -fp-speculation=strict -mp1 -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">5</oasis:entry>  
         <oasis:entry colname="col2">-fp-model strict -fp-speculation=safe -mp1 -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">6</oasis:entry>  
         <oasis:entry colname="col2">-fp-model strict -fp-speculation=fast -mp1 -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">7</oasis:entry>  
         <oasis:entry colname="col2">-fp-model strict -fp-speculation=strict -no-vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">8</oasis:entry>  
         <oasis:entry colname="col2">-fp-model strict -fp-speculation=strict -mp1 -vec -no-simd</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">9</oasis:entry>  
         <oasis:entry colname="col2">-fp-model strict -fp-speculation=strict -mp1 -no-vec -simd</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T7" specific-use="star"><caption><p>GCC compiler flags that are based on the compiler optimization
options listed in Table 5. The first compiler flag is the strictest one
(which limits compiler optimizations most significantly), while every other
compiler flag is derived from the first one through changing only one
compiler optimization option.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="justify" colwidth="455.244094pt"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">No.</oasis:entry>  
         <oasis:entry colname="col2">Compiler flag</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">1</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -fno-unsafe-math-optimizations -fno-associative-math -fno-reciprocal-math -fno-finite-math-only -fno-rounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">2</oasis:entry>  
         <oasis:entry colname="col2">-fno-unsafe-math-optimizations -fno-associative-math -fno-reciprocal-math -fno-finite-math-only -fno-rounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">3</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -funsafe-math-optimizations -fno-associative-math -fno-reciprocal-math -fno-finite-math-only -fno-rounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">4</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -fno-unsafe-math-optimizations -fassociative-math -fno-reciprocal-math -fno-finite-math-only -fno-rounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">5</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -fno-unsafe-math-optimizations -fno-associative-math -freciprocal-math -fno-finite-math-only -fno-rounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">6</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -fno-unsafe-math-optimizations -fno-associative-math -fno-reciprocal-math -ffinite-math-only -fno-rounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">7</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -fno-unsafe-math-optimizations -fno-associative-math -fno-reciprocal-math -fno-finite-math-only -frounding-math -fno-cx-limited-range</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">8</oasis:entry>  
         <oasis:entry colname="col2">-ffloat-store -fno-unsafe-math-optimizations -fno-associative-math -fno-reciprocal-math -fno-finite-math-only -fno-rounding-math -fcx-limited-range</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p>The Intel compiler family, which is developed by the Intel Corporation, is a
commercial software product. It has been widely used for Earth system
modeling, because most of the high-performance computers for Earth system
modeling are equipped with the CPUs manufactured by the Intel Corporation.
Table 2 shows the five latest Intel compiler versions (from version 11.1
released in 2009 to version 15.0.1 released in 2014). For each compiler
version, there are many compiler optimization options. Table 3 shows several
compiler optimization options that may impact the precision of
floating-point calculation. They are common to all compiler versions listed
in Table 2. For a compiler flag such as “-fp-model”, there may be multiple
selections of the values.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T8" specific-use="star"><caption><p>Simulation results of CAM5 with various compiling setups of Intel
compilers. The compiler flags are given in Table 6. Each color represents a
bitwise identical result except for the white. A simulation result that
emerges only once is in white color with a unique number.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t08.pdf"/>
</table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T9" specific-use="star"><caption><p>Similar to Table 8 except for the simulation results of POP2. Each
table cell with “–” means that the compilation of POP2 fails under the
corresponding compiling setup, due to issue DPD200178252 of Intel compilers
(<uri>https://software.intel.com/en-us/articles/intel-composer-xe-2013-compilers-fixes-list)</uri>.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t09.pdf"/>
</table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T10" specific-use="star"><caption><p>Similar to Table 8 except for the simulation results of FGOALS-g2.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t10.pdf"/>
</table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T11" specific-use="star"><caption><p>Simulation results of CAM5 with various compiling setups of GCC
compilers. The compiler flags are given in Table 7. Each color represents a
bitwise identical result except the white. A simulation result that emerges
only once is in white color with a unique number.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t11.pdf"/>
</table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T12" specific-use="star"><caption><p>Similar to Table 11 except for the simulation results of POP2.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t12.pdf"/>
</table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T13" specific-use="star"><caption><p>Similar to Table 11 except for the simulation results of
FGOALS-g2. FGOALS-g2 has not been compiled using the GCC compilers for
simulation runs before. Therefore, a large proportion of simulation runs are
failed (marked with “–” in the table). For example, crashes or deadlocks
are encountered under compiler optimization levels O1 to O3.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t13.pdf"/>
</table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T14" specific-use="star"><caption><p>Ideal bitwise identical compiling setup sets of the three models
when using Intel compilers. Each color except the white corresponds to an
ideal bitwise compiling setup set.</p></caption>
  <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-t14.pdf"/>
</table-wrap>

      <p>GCC is the most widely used free compiler family in the world. Table 4 shows
the five latest GCC versions (from version 4.6.4 released in 2013 to version
5.1 released in 2015). For each compiler version, there are also many
compiler optimization options. Similar to Table 3, the compiler optimization
options in Table 5 may impact the precision of floating-point calculation
and are common to all GCC versions listed in Table 4.</p>
</sec>
<sec id="Ch1.S3">
  <title>Bitwise identical compiling setups</title>
      <p>In this study, we use three models, namely, Community
Atmosphere Model version 5 (CAM5) (Neale et al., 2010), Parallel Ocean Program version 2 (POP2)
(Smith et al., 2010), and Flexible Global Ocean-
Atmosphere-Land System Model: Grid-point version 2 (FGOALS-g2) (Li et al., 2013a). To obtain bitwise
identical compiling setups of a given model, we should first design various
compiling setups and then run the model using each of them. In this section,
we will briefly introduce the three models, the compiling setups and the
bitwise identical compiling setups of each model.</p>
<sec id="Ch1.S3.SS1">
  <title>Models and simulations</title>
      <p>The version of CAM5 used in this study is CAM5.3. It is released as the
atmosphere component of the CESM version 1.2 (CESM1.2). It contains more
than 550 000 lines of source code mainly programmed in Fortran. It can be
used as a standalone model or the atmospheric component of CESM1.2. In this
study, we use CAM5.3 as a standalone model. CAM5.3 supports different
dynamic cores and different resolutions. To run the standalone CAM5.3, we
use the default setting (details can be found at <uri>http://www.cesm.ucar.edu/models/cesm1.2/cam/docs/ug5_3/ug.html</uri>), where the dynamic core is finite volume and the resolution of
the horizontal grid is 1.9<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.5<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>.</p>
      <p>POP2 used in this study is the ocean component of CESM1.2. It is based on
the POP version 2.1 of the Los Alamos National Laboratory. It contains more
than 170 000 lines of source code mainly programmed in Fortran. To run POP2
as a standalone model, we use the component set <italic>C_NORMAL_YEAR</italic> of CESM1.2, which uses
POP2 as the ocean component and the other components as data models. The
horizontal grid selected is marked as <italic>T62_gx1v6</italic>, while the other settings of the
simulation are default.</p>
      <p>FGOALS-g2 is a fully coupled CSM consisting of the atmosphere model the Grid-point Atmospheric Model of IAP LASG version 2 (GAMIL2)
(Li et al., 2013b), ocean model LASG/IAP Climate System Ocean Model Version 2 (LICOM2) (Liu et al., 2004), land surface
model Community Land Model Version 3 (CLM3) (Oleson et al., 2004), and an improved version (Wang et al.,
2009; Liu, 2010) of the sea ice model Los Alamos Sea Ice Model version 4 (CICE4) (<uri>http://oceans11.lanl.gov/trac/CICE</uri>). It participated in the Coupled
Model Intercomparison Project Phase 5 (CMIP5) and is widely used for
scientific research. It contains about 240 000 lines of source code mainly
programmed in Fortran. GAMIL2 and CLM3 use the same horizontal grid, whose
resolution is about 2.8<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>, while LICOM2 and CICE4 uses the same
horizontal grid, whose resolution is about 1<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>. To run FGOALS-g2,
we use the CMIP5 pre-industry control (pi-Control) experiment setup.</p>
      <p>All simulations of the models are run on the same high-performance computer
named Tansuo100 at Tsinghua University in China, which consists of more than
700 computing nodes, each of which consists of two Intel Xeon 5670 6-core
CPUs sharing 32 GB main memory. Specifically, we use 16, 16, and 17 processes
to run CAM5.3, POP2, and FGOALS-g2, respectively.</p>
</sec>
<sec id="Ch1.S3.SS2">
  <title>Compiling setups</title>
      <p>By combining different settings of different compiler optimization options
listed in Table 3, there are more than 4000 possible compiler flags.
Considering there are four major optimization levels (O0-O3) in an Intel
compiler version, there are more than 16 000 possible compiler flags for an
Intel compiler version. Similarly, there are more than 1000 possible
compiler flags for a GCC compiler version.
<?xmltex \hack{\newline}?>
It is impractical for us to investigate all compiling setups. We decided to
use five Intel compiler versions (versions 11.1, 12.1, 13.0, 14.0.1, and
15.0.1) and five GCC compilers versions (versions 4.6.4, 4.7.4, 4.8.5,
4.9.3, and 5.1) for this study, and take into consideration four
optimization levels (O0-O3). For a compiler version at an optimization
level, we selected a small number of compiler flags (Table 6 for the Intel
compilers and Table 7 for the GCC compilers).</p>
</sec>
<sec id="Ch1.S3.SS3">
  <title>Bitwise identical compiling setups of models</title>
      <p>To obtain the bitwise identical compiling setups of a model (CAM5, POP2, or
FGOALS-g2), we use each compiling setup (in Sect. 3.2) to compile the
model code and then run the corresponding model simulation. A short
integration is enough to check bitwise identity of simulation results
(Easterbrook and Johns, 2009). In detail, we use five model days for each
simulation and use the binary formatted data file of daily output of fields
for bitwise identical comparison. Tables 8–10 show the bitwise identical
compiling setups of a model when using the Intel compiler versions, while
Tables 11–13 correspond to the GNU compiler versions. In each table, the
compiling setups corresponding to the same color (except for white) of
simulation results constitute a bitwise identical compiling setup set of the
same model. There is no bitwise identical compiling setup set across the two
compiler families.</p>
      <p>Given the Intel compiler versions, we can see that there is no bitwise
identical compiling setup set between version 11 and any other version.
This is because version 11 and the subsequent versions use different
default instructions to generate the binary code (<uri>https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/281713</uri>),
which produces different bitwise results
(<uri>https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/279705</uri>).</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <title>Comparison of bitwise identical compiling setup sets between models</title>
      <p>From Tables 8–10 (or Tables 11–13), we can find that, given the same
compiler family, bitwise identical compiling setup sets of different models
are obviously different. What causes such differences and what can we learn
from the differences? To answer these questions, we take the compiling
setups of Intel compilers as an example. Based on the results in Tables 8–10, we can generate ideal bitwise identical compiling setup sets (Table 14),
following the criterion that if any model achieves bitwise identical
results with two different compiling setups, these compiling setups belong
to the same ideal bitwise identical compiling setup set. Through comparing
Tables 8–10 to  14, we can pose a number of questions; for example,
<list list-type="order"><list-item><p>Regarding all Intel compiler versions, given compiler flag 2 (or 4), why
does CAM5 obtain different simulation results when changing compiler
optimization level from O0 (or O1) to O2 (or O3)?</p></list-item><list-item><p>Regarding Intel compiler version 13, why does POP2 obtain different
simulation results when changing the compiler optimization level from O3 to
another level?</p></list-item><list-item><p>Regarding Intel compiler version 12, given optimization level O2, why does
POP2 obtain different simulation results when changing the compiler flag
from 2 (or 3) to 1?
<?xmltex \hack{\newpage}?></p></list-item><list-item><p>Regarding Intel compiler version 13, given optimization level O3, why does
POP2 obtain different simulation results when changing the compiler flag
from 8 (or 9) to 1?</p></list-item><list-item><p>Regarding Intel compiler versions 13, 14, and 15, why does POP2 obtain the
bitwise identical results when changing the compiler flag from 1 to 2 (or
4), but CAM5 and FGOALS-g2 do not?</p></list-item></list></p>
      <p>Next, we search for answers to the first two questions, namely, what causes
such differences and what can we learn from the differences.
<?xmltex \hack{\newpage}?></p>
<sec id="Ch1.S4.SS1">
  <title>Methodology</title>
      <p>If a code segment can trigger different compiler optimizations under
different compiling setups, it may lead to different results in different
compiling setups. In the rest of this paper, we call this kind of a code
segment <italic>a compilation-sensitive code segment</italic> and call a code file with
compilation-sensitive code segments <italic>a compilation-sensitive code file</italic>. A
model for Earth system modeling generally contains a large number of code
segments. To reveal why a model does not achieve bitwise identical results
in two different compiling setups, a straightforward way is to find out all
compilation-sensitive code segments for further analysis. Given two
compiling setups (donated as <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> that do not achieve bitwise
identical results for a simulation, we propose three stages for the
detection of compilation-sensitive code segments:
<list list-type="order"><list-item><p>Detect the compilation-sensitive code files. A model generally contains a
number of source code files. In the compiling process of a model, we can use
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile a portion of source code files while use <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile
the remaining source code files if the object files can be linked together.
For example, at the first step, we can using <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile all source code
files and then run a simulation to generate a reference result. At the
second step, we can divide the source code files into two parts, each of
which takes about a half, and then use different compiling setups to compile
the two parts (use <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile the first part and use <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to
compile the second part, or use <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile the first part and use
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile the second part). If the result from the same simulation
is not bitwise identical with the reference result, the part that is
compiled with <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> should contain compilation-sensitive code files, and
next we will recursively detect compilation-sensitive code files in that
part.</p></list-item><list-item><p>Detect compilation-sensitive code segments in a compilation-sensitive code
file. We propose to log (in binary format) and then bit-to-bit match the
values of the input variables and output variables of each code segment in
the two compiling setups (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. A code segment with bitwise
identical inputs but different outputs is a compilation-sensitive code
segment. The size of a compilation-sensitive code segment should be as small
as possible, in order to facilitate further analysis. For a source file
containing many lines of code, we can either divide it into several new
files of smaller size and then repeat the first and second stages for these
new files, or into several big code segments at the first step and then
recursively repeat the second stage for the code segments that are
compilation-sensitive. The size of a code segment cannot be too small
because the function calls for logging the values of variables may result in
changes to compiler optimizations so as to change simulation results. In
other words, the splitting of a code file or the inserting of the functions
for logging values must keep bitwise simulation results.</p></list-item><list-item><p>Analyze why a code segment is sensitive. In this stage, we should read the
code to check whether there are bugs. Sometimes, it is necessary to compare
the differences of assembly codes of the code segment under the two
compiling setups.</p></list-item></list>
Researchers may have to conduct the second and third stages manually.
However, for the first stage, we designed and implemented a software tool
named CoSFiD, which stands for Compilation-Sensitive code File Detection
tool; it can automatically detect compilation-sensitive code files (Sect. 4.2).</p>
</sec>
<sec id="Ch1.S4.SS2">
  <title>The CoSFiD</title>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><caption><p>Flowchart of CoSFiD for detecting compilation-sensitive code
files. In each iteration, CoSFiD first checks whether it is necessary to
generate a new hybrid compilation scheme (some code files are compiled with
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and the remaining code files are compiled with <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. If
unnecessary, which means the whole process of the detection should end,
CoSFiD will output all compilation-sensitive code files. Otherwise, CoSFiD
generates a new hybrid compilation scheme, and then calls the corresponding
rule to compile the model code using the compiler wrapper and run the
simulation. If it is the first run of the simulation, which also means all
code files are compiled with <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, the simulation result will be recorded
as the reference result. Otherwise, CoSFiD calls the corresponding rule to
compare the simulation result to the reference result and then uses the
conclusion to drive the next iteration.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-f01.png"/>

        </fig>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T15" specific-use="star"><caption><p>Examples of different results of the calculation at line 330 of
Fig. 2 when changing the compiler optimization level from <italic>O1</italic> to
<italic>O2</italic>. The input of the calculation is the same (bitwise identical) at
both compiler optimization levels. The different digits in the results are
highlighted in bold.</p></caption><oasis:table frame="topbot"><?xmltex \begin{scaleboxenv}{.9}[.9]?><oasis:tgroup cols="6">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:colspec colnum="6" colname="col6" align="right"/>
     <oasis:thead>
       <oasis:row>  
         <oasis:entry namest="col1" nameend="col3" align="center">Variables </oasis:entry>  
         <oasis:entry rowsep="1" namest="col4" nameend="col6" align="center">Example </oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry namest="col1" nameend="col3" align="center"/>  
         <oasis:entry colname="col4">No. 1</oasis:entry>  
         <oasis:entry colname="col5">No. 2</oasis:entry>  
         <oasis:entry colname="col6">No. 3</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">Input</oasis:entry>  
         <oasis:entry namest="col2" nameend="col3">k </oasis:entry>  
         <oasis:entry colname="col4">2</oasis:entry>  
         <oasis:entry colname="col5">3</oasis:entry>  
         <oasis:entry colname="col6">3</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">i </oasis:entry>  
         <oasis:entry colname="col4">9</oasis:entry>  
         <oasis:entry colname="col5">1</oasis:entry>  
         <oasis:entry colname="col6">5</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">ipair </oasis:entry>  
         <oasis:entry colname="col4">1</oasis:entry>  
         <oasis:entry colname="col5">1</oasis:entry>  
         <oasis:entry colname="col6">1</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">dryvol_t_new(ipair,i,k) </oasis:entry>  
         <oasis:entry colname="col4">1.245177471001780E-013</oasis:entry>  
         <oasis:entry colname="col5">1.367964902074264E-013</oasis:entry>  
         <oasis:entry colname="col6">1.362619492656580E-013</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">num_t_oldbnd(ipair,i,k) </oasis:entry>  
         <oasis:entry colname="col4">660367763.850537</oasis:entry>  
         <oasis:entry colname="col5">673856916.583178</oasis:entry>  
         <oasis:entry colname="col6">665467981.351062</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">factoraa(mfrm) </oasis:entry>  
         <oasis:entry colname="col4">1.41486733199200</oasis:entry>  
         <oasis:entry colname="col5">1.41486733199200</oasis:entry>  
         <oasis:entry colname="col6">1.41486733199200</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">Output</oasis:entry>  
         <oasis:entry colname="col2">dgn_t_new(ipair,i,k)</oasis:entry>  
         <oasis:entry colname="col3">optimization level O1</oasis:entry>  
         <oasis:entry colname="col4">5.10790984634749<bold>8</bold>E-008</oasis:entry>  
         <oasis:entry colname="col5">5.23516669843076<bold>6</bold>E-008</oasis:entry>  
         <oasis:entry colname="col6">5.250216806732<bold>902</bold>E-008</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">optimization level O2</oasis:entry>  
         <oasis:entry colname="col4">5.10790984634749<bold>2</bold>E-008</oasis:entry>  
         <oasis:entry colname="col5">5.23516669843076<bold>2</bold>E-008</oasis:entry>  
         <oasis:entry colname="col6">5.250216806732<bold>898</bold>E-008</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup><?xmltex \end{scaleboxenv}?></oasis:table></table-wrap>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T16" specific-use="star"><caption><p>Assembly codes of the calculation at line 330 in Fig. 2 in two
compiler optimization levels (<italic>O1</italic> and <italic>O2</italic>). The most
significant difference of the assembly codes is the calling of different
power functions.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="justify" colwidth="113.811024pt"/>
     <oasis:colspec colnum="2" colname="col2" align="justify" colwidth="113.811024pt"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">Optimization level O1</oasis:entry>  
         <oasis:entry colname="col2">Optimization level O2</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">movq %rsi, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>40(%rbp) <?xmltex \hack{\hfill\break}?>movq %r8, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>32(%rbp) <?xmltex \hack{\hfill\break}?>movq %r9, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>24(%rbp) <?xmltex \hack{\hfill\break}?>movsd %xmm8, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>16(%rbp) <?xmltex \hack{\hfill\break}?>call pow</oasis:entry>  
         <oasis:entry colname="col2">movsd %xmm7, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>344(%rbp) <?xmltex \hack{\hfill\break}?>movsd %xmm1, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>320(%rbp) <?xmltex \hack{\hfill\break}?>movsd %xmm3, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>312(%rbp) <?xmltex \hack{\hfill\break}?>movsd %xmm2, <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>304(%rbp) <?xmltex \hack{\hfill\break}?>call cbrt</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \floatpos{h!}?><table-wrap id="Ch1.T17" specific-use="star"><caption><p>An example of obvious different results in lines 1923–1932 of
Fig. 3 when changing the compiler optimization levels (from O2 to O3). A
manual result calculated by Python is also provided.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="4">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry namest="col1" nameend="col3">Variables </oasis:entry>  
         <oasis:entry colname="col4">Value</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">Input</oasis:entry>  
         <oasis:entry namest="col2" nameend="col3">WORK3(i, j) </oasis:entry>  
         <oasis:entry colname="col4">0.00000000000000</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">dz(k) </oasis:entry>  
         <oasis:entry colname="col4">1000.00000000000</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">KAPPA_ISOP(i, j, kbt, k, bid) </oasis:entry>  
         <oasis:entry colname="col4">1.991793396882581E-006</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">SLX(i, j, ieast, kbt, k, bid) </oasis:entry>  
         <oasis:entry colname="col4"><inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>0.120114394362605</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">HYX(i, j, bid) </oasis:entry>  
         <oasis:entry colname="col4">1.32933181234324</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">TX(i, j, k, n, bid) </oasis:entry>  
         <oasis:entry colname="col4"><inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>0.161989629268646</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">SLY(i, j, jnorth, kbt, k, bid) </oasis:entry>  
         <oasis:entry colname="col4"><inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>0.13980933 0009777</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">HXY(i, j, bid) </oasis:entry>  
         <oasis:entry colname="col4">0.761427260631393</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">TY(i, j, k, n, bid) </oasis:entry>  
         <oasis:entry colname="col4">0.152039408683777</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">SLX(i, j, iwest, kbt, k, bid) </oasis:entry>  
         <oasis:entry colname="col4"><inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>7.344871974748127E-002</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">HYX(i-1, j, bid) </oasis:entry>  
         <oasis:entry colname="col4">1.32933181234324</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">TX(i-1, j, k, n, bid) </oasis:entry>  
         <oasis:entry colname="col4"><inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>0.192202091217041</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">SLY(i, j, jsouth, kbt, k, bid) </oasis:entry>  
         <oasis:entry colname="col4"><inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>0.112685940441552</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">TY(i, j-1, k, n, bid) </oasis:entry>  
         <oasis:entry colname="col4">0.743088001419362</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1"/>  
         <oasis:entry namest="col2" nameend="col3">TY(i, j-1, k, n, bid) </oasis:entry>  
         <oasis:entry colname="col4">0.122525990009308</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">Output</oasis:entry>  
         <oasis:entry colname="col2">WORK3(i, j)</oasis:entry>  
         <oasis:entry colname="col3">Execution result (at optimization level O2)</oasis:entry>  
         <oasis:entry colname="col4">3.622331248054413E-005</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">Execution result (at optimization level O3)</oasis:entry>  
         <oasis:entry colname="col4">3.571897176404182E-005</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1"/>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">Manual result (by Python)</oasis:entry>  
         <oasis:entry colname="col4">3.62233124805436E-05</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><caption><p>Part of the code lines of the compilation-sensitive code segment in
the code file <italic>modal_aero_rename.F90</italic> of CAM5. It is found that the
code at line 330 can produce different results when different compiling
setups are used.</p></caption>
          <?xmltex \igopts{width=312.980315pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-f02.pdf"/>

        </fig>

      <p>Figure 1 shows the flowchart of CoSFiD. The inputs include the two compiling
setups (<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, the rules to compile and run the model, and the
rules to compare results at bitwise identical level. The outputs are a list
of compilation-sensitive code files. CoSFiD first generates a reference
result with the compiling setup <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to compile all code files. Following
the idea of the first stage introduced in Sect. 4.1, CoSFiD compiles and
runs the model many times and alternatively changes the compiling setup
between <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">A</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">B</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for some code files each time.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3" specific-use="star"><caption><p>Part of the code lines of the compilation-sensitive code segment in
the code file <italic>hmix_gm.F90</italic> of POP2. It is found that the code from
line 1923 to line 1932 can produce significantly different results when
different compiling setups are used.</p></caption>
          <?xmltex \igopts{width=312.980315pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-f03.pdf"/>

        </fig>

      <p>The biggest challenge to the design and implementation of CoSFiD is how to
control the compilation process of each code file. A straightforward
approach is to develop a common tool that can successfully compile any
model. However, this approach seems impractical because different models may
have different systems to compile the code, for example, using different
ways to specify code files and different ways to generate header files. We
therefore propose to use the original compiling system of a model and design
a compiler wrapper accordingly. The compiler wrapper is some script in
CoSFiD, which can replace the original compiler commands used for compiling
the model. For example, given that a model uses the Intel compiler commands
(i.e., icc, icpc, and ifort) to compile the code, users should generate
pseudo compiler commands with the same names (i.e., icc, icpc, and ifort)
under a directory through symbolic linking or copying the compiler wrapper
of CoSFiD, and then add the directory to the beginning of the corresponding
environment variable (for example, PATH) of the operating system to make
the pseudo compiler commands used for the compilation of the code, and then
replace the compiler flag for compiler optimizations by a label
-DCoSFiD. When compiling a code file, CoSFiD first gets the name of the
file through the compiler wrapper; it then looks up the current compiling
setup for the file before switching the compiler version to the specified
one if necessary and using the specified compiler flag to replace the label
-DCoSFiD; it finally compiles the code file.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <title>Examples</title>
<sec id="Ch1.S4.SS3.SSS1">
  <title>Example 1</title>
      <p>In this example, we search for the answer to the first question in Sect. 4 (regarding all Intel compiler versions, given compiler flags 2 or 4): why does CAM5 obtain different simulation results when changing
compiler optimization level from O0 or O1 to O2 or O3(as shown in Table 8)? Following the methodology in Sect. 4.1, we
first generate the two compiling setups <italic>C1</italic> and <italic>C2</italic> using the Intel compiler
version 13, compiler flag 2 (<italic>-fp-model precise -fp-speculation=strict -mp1 -no-vec -no-simd</italic>) and two optimization levels (<italic>O1</italic> and
<italic>O2</italic>); next, we use CoSFiD to find only one compilation-sensitive code file
(<italic>modal_aero_rename.F90</italic>) from more than 700 code files of CAM5. For further analysis, we split
<italic>modal_aero_rename.F90</italic> into two temporary code files, each of which contains only one subroutine,
and then use CoSFiD to find that only the first subroutine
(<italic>modal_aero_rename_sub</italic>) contains compilation-sensitive code segments. Through logging and then
comparing the values of input and output variables of code segments in the
two compiling setups, we find a compilation-sensitive code segment, shown in
Fig. 2. Given the same input (bitwise identical), this code segment can
generate slightly different results in different optimization levels (for
example, Table 15). This is due to the differences in assembly codes (Table 16). For the exponent <italic>onethird</italic> in Fig. 2, it is defined as <italic>1.0_r8/3.0_r8</italic> in the program. The
compiler optimization level <italic>O1</italic> will call function <italic>pow</italic> to calculate the
corresponding power function, while <italic>O2</italic> will intelligently find that the power
function is actually a cube root operation and then call <italic>cbrt</italic> for the
calculation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4"><caption><p>Simulation speed (simulated years per day; SYPD) of CAM5 under two
compiler flags (A and B) of Intel compiler version 13 when increasing the
number of processes from 6 to 24. The high-performance computer Tansuo100 is
used for this test. Compiler flag A (<italic>-O3 -fp-model strict -fp-speculation=strict -mp1 -no-vec -no-simd</italic>) is from the
biggest bitwise identical compiling setup sets in Table 8. Compiler flag B
(<italic>-O3 -fp-model fast-fp-speculation=fast -MP1 -no-vec -simd</italic>) should be
the compiler flag for fastest simulation speed. Compiler flag <italic>-O3 -fp-model fast -fp-speculation=fast -MP1 -vec -simd</italic> should be more aggressive than
compiler flag B in compiler optimizations. It is not used in this test
because the corresponding simulation run of CAM5 crashes. The advantage of
compiler flag B compared to compiler flag A is defined as the performance
improvement when compiler flag is changed from A to B.</p></caption>
            <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-f04.pdf"/>

          </fig>

      <p>After replacing variable <italic>onethird</italic> with<italic> (1.0_r8/3.0_r8)</italic>
throughout the code, CAM5 achieves bitwise identical results with compiler
flag 2 or 4 throughout all compiler optimization levels, and finally the
corresponding bitwise identical compiler setup sets of CAM5 are enlarged. For
example, the bitwise identical compiling setup set in green color and the set
in blue color in Table 8 are unified into one set.<?xmltex \hack{\newpage}?></p>
</sec>
<sec id="Ch1.S4.SS3.SSS2">
  <title>Example 2</title>
      <p>In this example, we search for the answer to the second question in Sect. 4 (regarding Intel compiler version 13): why does POP2 obtain different simulation results when changing the compiler optimization level from O3 to another level
(as shown in Table 9)? To generate the two compiling setups <italic>C1</italic> and <italic>C2</italic>, we  use
the Intel compiler version 13, compiler flag 1 (<italic>-fp-model strict -fp-speculation=strict -mp1 -no-vec –no-simd</italic>) and two compiler
optimization levels (<italic>O2</italic> and <italic>O3</italic>). Using CoSFiD, we find only one
compilation-sensitive code file (<italic>hmix_gm.F90</italic>) from more than 500 code files of POP2.
<italic>hmix_gm.F90</italic> contains about 10 subroutines and about 4000 code lines. For further
analysis, we split <italic>hmix_gm.F90</italic> into 10 temporary code files, each of which contains
only one subroutine, and then use CoSFiD again to find that only the
temporary code file with the second subroutine (<italic>hdifft_gm</italic>) contains
compilation-sensitive code segments. Based on the binary values of input and
output variables of the code segments with the two compiling setups, we find
a compilation-sensitive code segment in the subroutine
<italic>hdifft_gm</italic>, shown in Fig. 3. It is curious that given exactly the same inputs,
variable <italic>WORK3</italic> obtains significantly different results in the two compiling
setups (for example, Table 17). A manual result (Table 17) confirms
correctness of the result in the compiling setup with optimization level
<italic>O2</italic>, but indicates that the code segment in Fig. 3 triggers a bug in the
compiler when the compiler optimization level is <italic>O3</italic>.</p>
      <p>It is almost impossible for us to fix a compiler bug. However, we can try to
make the model code not trigger the bug. Further analysis with assembly
codes shows that the compiler performs an optimization of loop fusion that
merges four two-level loops at lines 1920–1999 of the code file
<italic>hmix_gm.F90</italic> into one loop. We intuitively guess that there are bugs in the loop fusion
optimization. To avoid the loop fusion optimization, we move the four
two-level loops into a new subroutine. Finally, POP2 achieves bitwise
identical results with compiler flag 1 throughout all compiler optimization
levels, and the corresponding bitwise identical compiling setup sets of POP2
are enlarged. For example, the bitwise identical compiling setup set in red
and the set in green in Table 9 are unified into one set.
<?xmltex \hack{\newpage}?></p>
</sec>
</sec>
</sec>
<sec id="Ch1.S5" sec-type="conclusions">
  <title>Discussion and conclusion</title>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5"><caption><p>Simulation speed (simulated years per day; SYPD) of GAMIL2 (Li et
al., 2013b) under two compiler flags (A and B) of Intel compiler version 13
when increasing the number of processes from 1 to 24. The high-performance
computer Tansuo100 is used for this test. Compiler flag A (<italic>-O3 -fp-model strict -fp-speculation=strict -mp1 -no-vec -no-simd</italic>) is the also the
compiler flag A used in Fig. 4. Compiler flag B (<italic>-O3 -fp-model fast -fp-speculation=fast -MP1 -vec -simd</italic>) should be the compiler flag for
fastest simulation speed. The advantage of compiler flag B compared to
compiler flag A is defined as the performance improvement when compiler flag
is changed from A to B.</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/731/2016/gmd-9-731-2016-f05.pdf"/>

      </fig>

      <p>This study illustrates that a model can achieve bitwise identical results
under different compiling setups. For a given model, there are always a
number of bitwise identical compiling setup sets, some of which can be
across not only different compiler flags but also different versions of the
same compiler family. As a result, the original results with an older
compiler version can be exactly reproduced with a newer compiler version.
Moreover, the examples in this paper reveal that bitwise identical compiling
setup sets can be enlarged through carefully modifying compilation-sensitive
code segments, which will facilitate the exact reproduction of original
simulation results.</p>
      <p>During the development of a model, the model codes increase continuously and
need to be tested frequently. The testing can be classified into two
categories: scientific testing and technical testing. Scientific testing,
which is evaluating the scientific meaning of simulation results, is
generally expensive, because it always requires long simulations and
requires scientists to evaluate a large amount of results. In contrast,
technical testing, which does not depend on the scientific meaning of
simulation results, is generally cheap. For example, short simulations (such
as several model days) are enough for bitwise identical testing, and bitwise
identical testing can be conducted automatically without any burden to
scientists (Easterbrook and Johns, 2009). Technical testing therefore should
be much more frequent than scientific testing. Since a bitwise identical
compiling setup set contains a number of compiling setups that should
achieve exactly the same results for a model simulation, it can bring more
cases for technical testing. For example, given that a new code version
evolves from an old code version with new modifications, the bitwise
identical compiling setup sets of each code version can be obtained
automatically. If the two code versions do not have the same bitwise
identical compiling setup sets, new test cases can be generated for checking
why this happens, for example, because of bugs in the codes or
compilation-sensitive code segments. If there are compilation-sensitive code
segments in the new modifications, we advise researchers to make them
insensitive, to make each bitwise identical compiling setup set as big as
possible for further development of the model. The first example in Sect. 4.3 reveals that a compilation-sensitive code segment can become insensitive
after a slight code modification.</p>
      <p>Although the bitwise identical compiling setup sets of different models are
generally different, the differences can effectively bring more test cases
to detect software bugs in model simulations, especially the bugs of
compilers. Although scientists of Earth system modeling generally cannot
modify the code of a compiler to fix a bug, they can modify the code of a
model to make sure that the model code will not trigger a compiler bug
again. For example, based on the differences of bitwise identical compiling
setup sets among different models (CAM5, POP2, and FGOALS-g2), we found that
a code segment of POP2 triggers a bug of the Intel compiler version 13, and
the compiler bug will not be triggered again with a slight modification to
the code segment.</p>
      <p>There are generally a large number of choices of compiler flags. Researchers
may tend to select a compiler flag that can achieve the best computation
performance for a model simulation. Our performance evaluation shows that
the compiler flag 3 can achieve the best computation performance among the
compiler flags in Table 6. According to Tables 8–10, the bitwise identical
compiling setup set corresponding to compiler flag 3 is small. It is already
known that climate simulation results can be sensitive to round-off errors.
To make simulation results most easily reproduced, researchers may be able
to use the compiler flag of the best computation performance in a bigger
bitwise identical compiling setup set for a model simulation, when the
change of compiler flags will not significantly decrease the computation
performance. For example, researchers can use the compiler flag <italic>-O3 -fp-model strict -fp-speculation=strict -mp1 -no-vec –no-simd</italic> for
the simulation of the atmosphere models CAM5 and GAMIL2 when the Intel
compilers are used, because such a compiler flag does not significantly
decrease the computation performance, especially when the number of
processes is big (Figs. 4 and  5). Please note that any selection of a
compiler flag for a model simulation will not affect the code testing based
on bitwise identical compiling setup sets.</p>
<sec id="Ch1.S5.SSx1" specific-use="unnumbered">
  <title>Code availability</title>
      <p>The source code of CESM version 1.2 can obtained at <uri>http://www.cesm.ucar.edu/models/cesm1.2/</uri>.</p>
      <p>The source code of FGOALS-g2 is currently not publicly available. You can
contract us for more information.</p>
      <p>The source code of CoSFiD is available at <uri>https://github.com/liruizhe/CoSFiD</uri>.</p>
      <p>The compilation-sensitive code files mentioned in Sect. 4.3 will be
included in the Supplement.</p>
</sec>
</sec>

      
      </body>
    <back><app-group>
        <supplementary-material position="anchor"><p><bold>The Supplement related to this article is available online at <inline-supplementary-material xlink:href="http://dx.doi.org/10.5194/gmd-9-731-2016-supplement" xlink:title="pdf">doi:10.5194/gmd-9-731-2016-supplement</inline-supplementary-material>.</bold></p></supplementary-material>
        </app-group><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. 2014CB441302) and the Tsinghua University Initiative Scientific
Research Program (no. 20131089356).<?xmltex \hack{\newline}?><?xmltex \hack{\newline}?>Edited by:  O. Marti</p></ack><ref-list>
    <title>References</title>

      <ref id="bib1.bib1"><label>1</label><mixed-citation>Alexander, K. and Easterbrook, S. M.: The software architecture of climate models: a graphical comparison of CMIP5 and EMICAR5 configurations, Geosci. Model Dev., 8, 1221–1232, <ext-link xlink:href="http://dx.doi.org/10.5194/gmd-8-1221-2015" ext-link-type="DOI">10.5194/gmd-8-1221-2015</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bib2"><label>2</label><mixed-citation>Baker, A. H., Hammerling, D. M., Levy, M. N., Xu, H., Dennis, J. M., Eaton, B. E., Edwards, J., Hannay, C., Mickelson, S. A., Neale, R. B., Nychka, D., Shollenberger,
J., Tribbia, J., Vertenstein, M., and Williamson, D.: A new ensemble-based
consistency test for the Community Earth System Model (pyCECT v1.0), Geosci. Model Dev., 8, 2829–2840, <ext-link xlink:href="http://dx.doi.org/10.5194/gmd-8-2829-2015" ext-link-type="DOI">10.5194/gmd-8-2829-2015</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bib3"><label>3</label><mixed-citation>Easterbrook, S. M. and Johns, T. C.: Engineering the software for
understanding climate change, Comput. Sci. Eng., 11, 65–74, 2009.</mixed-citation></ref>
      <ref id="bib1.bib4"><label>4</label><mixed-citation>
Hong, S. Y., Koo, M. S., Jang, J., Esther Kim, J. E., Park, H., Joh, M. S.,
Kang, J. H., and Oh, T. J.: An Evaluation of the Software System Dependency
of a Global Atmospheric model, Mon. Weather Rev., 141, 4165–4172, 2013.</mixed-citation></ref>
      <ref id="bib1.bib5"><label>5</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.bib6"><label>6</label><mixed-citation>
Li, L., Lin, P., Yu, Y., Wang, B., Zhou, T., Liu, L., Liu J., Bao, Q., Xu,
S., Huang, W., Xia, K., Pu, Y., Dong, L., Shen, S., Liu Y., Hu N., Liu, M.,
Sun, W., Shi, X., Zheng, W., Wu, B., Song, M., Liu, H., Zhang, X., Wu, G.,
Xue, W., Huang, X., Yang, G., Song, Z., and Qiao, F.: The flexible global
ocean-atmosphere-land system model, Grid-point Version 2: FGOALS-g2, Adv.
Atmos. Sci., 30, 543–560, 2013a.</mixed-citation></ref>
      <ref id="bib1.bib7"><label>7</label><mixed-citation>
Li, L., 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), Adv. Atmos. Sci., 30,
855–867, 2013b.</mixed-citation></ref>
      <ref id="bib1.bib8"><label>8</label><mixed-citation>Liu, H. L., Zhang, X. H., Li, W., Yu, Y. Q., and Yu, R. C.: A eddy-permitting
oceanic general circulation model and its preliminary evaluations, Adv.
Atmos. Sci., 21, 675–690, 2004.</mixed-citation></ref>
      <ref id="bib1.bib9"><label>9</label><mixed-citation>Liu, J.: Sensitivity of sea ice and ocean simulations to sea ice salinity in
a coupled global climate model, Sci. China Earth Sci., 53,
911–918, 2010.</mixed-citation></ref>
      <ref id="bib1.bib10"><label>10</label><mixed-citation>Liu, L., Li, R., Zhang, C., Yang, G., Wang, B., and Dong, L.: Enhancement for bitwise
identical reproducibility of Earth system modeling on the C-Coupler platform, Geosci. Model Dev. Discuss., 8, 2403–2435, <ext-link xlink:href="http://dx.doi.org/10.5194/gmdd-8-2403-2015" ext-link-type="DOI">10.5194/gmdd-8-2403-2015</ext-link>, 2015a.</mixed-citation></ref>
      <ref id="bib1.bib11"><label>11</label><mixed-citation>Liu, L., Peng, S., Zhang, C., Li, R., Wang, B., Sun, C., Liu, Q., Dong, L., Li, L., Shi, Y., He, Y., Zhao, W., and Yang, G.: Importance of bitwise identical reproducibility in earth system modeling and status report, Geosci. Model Dev. Discuss., 8, 4375–4400, <ext-link xlink:href="http://dx.doi.org/10.5194/gmdd-8-4375-2015" ext-link-type="DOI">10.5194/gmdd-8-4375-2015</ext-link>, 2015b.</mixed-citation></ref>
      <ref id="bib1.bib12"><label>12</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.,
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), NCAR Tech. Note NCAR/TN-486<inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula> STR, 2010.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bib13"><label>13</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 model
(CLM), NCAR Technical Note NCAR/TN-461<inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula> STR, National Center for
Atmospheric Research, Boulder, CO, 2004.</mixed-citation></ref>
      <ref id="bib1.bib14"><label>14</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), Rep. LAUR-01853, 141, 2010.</mixed-citation></ref>
      <ref id="bib1.bib15"><label>15</label><mixed-citation>Song, Z., Qiao, F., Lei, X., and Wang, C.: Influence of parallel computational uncertainty on simulations of the Coupled General Climate Model, Geosci. Model Dev., 5, 313–319, <ext-link xlink:href="http://dx.doi.org/10.5194/gmd-5-313-2012" ext-link-type="DOI">10.5194/gmd-5-313-2012</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bib16"><label>16</label><mixed-citation>Wang, X. C., Liu, J. P., Yu, Y. Q., Liu, H. L., and Li, L. J.: Numerical
simulation of polar climate with FGOALS-g1. 1, Acta Meteorol. Sin., 67,
961–972, 2009.</mixed-citation></ref>

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

    </app></app-group></back>
    <!--<article-title-html>Bitwise identical compiling setup: prospective for reproducibility and
reliability of Earth system modeling</article-title-html>
<abstract-html><p class="p">Reproducibility and reliability are fundamental principles of scientific
research. A compiling setup that includes a specific compiler version and
compiler flags is an essential technical support for Earth system modeling.
With the fast development of computer software and hardware, a compiling
setup has to be updated frequently, which challenges the reproducibility and
reliability of Earth system modeling. The existing results of a simulation
using an original compiling setup may be irreproducible by a newer compiling
setup because trivial round-off errors introduced by the change in compiling
setup can potentially trigger significant changes in simulation results.
Regarding the reliability, a compiler with millions of lines of code may
have bugs that are easily overlooked due to the uncertainties or unknowns in
Earth system modeling. To address these challenges, this study shows that
different compiling setups can achieve exactly the same (bitwise identical)
results in Earth system modeling, and a set of bitwise identical compiling
setups of a model can be used across different compiler versions and
different compiler flags. As a result, the original results can be more
easily reproduced; for example, the original results with an older compiler
version can be reproduced exactly with a newer compiler version. Moreover,
this study shows that new test cases can be generated based on the
differences of bitwise identical compiling setups between different models,
which can help detect software bugs in the codes of models and compilers and
finally improve the reliability of Earth system modeling.</p></abstract-html>
<ref-html id="bib1.bib1"><label>1</label><mixed-citation>
Alexander, K. and Easterbrook, S. M.: The software architecture of climate models: a graphical comparison of CMIP5 and EMICAR5 configurations, Geosci. Model Dev., 8, 1221–1232, <a href="http://dx.doi.org/10.5194/gmd-8-1221-2015" target="_blank">doi:10.5194/gmd-8-1221-2015</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>2</label><mixed-citation>
Baker, A. H., Hammerling, D. M., Levy, M. N., Xu, H., Dennis, J. M., Eaton, B. E., Edwards, J., Hannay, C., Mickelson, S. A., Neale, R. B., Nychka, D., Shollenberger,
J., Tribbia, J., Vertenstein, M., and Williamson, D.: A new ensemble-based
consistency test for the Community Earth System Model (pyCECT v1.0), Geosci. Model Dev., 8, 2829–2840, <a href="http://dx.doi.org/10.5194/gmd-8-2829-2015" target="_blank">doi:10.5194/gmd-8-2829-2015</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>3</label><mixed-citation>Easterbrook, S. M. and Johns, T. C.: Engineering the software for
understanding climate change, Comput. Sci. Eng., 11, 65–74, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>4</label><mixed-citation>
Hong, S. Y., Koo, M. S., Jang, J., Esther Kim, J. E., Park, H., Joh, M. S.,
Kang, J. H., and Oh, T. J.: An Evaluation of the Software System Dependency
of a Global Atmospheric model, Mon. Weather Rev., 141, 4165–4172, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>5</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.bib6"><label>6</label><mixed-citation>
Li, L., Lin, P., Yu, Y., Wang, B., Zhou, T., Liu, L., Liu J., Bao, Q., Xu,
S., Huang, W., Xia, K., Pu, Y., Dong, L., Shen, S., Liu Y., Hu N., Liu, M.,
Sun, W., Shi, X., Zheng, W., Wu, B., Song, M., Liu, H., Zhang, X., Wu, G.,
Xue, W., Huang, X., Yang, G., Song, Z., and Qiao, F.: The flexible global
ocean-atmosphere-land system model, Grid-point Version 2: FGOALS-g2, Adv.
Atmos. Sci., 30, 543–560, 2013a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>7</label><mixed-citation>
Li, L., 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), Adv. Atmos. Sci., 30,
855–867, 2013b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>8</label><mixed-citation>Liu, H. L., Zhang, X. H., Li, W., Yu, Y. Q., and Yu, R. C.: A eddy-permitting
oceanic general circulation model and its preliminary evaluations, Adv.
Atmos. Sci., 21, 675–690, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>9</label><mixed-citation>Liu, J.: Sensitivity of sea ice and ocean simulations to sea ice salinity in
a coupled global climate model, Sci. China Earth Sci., 53,
911–918, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>10</label><mixed-citation>
Liu, L., Li, R., Zhang, C., Yang, G., Wang, B., and Dong, L.: Enhancement for bitwise
identical reproducibility of Earth system modeling on the C-Coupler platform, Geosci. Model Dev. Discuss., 8, 2403–2435, <a href="http://dx.doi.org/10.5194/gmdd-8-2403-2015" target="_blank">doi:10.5194/gmdd-8-2403-2015</a>, 2015a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>11</label><mixed-citation>
Liu, L., Peng, S., Zhang, C., Li, R., Wang, B., Sun, C., Liu, Q., Dong, L., Li, L., Shi, Y., He, Y., Zhao, W., and Yang, G.: Importance of bitwise identical reproducibility in earth system modeling and status report, Geosci. Model Dev. Discuss., 8, 4375–4400, <a href="http://dx.doi.org/10.5194/gmdd-8-4375-2015" target="_blank">doi:10.5194/gmdd-8-4375-2015</a>, 2015b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>12</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.,
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), NCAR Tech. Note NCAR/TN-486+ STR, 2010.

</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>13</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 model
(CLM), NCAR Technical Note NCAR/TN-461+ STR, National Center for
Atmospheric Research, Boulder, CO, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>14</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), Rep. LAUR-01853, 141, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>15</label><mixed-citation>
Song, Z., Qiao, F., Lei, X., and Wang, C.: Influence of parallel computational uncertainty on simulations of the Coupled General Climate Model, Geosci. Model Dev., 5, 313–319, <a href="http://dx.doi.org/10.5194/gmd-5-313-2012" target="_blank">doi:10.5194/gmd-5-313-2012</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>16</label><mixed-citation>Wang, X. C., Liu, J. P., Yu, Y. Q., Liu, H. L., and Li, L. J.: Numerical
simulation of polar climate with FGOALS-g1. 1, Acta Meteorol. Sin., 67,
961–972, 2009.
</mixed-citation></ref-html>--></article>
