Avoid calling qpg_iScalar in PGet0
Unless I completely misunderstand something, I found that calling qpg_iScalar
in PGet0
(specifically, PGet1_RI2
, PGet1_RI3
, and PGet2_RI2
)degrades the performance of gradient calculations with the RI/CD approximation significantly. I suggest these calls are done only once outside loops. The following is an example of the performance improvement (CD-UHF/cc-pVTZ for benzene cation with six processes):
with qpg_iScalar
call:
--- Module alaska spent 1 minute 43 seconds ---
without qpg_iScalar
call:
--- Module alaska spent 26 seconds ---
This small change improves the performance a lot (more than I could imagine).
-
Documentation updated or not needed. -
Test created or not needed. -
Attribution in source files and CONTRIBUTORS.md
updated if necessary.