I started some computations on Gamess.

For instance, when I compute the frequencies of an optimized structure, I see in the terminal that the job only uses 40% of the CPU core most of time (sometimes it goes to 100%). When I decide to provide 2 cores for the job, it only uses something like 20-25% of each core most of the time (and sometimes 100% of each core too). Why would not the task take maximum power to achieve the computations ?

  • $\begingroup$ I probably won't be able to answer, but for those who can, it might be helpful if you could post the MWE (minimal working example) for the code you are running alongside with the hardware and OS specs. $\endgroup$
    – andselisk
    Apr 7 '19 at 13:52
  • 3
    $\begingroup$ I'd assume that you see a lot of disk activity and that fetching from disk isn't counted against the CPU. Also you have a multitasking system. A modern computer has dozens of processes running at any given time. So the other processes are not counted against the one you're monitoring. $\endgroup$
    – MaxW
    Apr 7 '19 at 14:45
  • 3
    $\begingroup$ Without knowing specifics / doing any profiling: sever bottlenecks often the disk reading-writing and memory use. Different steps of calculations can scale very differently, also can have different bottlenecks, so it is not rare that CPU use goes up at certain steps, while goes down in others. $\endgroup$
    – Greg
    Apr 7 '19 at 15:50
  • $\begingroup$ Without knowing any specifics about Gamess: some programs allow for the explicit specification of algorithms concerning disk usage for storage vs. recalculation of integrals, "Conventional" and "Direct" are the terms used. $\endgroup$
    – TAR86
    Apr 7 '19 at 16:42
  • 5
    $\begingroup$ I'm voting to close this question as off-topic because it's not about chemistry. $\endgroup$
    – Mithoron
    Apr 7 '19 at 22:15

Most applications in theoretical chemistry are memory and or memory bandwidth bound. Especially due to shared memory bandwidth it can be bad for your performance if you use too many processes.

In addition you benefit from additional processes only if your algorithm is more or less parallel. If there are too many serial parts/communication overhead you will have idle cores, if your process number is too high. (Amdahl's law)

Take home message:

  1. Time the execution of your code with a non trivial example.
  2. More is not always better.

Not the answer you're looking for? Browse other questions tagged or ask your own question.