Microsoft Parallel Patterns Library (PPL) vs. OpenMP
Asked Answered
M

3

6

I want to compare PPL vs. OpenMP regarding their performance, but can't find a detailed investigation on the web. I believe there are not many people who are experienced with PPL.

I'm developing my software on Windows, using Visual Studio 2010, and don't want to port it to somewhere else in a short term.

If portability is not an issue, and only concern is the performance, what do you think about these two methods?

Microfiche answered 14/3, 2012 at 10:27 Comment(2)
It depends what you do. No real question here. I think someone downvoted the wrong guy.Picturesque
Why would anyone want to lock themselves into Microsoft stuff, short-term or long-term?Tortricid
F
2

It probably depends on your algorithm, however this research indicates that PPL may be faster then OpenMP:

http://www.codeproject.com/Articles/373305/Visual-Cplusplus-11-Beta-Benchmark-of-Parallel-Loo

Serial : 72ms
OpenMP : 16ms
PPL    : 12ms
Festoon answered 17/9, 2012 at 11:15 Comment(1)
I wouldn't be so quick to base my choice on a single test done by someone else, which also ran for just a few milliseconds.Tortricid
F
5

On MSDN there is a great comparison of the properties OpenMP and ConcRT (core of PPL):

The OpenMP model is an especially good match for high-performance computing, where very large computational problems are distributed across the processing resources of a single computer. In this scenario, the hardware environment is known and the developer can reasonably expect to have exclusive access to computing resources when the algorithm is executed.

However, other, less constrained computing environments may not be a good match for OpenMP. For example, recursive problems (such as the quicksort algorithm or searching a tree of data) are more difficult to implement by using OpenMP. The Concurrency Runtime complements the capabilities of OpenMP by providing the Parallel Patterns Library (PPL) and the Asynchronous Agents Library. Unlike OpenMP, the Concurrency Runtime provides a dynamic scheduler that adapts to available resources and adjusts the degree of parallelism as workloads change.

So, Main disadvantages of OpenMP:

  • static sheduling model.
  • not contains cancelation mechanism (very huge disadvantage, in many concurrence algorithm cancelation is required).
  • not contains concurrence agent approach.
  • troubles with exceptions in paralel code.
Fraxinella answered 14/11, 2012 at 10:50 Comment(1)
Small addition: PPL parallel_for algorithm have some overheads for dynamics task scheduling between CPU cores. So, it's not good solution for small calculation cycles. But, there is good Microsoft PPL extension: PPLExtras. This extension contains fixed version (static sheduling algorithm) for parallel_for special for small cycles - best perfomance.Fraxinella
L
2

If your only concern is performance then what I think about the two approaches is completely irrelevant. This is a question resolvable by an empirical approach, not by argumentation.

Lightyear answered 14/3, 2012 at 10:43 Comment(1)
Ease of use could also be a factor if he is running on tight schedulePastern
F
2

It probably depends on your algorithm, however this research indicates that PPL may be faster then OpenMP:

http://www.codeproject.com/Articles/373305/Visual-Cplusplus-11-Beta-Benchmark-of-Parallel-Loo

Serial : 72ms
OpenMP : 16ms
PPL    : 12ms
Festoon answered 17/9, 2012 at 11:15 Comment(1)
I wouldn't be so quick to base my choice on a single test done by someone else, which also ran for just a few milliseconds.Tortricid

© 2022 - 2024 — McMap. All rights reserved.