TD-DFT and OpenMP


Are there any known problems with running TD-DFT calculations using multiple processing threads?

I noticed some inconsistencies some time ago and just ignored it. But going through some old calculations I rediscovered it and thought I would run some tests. I ran the same problematic input file once with no thread specifier, once with “-nt 2” and once with “-nt 4”.

The single-threaded calculation runs great. The calculations using OpenMP both have approx 10x the number of CIS iterations before converging, and the first ~30 excited states have negative energies with a strength of 0. The SCF calculation converges on the same energy (in the same number of cycles) in all 3 calculations.

My rem section looks like this:
BASIS = 6-311G**
GUI = 2
N_SOL = 2

The calculation is a N K-edge XAS simulation on an organic molecule with around 40 atoms.

I am happy to continue testing… my next step will be to repeat the same input file without TDDFT_FAST (as I realize this isn’t an “official” feature). But figured I would post here before narrowing it down in case this is a known issue?

I am using Qchem 5.3 locally on a windows machine.

Thank for all the help :slight_smile:

It would be helpful to post the whole input. If the system is confidential, you may build a model system that can reproduce the issue.

No problem. Here are some input and output files. I just ran these again to triple-check I am not doing anything stupid! Both outputs were generated from the same input file.

It appears that TDDFT_FAST has this undesired effect, removing it leads to no differences between single-core and multiple-core runs.

That is correct – I had encountered before that the fast XAS specifically is not parallelized. However, I had not encountered cases where it gives wrong answers.

Great, thank you both for confirming that. As I mentioned I had a suspicion it might be a problem with the fast XAS. I am also pretty sure I used it before on other molecules (using OpenMP) and not got the wrong answer. Something for me to keep an eye on!

I am in contact with the developer and will submit a bug ticket, thanks for reminding me about this.

1 Like

Apologies for the belated follow-up, but this has been fixed since Q-Chem 5.4.2 (December 2021). The fast XAS is still not parallelized but should not give erroneous answers on multiple threads. The ground-state SCF can the run on multiple threads, as with any other SCF job, and if FAST_XAS=TRUE then the subsequent CIS or TDDFT/TDA job is performed on a single processor.