Multi-core example with OpenMP slower than single core?

Tony_the_D
Total Points:
50
Registered User
October 13, 2008 2:00 PM PDT
Rate
 
#3 Reply to #1
There is a lot of overhead in OpenMP.  It will run slower unless the loop takes a significant fraction of a second single-threaded.  Tens of milliseconds, minimum.
Also, if the task if memory bandwidth bound rather than compute or cache bound, it will run no faster parallelized, regardless of the API used.  At least on most single-socket hardware.  You have to know your system architecture here.

 

Thanks for the feedback.  Your comments provide me something to work on.  I can easily construct a test case where I gradually increase the time of the inner loops so that I can evaluate the effect of the overhead.  Knowing about the overhead will also provide a better base for evaluating other parts of our software which could be parallelized.



Intel Software Network Forums Statistics

8482 users have contributed to 31618 threads and 100685 posts to date.
In the past 24 hours, we have 34 new thread(s) 120 new posts(s), and 176 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member rohit5575