<?xml version="1.0"?>
<!DOCTYPE flagsdescription
   SYSTEM "http://www.spec.org/dtd/cpuflags1.dtd"
>

<flagsdescription>
<!--
   <filename>baseline-cluster-flags</filename>
-->
   <title>AMD SPEC MPI2007 Flag Description</title>

   <style>
      <![CDATA[
         body { background: white; }
      ]]>
   </style>

<!-- HEADERs -->

   <header>
      <![CDATA[
         <p style="text-align: center"> Copyright &copy; 2007. Advanced Micro Devices. All rights reserved. </p>
         <p><h3>Compilers: QLogic PathScale Compiler Suite </h3></p>
         <hr />
      ]]>
   </header>

   <header class="compiler">
    <![CDATA[
       <p>HEADER for COMPILER</p>
    ]]>
 </header>

   <header class="portability">
      <![CDATA[
         <p>HEADER for PORTABILITY</p>
      ]]>
   </header>

   <header class="optimization">
      <![CDATA[
         <p>HEADER for OPTIMIZATION</p>
      ]]>
   </header>

    <header class="other">
      <![CDATA[
         <p>HEADER for OTHER</p>
      ]]>
   </header>

<!-- /HEADERs -->

<!-- OPTIMIZATION -->

   <flag name="F-O_n" class="optimization" regexp="-O[0-3]\b">
      <example>-O3</example>
      <![CDATA[
         <p>Specify the basic level of optimization desired.<br>
         The options can be one of the following:</p>

            <p style="text-indent: -25px; margin-left: 25px">
               0&nbsp;&nbsp;&nbsp; Turn off all optimizations.</p>

            <p style="text-indent: -25px; margin-left: 25px">
               1&nbsp;&nbsp;&nbsp; Turn on local optimizations that
               can be done quickly. Do peephole optimizations and
               instruction scheduling.</p>

            <p style="text-indent: -25px; margin-left: 25px">
               2&nbsp;&nbsp;&nbsp; Turn on extensive optimization.
               This is the default.<br>
               The optimizations at this level are generally conservative,
               in the sense that they are virtually always beneficial and
               avoid changes which affect
               such things as floating point accuracy.  In addition to the level
               1 optimizations, do inner loop
               unrolling, if-conversion, two passes of instruction scheduling,
               global register allocation, dead store elimination,
               instruction scheduling across basic blocks,
               and partial redundancy elimination.</p>

            <p style="text-indent: -25px; margin-left: 25px">
               3&nbsp;&nbsp;&nbsp; Turn on aggressive optimization.<br>
               The optimizations at this level are distinguished from -O2
               by their aggressiveness, generally seeking highest-quality
               generated code even if it requires extensive compile time.
               They may include optimizations that are generally beneficial
               but may hurt performance.<br>
               This includes but is not limited to turning on the
               Loop Nest Optimizer, -LNO:opt=1, and setting
               -OPT:roundoff=1:IEEE_arithmetic=2:Olimit=9000:reorg_common=ON.</p>

            <p style="text-indent: -25px; margin-left: 25px">
               s&nbsp;&nbsp;&nbsp; Specify that code size is to be given
               priority in tradeoffs with execution time.</p>

         If no value is specified, 2 is assumed.</p>
      ]]>
   </flag>

   <flag name="F-LANG:copyinout" class="optimization"
         regexp="-LANG:copyinout=(ON|OFF|0|1)">
      <example>-LANG:copyinout=OFF</example>
      <![CDATA[
         <p>-LANG:copyinout : This is a workaround suggested by Qlogic for a
	    severe performance bug in the Pathscale 2.5 Fortran compiler.
	    Several benchmarks (e.g. 121.pop2) take an excessive amount of
	    time to run without specifying this flag.</p>
      ]]>
   </flag>

<!-- /OPTIMIZATION -->

<!-- PORTABILITY -->

   <flag name="F-DMPICH_IGNORE_CXX_SEEK" class="portability"
         regexp="-DMPICH_IGNORE_CXX_SEEK">
      <example>-DMPICH_IGNORE_CXX_SEEK</example>
      <![CDATA[
         <p> There is a name conflict between stdio.h and the MPI C++ binding
             with respect to the names SEEK_SET, SEEK_CUR, and SEEK_END.  MPI
             wants these in the MPI namespace, but stdio.h will #define these
             to integer values.  #undef'ing these can cause obscure problems
             with other include files (such as iostream), so MPICH2 instead
             uses #error to indicate a fatal error.  Users can either #undef
             the names before including mpi.h or include mpi.h *before* stdio.h
             or iostream.  Alternately, passing this flag causes MPICH2 to
	     ignore this naming conflict. </p>
      ]]>
   </flag>

   <flag name="F-fno-second-underscore" class="portability"
         regexp="-fno-second-underscore">
      <example>-fno-second-underscore</example>
      <![CDATA[
         <p>If  -funderscoring is in effect, and the original Fortran external
         identifier contained an underscore, -fsecond-underscore appends
         a second underscore to  the one added  by  -funderscoring.
         -fno-second-underscore  does  not append a second underscore.
         The default is both -funderscoring and -fsecond-underscore, the
         same defaults as g77 uses.  -fno-second-underscore corresponds
         to the default policies of PGI Fortran and Intel Fortran. </p>
      ]]>
   </flag>

   <flag name="F-DSPEC_MPI_LC_TRAILING_DOUBLE_UNDERSCORE" class="portability"
         regexp="-DSPEC_MPI_LC_TRAILING_DOUBLE_UNDERSCORE">
      <example>-DSPEC_MPI_LC_TRAILING_DOUBLE_UNDERSCORE</example>
      <![CDATA[
         <p>Needed to link 115.fds4 with Pathscale.  Should be present in
	    flags.xml for 115.fds4 instead of here.</p>
      ]]>
   </flag>

<!-- /PORTABILITY -->

<!-- COMPILIER -->

   <flag name="F-path-to-mpicc" class="compiler"
        regexp="\S+\/mpicc">
       <example>/usr/bin/mpicc</example>
      <![CDATA[
         <p>-L<MPI_HOME path/bin/mpicc> ,<br>
         MPI wrapper script for a C compiler.
         The wrapper script provides all the needed include directories and
         libraries needed to compile programs for MPI.</p>
      ]]>
   </flag>

   <flag name="F-path-to-mpicxx" class="compiler"
        regexp="\S+\/mpicxx">
       <example>/usr/bin/mpicxx</example>
      <![CDATA[
         <p>-L<MPI_HOME path/bin/mpicxx> ,<br>
         MPI wrapper script for a C++ compiler.
         The wrapper script provides all the needed include directories and
         libraries needed to compile programs for MPI.</p>
      ]]>
   </flag>

   <flag name="F-path-to-mpif90" class="compiler"
        regexp="\S+\/mpif90">
       <example>/usr/bin/mpif90</example>
      <![CDATA[
         <p>-L<MPI_HOME path/bin/mpif90> ,<br>
         MPI wrapper script for a Fortran compiler.
         The wrapper script provides all the needed include directories and
         libraries needed to compile programs for MPI.</p>
      ]]>
   </flag>

<!-- /COMPILER -->

<!-- OTHER -->

   <flag name="F-I" class="other" regexp="-I.">
      <example>-I.</example>
      <![CDATA[
         <p>Compiler directive to look in current directory for header files.
         </p>
       ]]>
   </flag>

<!-- /OTHER -->

</flagsdescription>
