[ase-users] Parallelization over images with arbitrary calculator
Benedikt Ziebarth
benedikt.ziebarth at kit.edu
Tue Feb 12 14:46:15 CET 2013
Hi there,
I am looking for a way to start a NEB calculation with image
parallelization using siesta.
In my calculations 6 CPUs are distributed over 3 images, therefore each
image should run with 2 CPUs.
Since the siesta calculator does not directly support the
parallelization, I was trying a work around by starting the neb-python
script using
mpirun -np 3 neb.py
and in "run_siesta.py" I was changing the way how siesta is started
from "siesta" to "mpirun -np 2 siesta"
the neb.py starts up correctly but when siesta is initialized, it just
crashed with the error message "OOB: Connection to HNP lost" and no
further information or error message. The siesta output is empty.
If I dont change "siesta" to "mpirun -np 2 siesta" it runs fine.
Cheers and thanks for any help in advance
Benedikt Ziebarth
import mpi4py
from ase import *
import ase.io as io
from ase.calculators.siesta import Siesta
import time
from ase.optimize import MDMin
import os
from ase.neb import NEB
from ase.parallel import rank, size
from ase.io.trajectory import PickleTrajectory
import time
initial = io.read('init.traj')
final = io.read('final.traj')
numimages=3
print size
print rank
assert numimages == size
images = [initial]
calc=['z']*numimages
for i in range(numimages):
print calc[i]
calc[i]=Siesta(label='IMAGE_%d'%i,\
xc='PBE',\
meshcutoff=200 * 13.6,\
basis='dzp',\
kpts=[1,1,4])
calc[i].set_fdf('Diag.ParallelOverK',True)
for i in range(numimages):
image = initial.copy()
if i == rank:
image.set_calculator(calc[i])
images.append(image)
images.append(final)
time.sleep(rank*1) #needed to avoid some copy errors of the pseudo
potential files
neb = NEB(images, parallel=True)
neb.interpolate()
qn = MDMin(neb)
time.sleep(rank*1) #needed to avoid some copy errors of the pseudo
potential files
traj = PickleTrajectory('neb%d.traj' % rank, 'w', images[1 + rank],
master=True)
qn.attach(traj)
qn.run(fmax=0.05)
More information about the ase-users
mailing list