I'm still not sure how to reproduce this, but it is certainly NOT a code-issue. I just hope I'm missing something easy, or this is a known issue with a known workaround.
I have a script that uses ParallelDo
and takes several minutes to run. It usually works fine and my CPU is all time close to 100% usage.
Then something changes (not sure, but likely causes are hibernating or --most likely-- running on battery rather than plugged-in) and only one parallel kernels runs at full capacity (at times, two, but no more than that,) and CPU usage rarely reaches 50%.
It wouldn't really be an issue, if it didn't go back to normal after plugging-in, nor after killing the parallel kernels. Not even after quitting the kernel or restarting Mathematica. So far it seems the only solution is restarting Windows. (which makes me think the issue is rather system-related.)
My system configuration is:
- Dell Inspiron 15, 7000 series
- 4 cores, 8 logical processors
- 8 GB RAM
- Windows 10
- Mathematica 11.0
Any thoughts would be appreciated.