Ejemplo n.º 1
0
# output benchmark parameters
if rank == 0:
    print("#" * 60)
    print("GPAW benchmark: Single Carbon Fullerene")
    print("  grid spacing: h=%f" % h)
    print("  Brillouin-zone sampling: kpts=" + str(kpts))
    print("  MPI tasks: %d" % size)
    print("  using CUDA (GPGPU): " + str(use_cuda))
    print("  using pyMIC (KNC) : " + str(use_mic))
    print("  using CPU (or KNL): " + str(use_cpu))
    print("#" * 60)
    print("")

# compatibility hack for the eigensolver
rmm = RMM_DIIS(cuda=True)
rmm.niter = 2
# setup parameters
args = {
    'h': h,
    'nbands': -180,
    'occupations': FermiDirac(0.2),
    'kpts': kpts,
    'xc': 'PBE',
    'mixer': Mixer(0.1, 5, 100),
    'eigensolver': rmm,
    'maxiter': maxiter,
    'xc_thread': False,
    'txt': txt
}
if use_cuda:
Ejemplo n.º 2
0
    ( 5.067, 7.323, 0.662),  ( 5.785, 6.667, 0.703),  ( 4.718, 7.252, 1.585)]

prefix = 'b256H2O'
L = 9.8553729
atoms = Atoms('32(OH2)',
            positions=positions)
atoms.set_cell((L,L,L),scale_atoms=False)
atoms.set_pbc(1)
r = [2, 2, 2]
atoms = atoms.repeat(r)
n = [56 * ri for ri in r]
# nbands (>=128) is the number of bands per 32 water molecules
nbands = 2*6*11 # 132
for ri in r: nbands = nbands*ri
# the next line decreases memory usage
es = RMM_DIIS(keep_htpsit=False)
calc = GPAW(nbands=nbands,
            # uncomment next two lines to use lcao/sz
            #mode='lcao',
            #basis='sz',
            gpts=tuple(n),
            maxiter=5,
            width = 0.01,
            eigensolver = es,
            txt=prefix + '.txt',
            )
atoms.set_calculator(calc)
from gpaw.mpi import rank
try:
    pot = atoms.get_potential_energy()
except ConvergenceError:
Ejemplo n.º 3
0
tube = nanotube(6, 6, 10)

if rank == 0:
    print "Starting solver..."
tstart = time.time()
if use_mic:
    txt = 'out_nanotube_large_mic_p%d.txt' % size
else:
    txt = 'out_nanotube_large_p%d.txt' % size

conv = {'eigenstates': 1e-4, 'density': 1e-2, 'energy': 1e-3}
calc = GPAW(  # gpts=(96, 96, 128), 
    h=0.2,
    nbands=-60,
    width=0.1,
    poissonsolver=PoissonSolver(eps=1e-12),
    eigensolver=RMM_DIIS(keep_htpsit=False),
    # eigensolver=RMM_DIIS(),
    maxiter=6,
    mixer=Mixer(0.1, 5, 50),
    convergence=conv,
    txt=txt)
tube.set_calculator(calc)
try:
    e = tube.get_potential_energy()
except ConvergenceError:
    pass
tend = time.time()
if rank == 0:
    print "time for calculation: {0:.2f}sec".format(tend - tstart)
Ejemplo n.º 4
0
txt = 'output.txt'
maxiter = 16
conv = {'eigenstates' : 1e-4, 'density' : 1e-2, 'energy' : 1e-3}

# output benchmark parameters
if rank == 0:
    print("#"*60)
    print("GPAW benchmark: Carbon Nanotube")
    print("  nanotube dimensions: n=%d, m=%d, length=%d" % (n, m, length))
    print("  MPI task: %d out of %d" % (rank, size))
    print("  using MICs: " + str(use_mic))
    print("#"*60)
    print("")

# setup the system
atoms = nanotube(n, m, length)
calc = GPAW(h=0.2, nbands=-60, width=0.1,
            poissonsolver=PoissonSolver(eps=1e-12),
            eigensolver=RMM_DIIS(keep_htpsit=True),
            maxiter=maxiter,
            mixer=Mixer(0.1, 5, 50),
            convergence=conv, txt=txt)
atoms.set_calculator(calc)

# execute the run
try:
    atoms.get_potential_energy()
except ConvergenceError:
    pass

Ejemplo n.º 5
0
    print("  dimensions: x=%d, y=%d, z=%d" % (x, y, z))
    print("  grid spacing: h=%f" % h)
    print("  Brillouin-zone sampling: kpts=" + str(kpts))
    print("  MPI task: %d out of %d" % (rank, size))
    print("  using MICs: " + str(use_mic))
    print("#" * 60)
    print("")

# setup the system
atoms = bulk('Si', cubic=True)
atoms = atoms.repeat((x, y, z))
calc = GPAW(
    h=h,
    nbands=-20,
    width=0.2,
    kpts=kpts,
    xc='PBE',
    maxiter=maxiter,
    txt=txt,
    eigensolver=RMM_DIIS(niter=2),
    parallel={'sl_auto': True},
    mixer=Mixer(0.1, 5, 100),
)
atoms.set_calculator(calc)

# execute the run
try:
    atoms.get_potential_energy()
except ConvergenceError:
    pass