Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

openMP in Xcode 5

How I enable openMP in xcode 5?

MacBook Pro, OS X Mavericks (10.9)

Posted on Oct 29, 2013 4:47 PM

Reply
15 replies
Sort By: 

May 9, 2014 10:27 AM in response to etresoft

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

Reply

May 9, 2014 10:58 AM in response to sammcelhinney

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. 🙂

Reply

May 9, 2014 11:53 AM in response to sammcelhinney

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.

Reply

May 9, 2014 12:35 PM in response to etresoft

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.

Reply

May 9, 2014 12:53 PM in response to Stele

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.

Reply

May 9, 2014 2:50 PM in response to Stele

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.

Reply

May 9, 2014 3:00 PM in response to sammcelhinney

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.

Reply

Feb 18, 2015 3:12 PM in response to etresoft

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

Reply

openMP in Xcode 5

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.