openMP in Xcode 5
How I enable openMP in xcode 5?
MacBook Pro, OS X Mavericks (10.9)
How I enable openMP in xcode 5?
MacBook Pro, OS X Mavericks (10.9)
OpenMP isn't in Xcode. It could be one day. But for now, you will have to roll your own.
Hi,
Xcode5 and Clang of Mavericks does not support OpenMP now.
But, instead of Clang, you can use gcc-4.9-bin.tar.
First install the gcc-4.9 and type "xcode-select --install" on your terminal.
Then, use "/usr/local/bin/gcc " as compiler.
Good luck.
What is performance like in gcc-4.9 compared to clang, or even the Intel 14.0 compiler, which I'm also evaluating for OpenMP support?
Just tried the xcode-select --install and got this error:
"Can't install software because it is currently not available from the Software Update Server"
clang seems to exist but gcc does not
Oh Mavericks...
According to situkak's reply, you need to actually install gcc 4.9 if you want openMP support.
hey there
Am on XCode 5, OSX Mavericks and have followed situkak's instructions above.
Buuut when I use /usr/local/bin/gcc as compiler, I get the following errors:
Unsupported compiler '/usr/local/bin/gcc' selected for architecture 'x86_64'
Unable to determine concrete GCC compiler for file
etc...
Is this what happens for others?
S
sammcelhinney wrote:
Is this what happens for others?
That is the danger of rolling your own - there are no others.
You can use Xcode and clang, and there are lots of people doing that. You can use OpenMP and GCC 4.9, and there are lots of people doing that. But using Xcode and OpenMP and GCC 4.9, there just you. 🙂
You miss the point
I am trying to install gcc4.9 as an alternative to xcode5's default compiler.
I doubt I am the only one who has done this.
S
sammcelhinney wrote:
You miss the point
The point of this thread is OpenMP support. Someone who requires OpenMP support probably doesn't need Xcode as they are already using makefiles.
I am trying to install gcc4.9 as an alternative to xcode5's default compiler.
I doubt I am the only one who has done this.
Then that is a different quention. There may be several people, maybe even dozens, who have tried this. Anyone in that category is unlikely to ever see your question tacked onto the end of a six month old question about openMP. I suggest you start your own thread.
The point of this thread is OpenMP support. Someone who requires OpenMP support probably doesn't need Xcode as they are already using makefiles.
That's not entirely true. I was using OpenMP for years in XCode, and then Apple decided to stop supporting it. I wasn't using makefiles before that.
However, now I am no longer using OpenMP. I didn't like this, but Apple made the decision for me. Now I'm using std::thread and some lambda magic to emulate OpenMP parallel loops in C++11.
Life goes on. I just wish it was *me* who got to call the shots sometimes.
That's interesting Stele, someone recommended I do exactly that earlier today... I guess I'm just stubborn and wanting to find a solution to stick with openMP (+ the code that I am trying to get working again is a bit involved and I don't really want to summo and the energy to rework it, lazy!)
And etresoft, yes, I am trying to use openMP in XCode. And actually, if you Google 'gcc 4.9 with xcode5' you get this thread, first. The two are not mutually exclusive.
Stele wrote:
That's not entirely true. I was using OpenMP for years in XCode, and then Apple decided to stop supporting it. I wasn't using makefiles before that.
However, now I am no longer using OpenMP. I didn't like this, but Apple made the decision for me. Now I'm using std::thread and some lambda magic to emulate OpenMP parallel loops in C++11.
The relationship between Apple and GCC is complicated. GCC never fully supported Apple. There has never been an GNU toolchain that did not rely on ProjectBuilder or Xcode. My theory is that it was GNU's open hostility to Apple that led them to update the GPL license to version 3. No one other than Apple was hurt by that. That wasn't Apple's decision.
At least C++ is currently well supported by clang - out of pride and rivalry with GCC more than anything else. Still, if you aren't tied to OpenMP, you might consider GCD.
sammcelhinney wrote:
And actually, if you Google 'gcc 4.9 with xcode5' you get this thread, first. The two are not mutually exclusive.
That's Google's problem. Try Googling for anything coding related these days. Unless you put each word in quotes, Google will autocorrect your search until it is useless.
I doubt you will find an answer here in this thread, and perhaps even in this forum. I did a quick search myself and found a suggestion to make sure you had enabled the Objective-C compiler in GCC. I don't know if that is the answer and I'm not going to find out. You might try asking in the Apple Developer forums or Apple Mailing Lists. There isn't much traffic in either place, but a compiler-specific question like that might attract someone's interest who is tired of questions about view controllers.
Until you get a definitive answer, I suggest sticking to makefile-based projects in Xcode. That will always work. And, to be honest, if people weren't required to use Xcode for app submissions, very few people would. It is by no means a beloved tool.
Excuse me ,i am new on mac.
So the thing is I have 10.8.5 os.
Have a 4.2.1 gcc and xcode 5.1.1
I am recently work on parallel code, so I start to use open mp ( omp.h) , but when i use this, i get an error, that omp.h doesnot exist on my computer
I have investigated but i cant find how can i get omp.h .
Could somebody tell me how can i install this "omp.h" or Openmp ,step by step please, as i said i a noob
thank you very much
openMP in Xcode 5