title: Using OpenMP 3/4 in Visual Studio 2017
body: <p>Trying to use features from OpenMP 3</p>
  
  <pre><code>#pragma omp parallel for collapse(2)
  </code></pre>
  
  <p>in Visual Studio 2017; i'm getting <a href="https://msdn.microsoft.com/en-us/library/838yd9da.aspx" rel="noreferrer"><code>error c3005: 'collapse' unexpected token encountered on openmp 'parallel for' directive</code></a></p>
  
  <p>It seems Visual Studio 2017 only supports OpenMP2. In a <a href="https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/13495731-add-support-for-openmp-4-5-to-vc" rel="noreferrer">request to support OpenMP4.5</a> it was said from VS team</p>
  
  <blockquote>
    <p>We have no plans at this time.</p>
  </blockquote>
  
  <p>Another answer said</p>
  
  <blockquote>
    <p>Fortunately clang-cl has become a viable alternative with OpenMP 4 support.
    In the worst case you can still enable the /fallback option.</p>
  </blockquote>
  
  <p>How to use clang-cl with Visual Studio 2017 and what is the fallback option?</p>