Aperture + Plugin using OpenMP

1 view
Skip to first unread message

Sheppard Parker

unread,
Jan 10, 2011, 2:25:17 PM1/10/11
to apertu...@lists.apple.com
Hello,

I have written a portion of a currently shipping Photoshop plugin that successfully uses OpenMP under OSX 10.5 & 10.6. When it was ported to the Aperture SDK and tested under Aperture 3.0 we found that we had to disable the OpenMP stuff in order to get it to work. I have read many places that the body of code that is attempting to use OpenMP must be running on the main thread. So, I am guessing that Aperture plug-ins do not fit this scenario. That is, Aperture has the main thread but 3rd party plugins are invoked via some secondary thread. Is this correct? Has anyone else had any luck using OpenMP in their Aperture plugin?

Thanks in advance,
Sheppard

Blake Seely

unread,
Jan 10, 2011, 3:29:41 PM1/10/11
to aperture-dev@lists.apple.com List
Sheppard,

Are you talking about an Edit plug-in or an Export plug-in?

You control the UI for an Edit plug-in, so you should be able to control where the OpenMP code is called. For Export plug-ins, the documentation should say which methods are likely to be called on background threads.

-Blake

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Aperture-dev mailing list      (Apertu...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/aperture-dev/bseely%40apple.com

This email sent to bse...@apple.com

Sheppard Parker

unread,
Jan 11, 2011, 2:41:20 PM1/11/11
to Apertu...@lists.apple.com
Blake,

Thanks for the response. This is an Edit plug-in. I have done nothing particularly special to it. Just added some "#pragma omp parallel for" statements around some of the hottest number-crunching loops. Very basic use of OpenMP, nothing fancy. This all works fine for the Photoshop version of the same plug-in. Most of the algorithmic code is common across the two. 

Some of the articles about "main thread/process"  vs "secondary thread" I mentioned in my first post are...



... for starters. There are others.

Have you had actual success in adding OpenMP support within an Edit plug-in for Aperture? 

Thanks again,
Sheppard

Paul Miller

unread,
Jan 11, 2011, 3:35:51 PM1/11/11
to apertu...@lists.apple.com
On 1/11/2011 1:41 PM, Sheppard Parker wrote:
> Have you had actual success in adding OpenMP support within an Edit
> plug-in for Aperture?

Our stuff uses OpenMP extensively - but, I launch our UI as a separate
process, which lets me encapsulate whatever I need and avoid UI event
loop collisions (we use a third party UI toolkit that can mess up the
host even loop). Something to consider.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Aperture-dev mailing list (Apertu...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

http://lists.apple.com/mailman/options/aperture-dev/aperture-dev%2Bgarchive-9674%40googlegroups.com

This email sent to aperture-dev+...@googlegroups.com

Sheppard Parker

unread,
Jan 11, 2011, 4:09:36 PM1/11/11
to apertu...@lists.apple.com

Thanks Paul. Just hearing that it is possible is good to know. Now we can hack at it until we get it fixed. I believe the guy who does the GUI side of our plug-in has been listening in on this conversation. Maybe he will have some thoughts on how to rework our implementation such that the OpenMP portion of the code can run from the main process rather then from a secondary/child thread.

Thanks again,
Sheppard


On Jan 11, 2011, at 2:35 PM, Paul Miller wrote:

> On 1/11/2011 1:41 PM, Sheppard Parker wrote:
>> Have you had actual success in adding OpenMP support within an Edit
>> plug-in for Aperture?
>
> Our stuff uses OpenMP extensively - but, I launch our UI as a separate process, which lets me encapsulate whatever I need and avoid UI event loop collisions (we use a third party UI toolkit that can mess up the host even loop). Something to consider.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Aperture-dev mailing list (Apertu...@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:

> http://lists.apple.com/mailman/options/aperture-dev/sheppard.parker%40imadio.com
>
> This email sent to sheppar...@imadio.com

Reply all
Reply to author
Forward
0 new messages