[gpaw-users] Diagonalization error during CI-NEB

Jens Jørgen Mortensen jjmo at dtu.dk
Fri Nov 10 07:24:01 CET 2017


On 11/08/2017 01:05 PM, Divya Bohra - TNW via gpaw-users wrote:
>
> Dear GPAW users,
>
> I am attempting to do a CI-NEB calculation for a simple Ag+adsorbate 
> system using the below code. I am getting a general diagonalization 
> error in lapack which is to say that somehow the “H_2n2n” and/or 
> “S_2n2n” matrices in Davidson eigensolver are not diagonalizable. It 
> would really help if someone could help me understand how these 
> matrices are populated and what properties are they supposed to have.
>
> I ran another code with the exact same parameters but a slightly 
> different molecule (same number and type of atoms) which is so far 
> running without error. Also, I have never encountered this issue 
> during normal geometrical optimization. Could this be due to the 
> parameters used by the NEB solver? Any help in understanding this 
> issue will be greatly appreciated
>

I think it's because you use the same calculator for all the images.  
Try giving each image its own calculator.  You can also run all the 
images in parallel like shown here:

     https://wiki.fysik.dtu.dk/gpaw/tutorials/neb/neb.html

Jens Jørgen

> Cheers,
>
> Divya
>
> from __future__ import print_function
>
> from ase.constraints import FixAtoms
>
> from ase.optimize import BFGS, QuasiNewton, LBFGS
>
> from ase.lattice.cubic import FaceCenteredCubic
>
> from ase.build import fcc110, add_adsorbate
>
> from gpaw import GPAW, PW, FermiDirac, Mixer
>
> from ase.io import write, read,Trajectory
>
> from ase import Atoms, Atom
>
> from ase.neb import NEB
>
> from ase.optimize.fire import FIRE
>
> calc = GPAW('Ag110_2x3x6_BEEF.gpw')
>
> /#calc=GPAW(mode=PW(450), xc='BEEF-vdW', basis='dzp', 
> gpts=(48,48,160), kpts=(3,3,1), occupations=FermiDirac(0.1), 
> mixer=Mixer(beta=0.1, nmaxold=5, weight=50.0))/
>
> CO2_slab=read('CINEB_Ag110_2x3x6_CO2-H_reference.traj')
>
> OCHO_slab=read('Ag110_2x3x6_OCHOSontop_BEEF.traj')
>
> calc.set(txt='CINEB_Ag110_2x3x6_CO2-OCHO_Tafel.txt')
>
> initial = CO2_slab
>
> final = OCHO_slab
>
> # Make a band consisting of 5 images:
>
> images = [initial]
>
> images += [initial.copy() for i in range(4)]
>
> images += [final]
>
> constraint = [atom.tag > 2 for atom in initial]
>
> fixlayers = FixAtoms(mask=constraint)
>
> for image in images:
>
> image.set_calculator(calc)
>
> image.set_constraint(fixlayers)
>
> neb = NEB(images, climb=True)
>
> neb.interpolate('idpp')
>
> #Run NEB calculation
>
> opt = FIRE(neb, trajectory='CINEB_Ag110_2x3x6_CO2-OCHO_Tafel.traj', 
> logfile='CINEB_Ag110_2x3x6_CO2-OCHO_Tafel.log')
>
> opt.run(fmax=0.01) /#diagonalization error/
>
> for i in range(1, 5):
>
> opt.attach(io.Trajectory('CINEB_Ag110_2x3x6_CO2-OCHO_Tafel-%d.traj' % 
> i, 'w', images[i]))
>
> opt.attach(io.write('CINEB_Ag110_2x3x6_CO2-OCHO_Tafel-%d.cif' % i, 
> 'w', images[i]))
>
> -----------------------------------------------------------------------
>
> /rank=12 L00: Traceback (most recent call last):/
>
> /rank=12 L01:   File "CINEB_Ag110_2x3x6_CO2-OCOH_Tafel.py", line 36, 
> in <module>/
>
> /rank=12 L02:     opt.run(fmax=0.01)/
>
> /rank=12 L03:   File 
> "/usr/lib/python2.7/site-packages/ase/optimize/optimize.py", line 155, 
> in run/
>
> /rank=12 L04:     f = self.atoms.get_forces()/
>
> /rank=12 L05:   File "/usr/lib/python2.7/site-packages/ase/neb.py", 
> line 150, in get_forces/
>
> /rank=12 L06:     energies[i] = images[i].get_potential_energy()/
>
> /rank=12 L07:   File "/usr/lib/python2.7/site-packages/ase/atoms.py", 
> line 676, in get_potential_energy/
>
> /rank=12 L08:     energy = self._calc.get_potential_energy(self)/
>
> /rank=12 L09:   File "/home/nrenaud/gpaw-1.1.0/gpaw/aseinterface.py", 
> line 48, in get_potential_energy/
>
> /rank=12 L10:     self.calculate(atoms, converge=True)/
>
> /rank=12 L11:   File "/home/nrenaud/gpaw-1.1.0/gpaw/paw.py", line 293, 
> in calculate/
>
> /rank=12 L12:     self.occupations, self.forces):/
>
> /rank=12 L13:   File "/home/nrenaud/gpaw-1.1.0/gpaw/scf.py", line 47, 
> in run/
>
> /rank=12 L14:     wfs.eigensolver.iterate(hamiltonian, wfs)/
>
> /rank=12 L15:   File 
> "/home/nrenaud/gpaw-1.1.0/gpaw/eigensolvers/eigensolver.py", line 67, 
> in iterate/
>
> /rank=12 L16:     e, psit_nG = self.iterate_one_k_point(hamiltonian, 
> wfs, kpt)/
>
> /rank=12 L17:   File 
> "/home/nrenaud/gpaw-1.1.0/gpaw/eigensolvers/davidson.py", line 204, in 
> iterate_one_k_point/
>
> /rank=12 L18:     general_diagonalize(H_2n2n, eps_2n, S_2n2n)/
>
> /rank=12 L19:   File 
> "/home/nrenaud/gpaw-1.1.0/gpaw/utilities/lapack.py", line 106, in 
> general_diagonalize/
>
> /rank=12 L20:     raise RuntimeError('general_diagonalize error: %d' % 
> info)/
>
> /rank=12 L21: RuntimeError: general_diagonalize error: 0/
>
> /GPAW CLEANUP (node 12): <type 'exceptions.RuntimeError'> occurred.  
> Calling MPI_Abort!/
>
> /---------------------------------------------------------------------------/
>
>
>
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users



More information about the gpaw-users mailing list