not getting 100% of CPUs performance

General OpenMP discussion

not getting 100% of CPUs performance

Postby Pomeron » Mon Jan 30, 2012 7:04 am

Dear All,

I wanted to parallelize "for" loop with usual #pragma omp parallel for. The code runs perfectly, but the usage of all my cores(4) is not constant. When the program starts, I see 100% of CPU usage (by using Resource Monitor in Windows 7), each of four cores is loaded. It's perfect and should be so. But then I see, that the total load (according to Resource Monitor) drops to 75%, 50% or even 25% during the run (I see, that some of the cores does nothing during the run). This is very strange, since I expect all of them to perform calculation.

I tried to play with num_threads(), omp_set_num_threas(), e.t.c. It does not help. Sometimes, the code runs 100% till the end, but more often it drops down during the run.

I do NOT run anything in parallel (program) at that time, I use only VS2008 with OpenMP, that is it.

Does anyone have ideas why it so?

Thanks!

P.
Pomeron
 

Re: not getting 100% of CPUs performance

Postby DibyenduDas1 » Tue Feb 21, 2012 9:03 pm

Your threads are probably suffering from load imbalance. You need to study the code to see whether all the threads have a similar kind of load or not. Also, please check your configuration to see what scheduling algorithm you are using.
DibyenduDas1
 


Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 3 guests