healpy/healpy — pull request #73 by lpsinger (2012-12-11 08:00:21+00:00)
Title: Don't disable OpenMP under llvm; Apple's llvm-g++-4.2 supports OpenMP

Am I crazy? Apple's llvm compiler supports OpenMP, at least on my system with Mountain Lion and Xcode 4.5.2. The following test program proves it:

```C
/* compile with:
*
* $ llvm-gcc-4.2 -fopenmp omptest.c -o omptest
*
* prints out:
* Thread 0 says: 0
* Thread 1 says: 50
* Thread 0 says: 1
* Thread 1 says: 51
* ...
*/

#include
#include

int main(int argc, char **argv)
{
int i;
omp_set_num_threads(2);

#pragma omp parallel for
for (i = 0; i < 100; i ++)
printf("Thread %d says: %d\n", omp_get_thread_num(), i);

return 0;
}
```

Moreover, I must have known this at some level when I made the MacPorts port for HEALPix, because on line 32 of the Portfile at , I change the compiler from ``clang`` to ``llvm-gcc-4.2``.

The pull request modifies `setup.py` so that OpenMP is turned off my default only under ``clang``, not under ``llvm``.