[ase-users] Problem with ionic relaxation in dacapo over >1 machines and RedHat 5
berit at berithinnemann.com
berit at berithinnemann.com
Fri Jan 23 13:44:08 CET 2009
Dear Dacapo and ASE users,
I am resending this message from a different email address due to problems. Sorry for the multiple messages.
I have a problem with RedHat 5.2, when trying to run a dacapo calculation including ionic relaxation. The example script (CO in a box) is attached below.
I observe the following:
When I run this calculation on one machine (in this case HTDFT013) it runs without errors and completes the ionic relaxation steps.
If I start the calculation on another machine (the calculation itself will still run on HTDFT013 due to hostfile) the calculation stops when taking the first ionic step with the error message
Traceback (most recent call last):
> File "./script15687.py", line 8, in ?
> s.connect(("",16712))
> File "<string>", line 1, in connect
> socket.error: (111, 'Connection refused')
Has anybody had problems with dacapo and python sockets on RedHat 5? I have never seen this problem on RedHat 4.
I would be grateful for any input. Thanks a lot, Berit
script CO.py
---------------------------------------------------------------------
#!/usr/bin/env python
"""CO box
test script
"""
import os
from Dacapo import Dacapo
from ASE import Atom,ListOfAtoms
from ASE.Filters.Subset import Subset
from ASE.Dynamics.QuasiNewton import QuasiNewton
from ASE.Trajectories import NetCDFTrajectory
from math import sqrt
Ry = 13.6058
#Convergence function for the minimizer
def Converged():
f = atoms.GetGeneralizedForces()
max_f = max(f**2)
return max_f < 0.01**2
atoms = ListOfAtoms([Atom('C', (0.0, 0.2, -0.01)),
Atom('O', ( -0.01, 0.01, 1.1))] )
atoms.SetUnitCell([(10.0 , -0.1, 0.01),
( 0.01, 10.0,0.0),
(-0.02, 0.1, 10.0)], fix = True)
#General filename for all output files
filename = 'outCO'
ncfile = filename+'.nc'
txtfile = filename+'.txt'
trajfile = filename+'.traj'
calc = Dacapo(kpts=(1,1,1),
planewavecutoff=25*Ry,
densitycutoff = 35*Ry,
nbands=15,
usesymm=False)
calc.SetXCFunctional('RPBE')
calc.SetElectronicTemperature(0.01)
calc.SetSpinPolarized(False)
calc.SetExecutable('/home/adminuser/bin/dacapo_gfortran_8proc_HTDFT013.run')
# Set all the needed PSPs, use the dacapo default ones when possible
calc.SetPseudoPotential(6,'/home/adminuser/dacapo/psp/C/PW91/C_us_gga.pseudo')
calc.SetPseudoPotential(8,'/home/adminuser/dacapo/psp/O/PW91/co_gef_e13_gga.pseudo')
calc.SetNetCDFFile(ncfile)
calc.SetTxtFile(txtfile)
calc.StayAliveOn()
atoms.SetCalculator(calc)
#Get initial potential energy
Epot = atoms.GetPotentialEnergy()
dyn = QuasiNewton(atoms, converged = Converged, logfilename=filename+'-QN.log', \
hessianfilename=filename + '-hessian.pickle', radius = 0.01)
path = NetCDFTrajectory(trajfile,atoms)
dyn.Attach(path)
path.Update()
if not dyn.Converge(maxsteps=150):
print "failed"
Epot = atoms.GetPotentialEnergy()
dyn.WriteHessian('hessian.pickle')
More information about the ase-users
mailing list