• 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
[Q] calling OpenMP functions in a thread function for NSThread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] calling OpenMP functions in a thread function for NSThread?


  • Subject: [Q] calling OpenMP functions in a thread function for NSThread?
  • From: JongAm Park <email@hidden>
  • Date: Fri, 29 Jul 2011 13:35:46 -0700

Hello,

I'm using a GraphicsMagick library in my project.

However, there I found a very interesting behavior.
If I create an instance of Magick::Image in a normal method,
it works OK.
However, if it is implemented in a thread function, it crashes
when it calls omp_get_max_threads().

I tried these :

   1. Declare a pointer to Magick::Image in a class definition
      and created it dynamically using "new" when I needed it in a thread method.
          => When it is being created, it reaches
             where omp_get_max_threads() is called,
             and it crashes saying "EXC_BAD_ACCESS".

   2. Declare an instance of Magick::Image in a thread function/method
          => Same crash

   3. Declare the instance of Magick::Image as a global variable
      and try to use it in a thread function.
          => It crashes when reading a file like image.read( file_name ).
             Where it crashes is the same to the case 1.

So, I thought it could be due to stack size. So, I increased the stack size
for the thread, but it did'nt solve the problem.

is there a problem in calling OpenMP functions in a thread function?

Thank you.
JongAm Park_______________________________________________

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

  • Prev by Date: Re: A trap with full screen in Lion
  • Next by Date: Re: [GM-help] [Q] calling OpenMP functions in a thread function for NSThread?
  • Previous by thread: Re: NSView-based NSTableView: How to animate when using bindings?
  • Next by thread: Re: [GM-help] [Q] calling OpenMP functions in a thread function for NSThread?
  • Index(es):
    • Date
    • Thread