• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [GM-help] [Q] calling OpenMP functions in a thread function for NSThread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GM-help] [Q] calling OpenMP functions in a thread function for NSThread?


  • Subject: Re: [GM-help] [Q] calling OpenMP functions in a thread function for NSThread?
  • From: JongAm Park <email@hidden>
  • Date: Fri, 29 Jul 2011 14:57:12 -0700

On Jul 29, 2011, at 2:03 PM, Bob Friesenhahn wrote:

> On Fri, 29 Jul 2011, JongAm Park wrote:
>>
>> is there a problem in calling OpenMP functions in a thread function?
>
> Possibly there is, however, I recall that your main program uses Objective C.  Perhaps the Objective C runtime does not properly initialize with OpenMP?
>
> OpenMP does not provide any way to explicitly initialize it.
>
> Bob


Thanks for your reply.

Right,there is no function like "InitializeOpenMP()", which should be called at the beginning.
I set the project to use OpenMP, and if it is just declared statically like :

	Magick::Image myImage;

in a normal method, there is no problem.
Only when they are either created or accessed in a thread function, it causes the problem.

Apple's GCC has support for OpenMP and it can be turned on/off from a project setting, and I turned it on.
The last time I worked with OpenMP was about 3~5 years ago, and at that moment, there was no problem.

Let me do some more experiment.
Maybe current version of GCC/LLVM is broken.
( I tested with GCC, LLVM-GCC, LLVM already. )

Thanks again,

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[Q] calling OpenMP functions in a thread function for NSThread? (From: JongAm Park <email@hidden>)

  • Prev by Date: [Q] calling OpenMP functions in a thread function for NSThread?
  • Next by Date: Re: A trap with full screen in Lion
  • Previous by thread: [Q] calling OpenMP functions in a thread function for NSThread?
  • Next by thread: toolbars & toolbar items in lion
  • Index(es):
    • Date
    • Thread