title: Xcode 4.5 and OpenMP with Clang (Apple LLVM) uses only one core
body: <p>We are using Xcode 4.5 on a C++11 project where we use OpenMP to speed up our computation:</p>
  
  <pre><code>#pragma omp parallel for
  for (uint x=1; x&lt;grid.width()-1; ++x) {
      for (uint y=1; y&lt;grid.height()-1; ++y) {
           // code
      }
  }
  </code></pre>
  
  <p>Although the Activity Monitor shows multiple threads being used by the program we observed that only one core is used: </p>
  
  <p><img src="https://i.stack.imgur.com/lzMb3.png" alt="Screenshot of the Activity Monitor running my code"></p>
  
  <p>We also run the same code on Ubuntu using GCC 4.7 and we observed contention on all cores. Could it be that the OpenMP support has been removed in the Apple LLVM? Is there an alternative to OpenMP?
  We can't switch to GCC since we use C++11 features.</p>