[ase-users] NEB - parallelization over images

Isabela Man isabelac.man at gmail.com
Mon Apr 30 13:25:59 CEST 2012


Dear AlI,

*I am trying to run a NEB calculation, using the attached script :*

nimages = 3
parallel = True
climbing = False

### read initial and final state

initial = io.read('Cu2O_110_CuO_termination_CH3CH2O_NH2C6H5_vdW_r5.traj')
interpolate = False
n = size //(nimages-2) # number of cpu's per image
j = 1 + rank//n
assert (nimages-2) * n == size
images = [initial]
constraint = FixAtoms(mask = [atom.tag ==117 for atom in initial])
for i in range(1,nimages-1):
filename = id +'_'+str(i)
try:
atoms = io.read(filename+'.traj.bak')
print "Updated from traj file ",filename+'.traj.bak'
except:
atoms = initial.copy()
interpolate = True

ranks = np.arange((i-1)*n, i*n)

if rank in ranks:
poissonsolver = PoissonSolver()
correction = DipoleCorrection(poissonsolver,2)
mixer=Mixer(0.05, 5, weight=100.0)
calc = GPAW(h=0.2,
xc='RPBE',
txt=outid,
kpts=(2,2,1),
#eigensolver='cg',
#width=0.10,
occupations = FermiDirac(0.1),
#verbose=True,
mixer=mixer,
nbands = -30,
spinpol = False,
usesymm = False,
poissonsolver = correction) #calc.attach(calc.write,1,gpwdat)
atoms.set_calculator(calc)
atoms.set_constraint(constraint)
view(atoms)
images += [atoms]


images += [final]
view(images)
neb = NEB(images,parallel=parallel,climb=climbing)
neb.interpolate()

# Optimize:

optimizer = QuasiNewton(neb,trajectory = trajid, logfile =qnlogid )

#optimizer = QuasiNewton(neb)
#traj = PickleTrajectory(id+'_%d.traj' % j, 'w', images[j],
# master=(rank % n == 0))
#optimizer.attach(traj)
optimizer.run(fmax=0.05)



*After the first minimization step I get the following errors:
1. First attached log(error message) file is when I use one traj file for
all images.
*
*2. Second attached log(error message) file is when I write separately traj
files for each image.*
*
*
*Thank you
*
*Isabela
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20120430/d463fbe4/attachment.html>


More information about the ase-users mailing list