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?