[gpaw-users] RuntimeError: Atoms objects on different processors are not identical!
Jens Jørgen Mortensen
jensj at fysik.dtu.dk
Fri Jan 11 10:55:31 CET 2013
Den 10-01-2013 18:55, Nichols A. Romero skrev:
> That is worth a try.
>
> But the atoms not being identical implies that the forces are slightly different.
Not necessarily: The QuasiNewton optimizer uses forces *and* the energy
to move the atoms.
> I think Jussi approach was to ensure
> that everyone has the same hartree potential.
>
> Can someone point me to the code where we compute the forces? There should be an MPI_allreduce or MPI_Bcast on the world communicator to ensure that
> all MPI tasks have the same forces.
It's here:
https://trac.fysik.dtu.dk/projects/gpaw/browser/trunk/gpaw/forces.py#L41
> The other thing that one could done is to just propagate the atoms on one MPI task, and then broadcast the updated positions. I am not sure what
> we do now.
ASE will propagate on all cores. This seems to work fine as long as
energies and forces are identical on all cores. Lets hope this
continues to work ...
Jens Jørgen
> ----- Original Message -----
>> From: "Jens Jørgen Mortensen" <jensj at fysik.dtu.dk>
>> To: gpaw-users at listserv.fysik.dtu.dk
>> Sent: Thursday, January 10, 2013 9:42:33 AM
>> Subject: Re: [gpaw-users] RuntimeError: Atoms objects on different processors are not identical!
>> Den 14-12-2012 13:34, Juho Arjoranta skrev:
>>> Hi,
>>>
>>> I encountered this error for a couple of calculations:
>>>
>>> RuntimeError: RuntimeError: Atoms objects on different processors
>>> are
>>> not identical!
>>> 'are not identical!')
>>> Atoms objects on different processors are not identical!
>>> RuntimeError: GPAW CLEANUP (node 54): <type
>>> 'exceptions.RuntimeError'>
>>> occurred. Calling MPI_Abort!
>>>
>>>
>>> First rounds of iteration went nicely but then it just gives this
>>> error message and stops. I encountered the same in FD-mode also.
>>> What
>>> could cause this? Here's my input:
>> I think this problem might have been fixed in revision 9617:
>>
>> https://trac.fysik.dtu.dk/projects/gpaw/changeset/9617
>>
>> Could you try again with the latest developer version of GPAW?
>>
>> Jens Jørgen
>>
>>> #Fcc is just gives the positions for the atoms, the cellsize and
>>> counts the atoms.
>>>
>>> from Fcc import Fcc
>>> from ase.parallel import paropen
>>> from ase import Atoms
>>> from gpaw import GPAW, Mixer, FermiDirac
>>> from gpaw.poisson import PoissonSolver
>>> from gpaw.dipole_correction import DipoleCorrection
>>> from ase.constraints import FixAtoms
>>> from ase.optimize import QuasiNewton
>>> from numpy import zeros
>>>
>>> resultfile = paropen('4x4x4LCAO-results.txt', 'w')
>>>
>>> # Parameters for the Poisson solver
>>>
>>> ps = PoissonSolver(nn = 3, relax = 'J')
>>> correction = DipoleCorrection(ps, 2)
>>>
>>> a = 3.639
>>>
>>> asdf = Fcc(a,a,a)
>>> pos = asdf.makeFCC(4,4,4)
>>> cell = asdf.getCell(4,4,4)
>>>
>>> number = asdf.getNumber()
>>> copper = 'Cu%i' % number
>>>
>>> vac = 4.3002
>>>
>>> name = 'vacuum-%.4f' % vac
>>>
>>> # Grid to correspond a grid spacing h = 0.1654
>>>
>>> grid = (44, 44, 96)
>>>
>>> calc = GPAW(gpts = grid,
>>> mode = 'lcao',
>>> basis = 'dzp',
>>> txt = name + '.txt',
>>> xc = 'PBE',
>>> nbands = 192,
>>> parallel = {'sl_default': (5,5,54)},
>>> convergence = dict(density=1e-5),
>>> occupations = FermiDirac(width = 0.15),
>>> poissonsolver = correction,
>>> mixer=Mixer(beta=0.1, nmaxold=5, weight=100.0), #
>>> Pulay mixer
>>> kpts = (6, 6, 1))
>>>
>>> surface = Atoms(copper,
>>> positions = pos,
>>> cell=[[cell[0], 0, 0],
>>> [0, cell[1], 0],
>>> [0, 0, cell[2] + 2*vac]])
>>>
>>> surface.pbc = (True, True, False)
>>> surface.set_calculator(calc)
>>>
>>> # Fixing of the layers with 'fix' as the number of the layers to be
>>> fixed
>>>
>>> fix = 2
>>>
>>> array = zeros([number])
>>> for i in range(0, number):
>>> if (pos[i][2] < fix * a / 2):
>>> array[i] = 1
>>> surface.set_tags(array)
>>> c = FixAtoms(mask=[atom.tag == 1 for atom in surface])
>>> surface.set_constraint(c)
>>>
>>> surface.center(axis = 2) # Center the system in z-direction
>>> and add vacuum
>>>
>>> # Relaxation of the bulk
>>>
>>> relax = QuasiNewton(surface, trajectory = name + '.traj')
>>> relax.run(fmax = 0.05)
>>>
>>> energy = surface.get_potential_energy()
>>>
>>> finalpositions = surface.get_positions()
>>>
>>> # Print the results into the result file
>>>
>>> print >> resultfile, finalpositions, name, energy
>>>
>>> # Save the state of the calculation
>>>
>>> calc.write(name + '.gpw')
>>>
>>>
>>> _______________________________________________
>>> gpaw-users mailing list
>>> gpaw-users at listserv.fysik.dtu.dk
>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>> _______________________________________________
>> 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