Multicore convergence problem


Clicked A Few Times
I am trying to compute the DFT ground state of a dimer but it doesn't converge. However, if the calculation is done with a single core it converges just fine, but if i try with 2 or more cores (in the same node) there is a convergence problem:

1 core
      convergence    iter        energy       DeltaE   RMS-Dens  Diis-err    time
 ---------------- ----- ----------------- --------- --------- ---------  ------
 d=10,ls=0.0,diis     1   -920.6521711415 -2.27D+03  6.46D-01  9.06D-01   402.9
                                                     6.46D-01  9.06D-01
 d=10,ls=0.0,diis     2   -920.4743487333  1.78D-01  4.29D-01  1.35D+00   436.3
                                                     4.29D-01  1.35D+00
 d=10,ls=0.0,diis     3   -921.0395555969 -5.65D-01  6.77D-02  2.96D-02   469.5
                                                     6.77D-02  2.96D-02
 d=10,ls=0.0,diis     4   -921.0747901994 -3.52D-02  1.84D-02  1.01D-02   502.8
                                                     1.84D-02  1.01D-02
 d=10,ls=0.0,diis     5   -921.0828538534 -8.06D-03  1.97D-01  5.74D-04   539.4
                                                     1.97D-01  5.74D-04
  Resetting Diis
 d=10,ls=0.0,diis     6   -921.0838201050 -9.66D-04  4.55D-02  6.85D-05   576.0
                                                     4.55D-02  6.85D-05
 d=10,ls=0.0,diis     7   -921.0839396400 -1.20D-04  1.43D-02  3.38D-05   612.4
                                                     1.43D-02  3.38D-05
 d=10,ls=0.0,diis     8   -921.0839436451 -4.01D-06  1.68D-03  5.16D-05   648.7
                                                     1.68D-03  5.16D-05
 d=10,ls=0.0,diis     9   -921.0839696838 -2.60D-05  6.67D-04  3.40D-07   685.1
                                                     6.67D-04  3.40D-07
 d=10,ls=0.0,diis    10   -921.0839711474 -1.46D-06  1.80D-04  1.28D-07   721.5
                                                     1.80D-04  1.28D-07
 d=10,ls=0.0,diis    11   -921.0839713812 -2.34D-07  8.40D-06  8.40D-09   757.8
                                                     8.40D-06  8.40D-09
 d=10,ls=0.0,diis    12   -921.0839714117 -3.05D-08  2.38D-05  3.94D-09   794.1
                                                     2.38D-05  3.94D-09
 d=10,ls=0.0,diis    13   -921.0839714180 -6.37D-09  4.95D-06  1.27D-10   830.6
                                                     4.95D-06  1.27D-10
 d=10,ls=0.0,diis    14   -921.0839714188 -7.81D-10  7.59D-07  3.18D-11   866.9
                                                     7.59D-07  3.18D-11
 d=10,ls=0.0,diis    15   -921.0839714189 -1.14D-10  4.11D-07  3.32D-12   903.1
                                                     4.11D-07  3.32D-12
 d=10,ls=0.0,diis    16   -921.0839714190 -2.32D-11  1.84D-07  9.01D-13   939.5
                                                     1.84D-07  9.01D-13
 d=10,ls=0.0,diis    17   -921.0839714190 -6.37D-12  9.46D-08  9.65D-14   975.8
                                                     9.51D-08  9.65D-14
 d=10,ls=0.0,diis    18   -921.0839714190  1.82D-12  2.78D-08  3.39D-14  1012.1
                                                     2.83D-08  3.39D-14
 d=10,ls=0.0,diis    19   -921.0839714190 -6.82D-12  3.29D-09  1.67D-14  1048.3
                                                     3.69D-09  1.67D-14

6 cores
   convergence    iter        energy       DeltaE   RMS-Dens  Diis-err    time
 ---------------- ----- ----------------- --------- --------- ---------  ------
 d=10,ls=0.0,diis     1   -920.6521728406 -2.27D+03  1.24D+03  9.06D-01    69.4
                                                     1.24D+03  9.06D-01
 Grid integrated density:     136.000498367341
 Requested integration accuracy:   0.10E-06
 d=10,ls=0.0,diis     2   -918.8821729795  1.77D+00  2.11D+02  5.54D+01    77.2
                                                     2.11D+02  5.54D+01
 Grid integrated density:     136.000515037203
 Requested integration accuracy:   0.10E-06
 d=10,ls=0.0,diis     3   -921.2404563648 -2.36D+00  1.96D+01  7.60D+01    85.0
                                                     1.96D+01  7.60D+01
 Grid integrated density:     136.000524879525
 Requested integration accuracy:   0.10E-06
 d=10,ls=0.0,diis     4   -921.5097663650 -2.69D-01  6.97D+01  7.65D+01    92.7
                                                     6.97D+01  7.65D+01
 Grid integrated density:     136.000498019282
 Requested integration accuracy:   0.10E-06
 d=10,ls=0.5,diis     5   -923.3994279259 -1.89D+00  3.41D+01  7.00D+01   100.5
                                                     3.42D+01  7.00D+01
