Wrong Berry phase with LOBPCG

Moderators: mverstra, aromero

Wrong Berry phase with LOBPCG

Postby antonio » Mon Mar 25, 2019 6:53 pm

Dear all,
I compiled abinit 8.10.2 on the anselm cluster using the following config parameters

Code: Select all
./configure --prefix=/home/acamm/bin/abinit-8.10.2 \
 --enable-mpi --enable-mpi-io --enable-optim="aggressive" \
 --enable-mpi-inplace \
 --enable-zdot-bugfix="yes" \
 --with-fft-flavor="fftw3-mpi" \
 --with-fft-libs="-lfftw3 -lfftw3f -lfftw3_mpi -lfftw3f_mpi -lfftw3_threads -lfftw3f_threads" \
 --with-fft-incs="-I/apps/all/FFTW/3.3.7-gompi-2018a/include" \
 --with-linalg-libs="-lscalapack -lopenblas" \
 --with-dft-flavor="libxc" \
 --with-libxc-libs="-L/home/acamm/local/lib/libxc-3.0.0/lib -lxcf90 -lxc" \
 --with-libxc-incs="-I/home/acamm/local/lib/libxc-3.0.0/include" \
 FC=mpif90 \
 CC=mpicc \
 CXX=mpicxx


I am using norm-conserving pseudopotentials downloaded from the abinit website.
I ran a berryphase calculation in the presence of electric field testing different combinations of fftalg and wfoptalg options to improve the speed of the calculation. Unfortunately, only the wfoptalg=0 (file out_1 attached) gives reliable values of the forces on the atoms and the polarization, but it's the slowest. Whenever the LOBPCG algorithm is active, the forces on the atoms are larger and the polarization is smaller by 2-3 order of magnitude with respect to the case in which wfoptalg=0. In the examples I posted here, with wfoptalg!=0 I used nbdblock=1 to reduce to the minimum numerical instabilities but I get the same differences in the forces and polarization which I get with nbdblock>1. I also tested ortalg=2 with wfoptalg!=0 (file out_4 attached) but with no results.

I need to do several of this calculations to compute the phonons with the frozen phonon approach. Unfortunately, the use of wfoptalg=0 requires a too large computation time and makes this approach prohibitive; on the other side, the DFPT approach has other issues; the combination of wfoptalg=114 with fftalg0=312 gives the best computation time and it would be the ideal one if it worked.

Please, note also that the run in out_2 and out_4 didn't converge because they reached the limit of 1000 scf steps; however, both are really close to the convergence and no improvement is expected to make the forces and polarization values comparable to those in the out_1 file.

I am not sure, but this problem seems to be related to this topic I opened some time ago.

Output files are large and cannot be uploaded here. This is the link to download them.

Thanks a lot in advance for your kind help.

Antonio
antonio
 
Posts: 49
Joined: Tue Apr 23, 2013 6:16 pm

Re: Wrong Berry phase with LOBPCG

Postby Jordan » Tue Apr 02, 2019 4:59 pm

Dear antonio,

I implemented the wfoptalg 114 (new LOBPCG version) (BTW wfoptalg 4 should not be used)
My remarks :
1: all outputs give the same energy +/- 0.8 meV -> so I guess the calculation is correct (at least for the wave functions and the density)
2: the density are all converge pretty nicely
3: forces seem to be different but only for the z direction where there are several order of magnitude.

What I would test to be sure:
1) Add a few bands
2) I'd like to say put paral_kgb 1 and don't change anything else (this can have a consequence for LOBPCG) but I am afraid berry phase will fail so go to next point.
3) Test just one GS calculation with LOBPCG, with and witout paral_kgb (no berry phase) and compare forces with defautl wfoptalg 0
4) If everything is the same except the forces, I would suggest to switch to PAW and redo previous test. If the problem is still there, then I know exactly where the problem is.

Cheers

Jordan
Jordan
 
Posts: 281
Joined: Tue May 07, 2013 9:47 am

Re: Wrong Berry phase with LOBPCG

Postby antonio » Wed Apr 10, 2019 10:47 am

Dear Jordan,

concerning your remarks:
1) yes, the energy is OK,
2) also the density is OK, and
3) forces are different only along the z direction because the electric field is applied along only the z direction

Concerning the tests:
1) I cannot try it because with electric field the number of bands must be equal to the number of occupied bands;
2) paral_kgb doesn't work with Berry phase, hence with E-field turned on;
3) without Berry phase calculation everything is OK;
4) I tested the same calculation with paw. I first got a converged scf without E-field, then I got the wfk and den with a Berry phase calculation starting from the previous converged scf without e-field. Starting from the wfk and den of the Berry phase calculation, I then set wfoptalg 114: the polarization and the forces are similar to the case with wfoptalg 114 and NC pseudos, then the problem persists. With wfoptalg 114, the single scf step takes about 1:12 min with NC pseudos and 3:25 min with paw but the convergence is way much faster with paw (11 steps needed with paw against 118 steps with NC).

So, the optimal setup would be use paw with wfoptalg 114. I attach the output of the paw calculation with wfoptalg 114. I tried to test the paw case with default wfoptalg but each scf step takes about 1h and the calculation is still far to converge.

Please, let me know if there are other tests which I can do to help to solve the problem.

Thanks

Antonio
Attachments
out.in
(243.82 KiB) Downloaded 18 times
antonio
 
Posts: 49
Joined: Tue Apr 23, 2013 6:16 pm


Return to Response calculations

Who is online

Users browsing this forum: No registered users and 2 guests