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

<!-- This file defines flags for use with the NVIDIA HPC 2021 Linux Compilers -->
<flagsdescription>
<filename>Intel_compiler_flags</filename>
<title>Intel Compiler, Optimization and Other flags for use by SPEChpc</title>

<!-- Style -->

<style>
<![CDATA[
body {
  margin:  1em;
  border:  0;
  padding: 0;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: 100% 0;
  color:      black;
  font-family: "Times Roman", times, serif;
}

div.flagDesc {
  clear: both;
  color: black;
  background-color: #d6e7f7;
  border: 1px solid #blue;
  margin: 0 auto;
  width: 90%;
}

ul.flagTOC {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

ul.flagTOC > li {
  border: 1px solid #d6e7f7;
  background: #d6e7f7;
}

ul.flagTOC > li > a:link {
   color: blue;
}

ul.SubMenu li {
  border: 1px solid #d6e7f7; /* rgb(211, 211, 211); */
}

ul.SubMenu {
  border: 1px solid blue;
  background-color: #d6e7f7;
}
]]>
</style>

<!-- Header -->

<header>
<![CDATA[
<div id='banner'>
<h2><b>Compilers: Intel Fortran/C/C++</b></h2>
<h2><b>Operating systems: Linux</b></h2>
</div>
]]>
</header>

<!-- Compilers -->
<flag name='mpifort' class='compiler' regexp="mpifort\b" >
<![CDATA[
 <p>The OpenMPI Fortran driver configured for use with the Intel Fortran compiler.</p>
 ]]>
<example>mpifort</example>
</flag>

<flag name='mpicxx' class='compiler' regexp="mpicxx">
<![CDATA[
 <p>The OpenMPI C++ driver configured for use with the Intel C++ compiler.</p>
 ]]>
<example>mpicxx</example>
</flag>
  
<flag name='mpicc' class='compiler' regexp="mpicc">
<![CDATA[
 <p>The OpenMPI C driver configured for use with the Intel C compiler.</p>
 ]]>
<example>mpicc</example>
</flag>



<flag name='mpiifort' class='compiler' regexp="mpiifort\b" >
<![CDATA[
 <p>The Intel MPI Fortran driver configured for use with the Intel Fortran compiler.</p>
 ]]>
<example>mpiifort</example>
</flag>

<flag name='mpiicpc' class='compiler' regexp="mpiicpc">
<![CDATA[
 <p>The Intel MPI C++ driver configured for use with the Intel C++ compiler.</p>
 ]]>
<example>mpiicpc</example>
</flag>

<flag name='mpiicc' class='compiler' regexp="mpiicc">
<![CDATA[
 <p>The Intel MPI C driver configured for use with the Intel C compiler.</p>
 ]]>
<example>mpiicc</example>
</flag>



<!-- Portability, Other Flags. -->
<flag name="DSPEC_LP64" class="portability"
	compilers="mpicc, mpicxx, mpifort, mpiicc, mpiicpc, mpiifort" 
	regexp="-DSPEC_LP64">
	<![CDATA[
	<p>  </p>
	]]>
</flag>

<flag name="D_OPENMP201411" class="portability"
	compilers="mpicc, mpicxx, mpifort, mpiicc, mpiicpc, mpiifort"
	regexp="-D_OPENMP=201411\b">
	<![CDATA[
        	<p> 
			Disable use of reduction with variable array reduction variable (OpenMP 4.5,
OpenACC 2.7) even if compiler reports support. 
		</p>
        ]]>
</flag>


<flag name="DSPEC_NO_VAR_ARRAY_REDUCE" class="portability"
	compilers="mpicc, mpicxx, mpifort, mpiicc, mpiicpc, mpiifort"
	regexp="-DSPEC_NO_VAR_ARRAY_REDUCE\b">
	<![CDATA[
        	<p>
			Disable use of reduction with variable array reduction variable (OpenMP 4.5,
OpenACC 2.7) even if compiler reports support.
		</p>
        ]]>
</flag>


<flag name="c99" class="portability"
compilers="mpicc, mpicxx, mpifort" regexp="-std=c99\b">
<![CDATA[
 <p>Use C99 language features.</p>
]]>
<example>--c++14</example></flag>

<flag name="cxx17" class="portability"
compilers="mpicxx" regexp="--c\+\+17\b">
<![CDATA[
 <p>Use C++ 17 language features.</p>
]]>
<example>--c++17</example></flag>

<flag name="cxx14" class="portability"
compilers="mpicxx" regexp="--c\+\+14\b">
<![CDATA[
 <p>Use C++ 14 language features.</p>
]]>
<example>--c++14</example></flag>

<!-- Optimization Flags -->
<flag name="f-ipo" class="optimization" regexp="-ipo\b">
   <![CDATA[
      <p>Multi-file ip optimizations that includes:<br />
       - inline function expansion<br />
       - interprocedural constant propogation<br />
       - dead code elimination<br />
       - propagation of function characteristics<br />
       - passing arguments in registers<br />
       - loop-invariant code motion</p>
   ]]>
</flag>

<flag name="f-no-prec-div" class="optimization" regexp="-no-prec.div">
(disable/enable[default] -[no-]prec-div)

   <![CDATA[
      <p>-prec-div improves precision of floating-point divides. It has a slight
impact on speed. -no-prec-div disables this option and enables
optimizations that give slightly less precise results than full IEEE
division.</p>

<p>When you specify -no-prec-div along with some optimizations, such as
-xN and -xB (Linux) or /QxN and /QxB (Windows),
the compiler may change floating-point division computations into multiplication
by the reciprocal of the denominator.
For example, A/B is computed as A * (1/B) to improve the speed of the
computation.</p>
<p>However, sometimes the value produced by this transformation is
not as accurate as full IEEE division. When it is important to have fully
precise IEEE division, do not use -no-prec-div which will enable the
default -prec-div and the result is more accurate, with some
loss of performance.</p>
   ]]>

</flag>

<flag name="f-ansi-alias" class="optimization" regexp="-ansi-alias\b">
      Enable/disable(DEFAULT) use of ANSI aliasing rules in
      optimizations; user asserts that the program adheres to
      these rules.
</flag>

<flag name="CORE-AVX2" class="optimization" regexp="-march=core-avx2(?=\s|$)">

   <![CDATA[

   <p>May generate Intel® AVX2, AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® procesr.
      Optimizes for 4th, 5th and 6th generation Intel® Co processors
      and the Intel® Xeon® Processor E3 v3, E5 v3, E7 v3, E3 v4, E5 v4 and E7 v4 familie
      Available in compiler versions 13 and later.</p>
   ]]>
</flag>

<flag name="xCORE-AVX512" class="optimization" regexp="-xCORE-AVX512(?=\s|$)">

   <![CDATA[
      <p>Code is optimized for Intel(R) processors with support for AVX instructions.
      May generate Intel® AVX-12 Foundation instructions,Intel® AVX-512 Conflict Detectio
      instructions, Intel® AVX-512 Doubleword and Quadword instructions, Intel® AVX-51
      Byte and Word instructions, Intel® AVX-512 Vector Length extensions, Intel® AVX2,VX
      SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors.
      Optimizes for a future Intel® processor. Available in compiler version 15 update 1
      and later. </p>
   ]]>
</flag>

<flag name="qopenmp" class="optimization"
 compilers="mpicc, mpicxx, mpifort, mpiicc, mpiicpc, mpiifort"
 regexp="-qopenmp\b">
<![CDATA[
<p>Enable OpenMP compilation for hpc2021.</p>
]]>
</flag>

<flag name="DSPEC_OPENMP" class="optimization"
 compilers="mpicc, mpicxx, mpifort, mpiicc, mpiicpc, mpiifort"
 regexp="-DSPEC_OPENMP\b">
<![CDATA[
<p>Enable OPENMP programming model for hpc2021.</p>
]]>
</flag>



<flag name="Ofast" 
  class="optimization" 
  compilers="mpicc, mpicxx, mpifort, mpiicc, mpiicpc, mpiifort" 
  regexp="-Ofast?s?e?\b">
<![CDATA[
 <p>Chooses generally optimal flags for the target platform.</p>
 ]]>
<example>-Ofast</example>
</flag>

</flagsdescription>