...
 Grid integrated density:     135.999036053233
 Requested integration accuracy:   0.10E-06
 d=10,ls=0.5,diis   999  -1072.1467435107  1.09D-04  7.15D-03  7.19D-07  8508.4
                                                     9.01D-03  6.78D-07
 Grid integrated density:     135.999035868138
 Requested integration accuracy:   0.10E-06
 d=10,ls=0.5,diis  1000  -1072.1463867324  3.57D-04  1.18D-03  1.62D-06  8516.9
                                                     6.75D-04  7.39D-07



I have noticed that RMS-Dens in the first iteration differs by at least 3 orders of magnitude; i am not sure if this is important or relevant though.

I am running Ubuntu 16.04 and have tried both the NWChem 6.6 version from the repositories, as well as an Intel compiled version by me and this convergence issue persists. What might be the problem and what could be done to solve it?

Thanks in advance for any suggestions.

Forum Vet
Input file
Could you please post the input file so that we can debug the problem?
Thanks

Clicked A Few Times
Input file for the DFT calculation is

title "A-T dimer"

echo

start at
memory total 10000 mb stack 9000 mb heap 100 mb global 900 mb noverify
echo

geometry "at" units angstroms noautosym nocenter noautoz
N    -0.40954188    -0.94934311     0.00000000
C    -1.63660831    -1.55942716     0.00000000
N    -1.90163266    -2.87912830     0.00000000
C    -0.74752258    -3.61165618     0.00000000
C     0.58125701    -3.12668555     0.00000000
C     0.73862323    -1.69715116     0.00000000
N    -0.60888660    -5.00018611     0.00000000
C     0.76436016    -5.26961239     0.00000000
N     1.51635688    -4.17231765     0.00000000
N     1.94577801    -1.07553854     0.00000000
H    -2.50698443    -0.84102108     0.00000000
H    -1.39634054    -5.68625142     0.00000000
H     1.15569280    -6.31989332     0.00000000
H     2.80404900    -1.66924582     0.00000000
H     2.00685017    -0.01048033     0.00000000
N    -0.36195071     1.84704583     0.00000000
C    -1.62459170     2.45114445     0.00000000
N    -1.57382337     3.86330433     0.00000000
C    -0.37972337     4.59025829     0.00000000
C     0.84910055     3.97970073     0.00000000
C     0.88019664     2.49146263     0.00000000
O     1.95509324     1.83794061     0.00000000
O    -2.69481591     1.82289603     0.00000000
C     2.18158402     4.70999678     0.00000000
H    -0.36878337     0.74415905     0.00000000
H    -2.50627834     4.33494136     0.00000000
H    -0.49160533     5.70869938     0.00000000 
H     2.79702259     4.42176642     0.90586101
H     2.04026147     5.83247569     0.00000000
H     2.79702259     4.42176642    -0.90586101
end


basis spherical
* library 6-31++G**
end

basis "cd basis"
* library "Ahlrichs Coulomb Fitting"
end


set geometry "at"
charge 0
dft
  xc xcamb88 1.00 lyp 0.81 vwn_5 0.19 hfexch 1.00
  cam 0.33 cam_alpha 0.19 cam_beta 0.46
  odft
  mult 1
  vectors input atomic output "at.movecs"
  convergence density 1d-8 ncydp 1000 damp 10
  grid fine nodisk
  maxiter 1000
end
set lindep:n_dep 0
task dft

Forum Vet
Thank you for providing the input file.
Unfortunately, I was not able to reproduce your failure.
Could you please upload the two output files to a public website?

Thanks

Clicked A Few Times
Thank you for support.

Just to make sure i have not overlooked anything, i have rerun the calculation with the above input file on 1 and 6 cores and the output files are

1 core
6 cores

Forum Vet
I am still no sure to understand what goes wrong.
Anyhow,
Could you try to add the keyword "direct" in the dft input section and see how the 6 cores run goes?

Clicked A Few Times
Well, it still doesn't converge, but seems to take a different path now:

6 cores direct

I have also tried with 'grid xfine' (and 'direct') keyword and it still doesn't converge though this time it reaches the correct ground state as is evident from the DFT energy:

6 cores direct xfine

Forum Vet
Those two output files look fine to me. The SCF does not converge since you are asking for a very tight convergence value of 1d-8 on the density.
My conclusion is something goes wrong on your system when conventional SCF (a.k.a disk-based) is used, while direct SCF works fine.
The following DFT input section should make your SCF converge

dft
  direct
  xc xcamb88 1.00 lyp 0.81 vwn_5 0.19 hfexch 1.00
  cam 0.33 cam_alpha 0.19 cam_beta 0.46
  odft
  mult 1
  vectors input atomic output "at.movecs"
  tolerances acccoul 15
  convergence energy 1d-11 density 1d-8
  grid fine nodisk
  maxiter 1000
end

Clicked A Few Times
Still no convergence after 1000 iterations:

6 cores direct tol


Forum >> NWChem's corner >> Running NWChem