Commit 35a27761 authored by Jens Jørgen Mortensen's avatar Jens Jørgen Mortensen

Merge branch 'agts7' into 'master'

Use new and better tool for running AGTS tests

See merge request !352
parents 871c8d27 53c5837e
Pipeline #21376614 passed with stage
in 2 minutes and 35 seconds
def agts(queue):
queue.add('C5H12.agts.py',
walltime=25,
ncpus=8,
creates=['C5H12-gpaw.csv'])
if __name__ == "__main__":
from ase.optimize.test.C5H12 import *
def agts(queue):
queue.add('CO_Au111.agts.py',
creates=['CO_Au111.csv'])
if __name__ == "__main__":
from ase.optimize.test.CO_Au111 import *
def agts(queue):
queue.add('Cu_bulk.agts.py',
creates=['Cu_bulk.csv'])
if __name__ == "__main__":
from ase.optimize.test.Cu_bulk import *
def agts(queue):
queue.add('H2.agts.py',
walltime=25,
ncpus=8,
creates=['H2-emt.csv', 'H2-gpaw.csv'])
if __name__ == "__main__":
from ase.optimize.test.H2 import *
def agts(queue):
queue.add('N2Cu_relax.agts.py',
creates=['N2Cu-N2.csv', 'N2Cu-surf.csv'])
if __name__ == "__main__":
from ase.optimize.test.N2Cu_relax import *
def agts(queue):
jobs = [queue.add('g2_dzp.py ' + str(i), ncpus=4, walltime=800)
for i in range(10)]
queue.add('g2_dzp_csv.py', deps=jobs, creates='g2_dzp.csv')
from myqueue.job import Job
def workflow():
jobs = [Job('g2_dzp.py+{}@4x13h'.format(i)) for i in range(10)]
return jobs + [Job('g2_dzp_csv.py', deps=jobs)]
# Creates: g2_dzp.csv
from __future__ import print_function
import numpy as np
import ase.db
......
def agts(queue):
queue.add('nanoparticle.agts.py',
walltime=2 * 60 + 15,
ncpus=8,
creates=['nanoparticle.csv'])
if __name__ == "__main__":
from ase.optimize.test.nanoparticle import *
def agts(queue):
queue.add('neb.agts.py',
walltime=15 * 60,
ncpus=12,
creates=['neb-emt.csv', 'neb-gpaw.csv'])
if __name__ == '__main__':
from ase.optimize.test.neb import *
from ase.db import connect
from ase.optimize.test.systems import create_database
from gpaw import GPAW, PW
def create_database_gpaw():
create_database()
db = connect('systems.db')
systems = [row.toatoms() for row in db.select()]
db = connect('systems-gpaw.db')
for atoms in systems:
if atoms.number_of_lattice_vectors != 3:
atoms.center(vacuum=3.5)
atoms.calc = GPAW(mode=PW(500), # 'lcao',
# basis='dzp',
kpts={'density': 2.0},
txt=None)
db.write(atoms)
if __name__ == '__main__':
create_database_gpaw()
import os
def agts(queue):
if 0: # disabled - this test use a mixture of shell and python
# performs the "best performance" test from
# https://wiki.fysik.dtu.dk/gpaw/devel/benchmarks.html#memory-benchmark
#
# Set the environment variables for your system before running this script!
# Setting any variable in this script is ignored!
machine = os.environ.get('MACHINE', 'TEST')
ncores = int(os.environ.get('NCORES', 8))
#
prepare = queue.add('prepare.py',
queueopts='-l nodes=1:ppn=1',
ncpus=1, walltime=5, deps=[])
run_numactl = queue.add('run_numactl.py',
queueopts='-l nodes=1:ppn=8:xeon8',
ncpus=1, walltime=1*60, deps=[prepare])
analyse = queue.add('analyse.py',
queueopts='-l nodes=1:ppn=1',
ncpus=1, walltime=5, deps=[run_numactl],
creates=['memory_bandwidth_'+machine+'_py.png'],
show=['memory_bandwidth_'+machine+'_py.png'])
......@@ -87,46 +87,24 @@ Big tests
The directory in :git:`gpaw/test/big/` contains a set of longer and more
realistic tests that we run every weekend. These are submitted to a
queueing system of a large computer. Here is an example for Niflheim:
:git:`gpaw/test/big/niflheim.py`.
queueing system of a large computer.
Adding new tests
----------------
To add a new test, create a script somewhere in the file hierarchy ending with
.agts.py (e.g. ``submit.agts.py``). ``AGTS`` is short for Advanced GPAW Test
``agts.py`` (e.g. ``submit.agts.py``). ``AGTS`` is short for Advanced GPAW Test
System (or Another Great Time Sink). This script defines how a number of
scripts should be submitted to niflheim and how they depend on each other.
Consider an example where one script, calculate.py, calculates something and
saves a .gpw file and another script, analyse.py, analyses this output. Then
the submit script should look something like::
def agts(queue):
calc = queue.add('calculate.py',
ncpus=8,
walltime=25)
queue.add('analyse.py'
ncpus=1,
walltime=5,
deps=[calc])
def workflow():
from myqueue.job import Job
return [Job('calculate.py', cores=8, tmax='25m'),
Job('analyse.py', cores=1, tmax='5m', deps=['calculate.py'])
As shown, this script has to contain the definition of the function
``agts()`` which should take exactly one argument, ``queue``. Then
each script is added to a queue object, along with some data which
defines how and when to run the job. Note how ``queue.add()`` returns
a job object which can be used to specify dependencies.
Possible keys are:
============= ======== ============= ===================================
Name Type Default value Description
============= ======== ============= ===================================
``ncpus`` ``int`` ``1`` Number of cpus
``walltime`` ``int`` ``15`` Requested walltime in minutes
``deps`` ``list`` ``[]`` List of jobs this job depends on
``creates`` ``list`` ``[]`` List of files this job creates
(figures and other stuff for the
web-page)
============= ======== ============= ===================================
``workflow()``. See https://gitlab.com/jensj/myqueue for more details.
# Creates: hybrid.png
import numpy as np
import pylab as plt
......
# Creates: geom.png
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import patches
......
def agts(queue):
c1 = queue.add('calculate.py',
ncpus=8,
walltime=60)
from myqueue.job import Job
queue.add('plot_geom.py',
deps=c1,
creates=['geom.png'])
queue.add('plot.py',
deps=[c1],
creates=['hybrid.png'])
def workflow():
return [
Job('calculate.py@8x1h'),
Job('plot_geom.py', deps=['calculate.py']),
Job('plot.py', deps=['calculate.py'])]
# Creates: cl_field.ind_Ffe.png, qm_field.ind_Ffe.png, tot_field.ind_Ffe.png
# -*- coding: utf-8 -*-
from gpaw.mpi import world
assert world.size == 1, 'This script should be run in serial mode (with one process).'
......
def agts(queue):
c1 = queue.add('calculate.py',
ncpus=8,
walltime=60)
from myqueue.job import Job
c2 = queue.add('postprocess.py',
ncpus=8,
walltime=10,
deps=c1)
queue.add('plot.py',
deps=c2,
creates=['cl_field.ind_Ffe.png', 'qm_field.ind_Ffe.png',
'tot_field.ind_Ffe.png'])
def workflow():
return [
Job('calculate.py@8x1h'),
Job('postprocess.py@8x10s', deps=['calculate.py']),
Job('plot.py', deps=['postprocess.py'])]
# Creates: qsfdtd_vs_mie.png
import numpy as np
import pylab as plt
from ase.units import Hartree, Bohr
......
def agts(queue):
c1 = queue.add('calculate.py',
walltime=60)
from myqueue.job import Job
queue.add('plot.py',
deps=c1,
creates=['qsfdtd_vs_mie.png'])
def workflow():
return [
Job('calculate.py@1x1h'),
Job('plot.py', deps=['calculate.py'])]
# Creates: field.ind_Ffe.png
# -*- coding: utf-8 -*-
from gpaw.mpi import world
assert world.size == 1, 'This script should be run in serial mode (with one process).'
......
def agts(queue):
c1 = queue.add('calculate.py',
walltime=60)
from myqueue.job import Job
queue.add('plot.py',
deps=c1,
creates=['field.ind_Ffe.png'])
def workflow():
return [
Job('calculate.py@1x1h'),
Job('plot.py', deps=['calculate.py'])]
# Creates: Au.yml.png
import numpy as np
import matplotlib.pyplot as plt
from ase.units import _hplanck, _c, _e, Hartree
......
def agts(queue):
queue.add('plot_permittivity.py',
creates=['Au.yml.png'])
from myqueue.job import Job
def workflow():
return [
Job('plot_permittivity.py')]
def agts(queue):
queue.add('basisgeneration.py', ncpus=1, walltime=10)
queue.add('lcao_h2o.py', ncpus=1, walltime=10)
queue.add('lcao_opt.py', ncpus=1, walltime=10)
from myqueue.job import Job
def workflow():
return [
Job('basisgeneration.py@1x10m'),
Job('lcao_h2o.py@1x10m'),
Job('lcao_opt.py@1x10m')]
def agts(queue):
top = queue.add('top.py', ncpus=8)
queue.add('pdos.py', deps=top, creates='pdos.png')
from myqueue.job import Job
calc = queue.add('lcaodos_gs.py', ncpus=8)
queue.add('lcaodos_plt.py', deps=calc, creates='lcaodos.png')
def workflow():
return [
Job('top.py@8x15m'),
Job('pdos.py', deps=['top.py']),
Job('lcaodos_gs.py@8x15m'),
Job('lcaodos_plt.py', deps=['lcaodos_gs.py'])]
# Creates: lcaodos.png
import matplotlib.pyplot as plt
import numpy as np
from ase.io import read
......
# Creates: pdos.png
from gpaw import GPAW, restart
import matplotlib.pyplot as plt
......
# Creates: na2_casida_Ffe.png, na2_casida_Frho.png, na2_casida_Fphi.png
# -*- coding: utf-8 -*-
from gpaw.mpi import world
assert world.size == 1, 'This script should be run in serial mode (with one process).'
......
def agts(queue):
calc1 = queue.add('timepropagation_calculate.py',
ncpus=8,
walltime=60)
calc2 = queue.add('timepropagation_continue.py',
ncpus=8,
walltime=60,
deps=calc1)
calc3 = queue.add('timepropagation_postprocess.py',
ncpus=8,
walltime=5,
deps=calc2)
calc4 = queue.add('timepropagation_plot.py',
ncpus=1,
walltime=5,
deps=calc3,
creates=['na2_td_Ffe.png', 'na2_td_Frho.png', 'na2_td_Fphi.png'])
calc5 = queue.add('casida_calculate.py',
ncpus=8,
walltime=60)
calc6 = queue.add('casida_postprocess.py',
ncpus=8,
walltime=5,
deps=calc5)
calc7 = queue.add('casida_plot.py',
ncpus=1,
walltime=5,
deps=calc6,
creates=['na2_casida_Ffe.png', 'na2_casida_Frho.png', 'na2_casida_Fphi.png'])
from myqueue.job import Job
def workflow():
return [
Job('timepropagation_calculate.py@8x1h'),
Job('timepropagation_continue.py@8x1h',
deps=['timepropagation_calculate.py']),
Job('timepropagation_postprocess.py@8x5m',
deps=['timepropagation_continue.py']),
Job('timepropagation_plot.py@1x5m',
deps=['timepropagation_postprocess.py']),
Job('casida_calculate.py@8x1h'),
Job('casida_postprocess.py@8x5m', deps=['casida_calculate.py']),
Job('casida_plot.py@1x5m', deps=['casida_postprocess.py'])]
# Creates: na2_td_Ffe.png, na2_td_Frho.png, na2_td_Fphi.png
# -*- coding: utf-8 -*-
from gpaw.mpi import world
assert world.size == 1, 'This script should be run in serial mode (with one process).'
......
def agts(queue):
basis = queue.add('lcaotddft_basis.py', ncpus=1, walltime=10)
ag55 = queue.add('lcaotddft_ag55.py', deps=[basis], ncpus=48, walltime=100)
queue.add('lcaotddft_fig1.py', deps=[ag55], creates='fig1.png')
queue.add('lcaotddft.py', ncpus=4, walltime=40)
from myqueue.job import Job
def workflow():
return [
Job('lcaotddft_basis.py@1x10m'),
Job('lcaotddft_ag55.py@48x2h', deps=['lcaotddft_basis.py']),
Job('lcaotddft_fig1.py', deps=['lcaotddft_ag55.py']),
Job('lcaotddft.py@4x40m')]
# Creates: ind_1.12.png, ind_2.48.png
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
......
def agts(queue):
gs = queue.add('gs.py', ncpus=8, walltime=10)
td0 = queue.add('td.py', deps=[gs], ncpus=8, walltime=30)
td = queue.add('tdc.py', deps=[td0], ncpus=8, walltime=30)
queue.add('td_replay.py', deps=[td], ncpus=8, walltime=30)
spec = queue.add('spectrum.py', deps=[td], ncpus=1, walltime=2)
fdm = queue.add('td_fdm_replay.py', deps=[td], ncpus=1, walltime=5)
ksd = queue.add('ksd_init.py', deps=[gs], ncpus=1, walltime=5)
ind = queue.add('fdm_ind.py', deps=[fdm], ncpus=1, walltime=2)
queue.add('spec_plot.py', deps=[spec], ncpus=1, walltime=2,
creates=['spec.png'])
queue.add('tcm_plot.py', deps=[ksd, fdm, spec], ncpus=1, walltime=2,
creates=['tcm_1.12.png', 'tcm_2.48.png',
'table_1.12.txt', 'table_2.48.txt'])
queue.add('ind_plot.py', deps=[ind], ncpus=1, walltime=2,
creates=['ind_1.12.png', 'ind_2.48.png'])
from myqueue.job import Job
def workflow():
return [
Job('gs.py@8x10m'),
Job('td.py@8x30m', deps=['gs.py']),
Job('tdc.py@8x30m', deps=['td.py']),
Job('td_replay.py@8x30m', deps=['tdc.py']),
Job('spectrum.py@1x2m', deps=['tdc.py']),
Job('td_fdm_replay.py@1x5m', deps=['tdc.py']),
Job('ksd_init.py@1x5m', deps=['gs.py']),
Job('fdm_ind.py@1x2m', deps=['td_fdm_replay.py']),
Job('spec_plot.py@1x2m', deps=['spectrum.py']),
Job('tcm_plot.py@1x2m',
deps=['ksd_init.py', 'td_fdm_replay.py', 'spectrum.py']),
Job('ind_plot.py@1x2m', deps=['fdm_ind.py'])]
# Creates: spec.png
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
......
# Creates: tcm_1.12.png, tcm_2.48.png, table_1.12.txt, table_2.48.txt
import numpy as np
from matplotlib import pyplot as plt
......
# Creates: fig1.png
import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(6, 6 / 2 ** 0.5))
......
def agts(queue):
calc1 = queue.add('Be_gs_8bands.py',
ncpus=2,
walltime=20)
queue.add('Be_8bands_lrtddft.py',
ncpus=2,
walltime=20,
deps=calc1)
queue.add('Be_8bands_lrtddft_dE.py',
ncpus=2,
walltime=20,
deps=calc1)
queue.add('Na2_relax_excited.py',
ncpus=4,
walltime=500)
from myqueue.job import Job
def workflow():
return [
Job('Be_gs_8bands.py@2x20m'),
Job('Be_8bands_lrtddft.py@2x20m', deps=['Be_gs_8bands.py']),
Job('Be_8bands_lrtddft_dE.py@2x20m', deps=['Be_gs_8bands.py']),
Job('Na2_relax_excited.py@4x8h')]
from myqueue.job import Job
from gpaw.utilities import compiled_with_libvdwxc
from gpaw.xc.libvdwxc import libvdwxc_has_pfft
def agts(queue):
# Is walltime minutes or seconds? If it crashes, we will know.
def workflow():
jobs = []
if compiled_with_libvdwxc():
queue.add('libvdwxc-example.py', ncpus=1, walltime=1)
jobs.apend(Job('libvdwxc-example.py'))
if libvdwxc_has_pfft():
queue.add('libvdwxc-pfft-example.py', ncpus=8, walltime=1)
jobs.append(Job('libvdwxc-pfft-example.py', cores=8))
return jobs
# Creates: Ag.png
from ase.build import bulk
from gpaw import GPAW
......
def agts(queue):
return
a = queue.add('dcdft_gpaw.py', ncpus=4, walltime=40)
queue.add('testdb.py', deps=a)
queue.add('extract.py dcdft.db', deps=a, creates='dcdft.db_raw.txt')
def agts(queue):
queue.add('dos.agts.py', ncpus=1,
deps=['../iron/PBE.py',
'../wavefunctions/CO.py',
'../wannier/si.py',
'../aluminium/Al_fcc.py'])
def workflow():
from myqueue.job import Job
return [
Job('dos.agts.py',
deps=['../iron/PBE.py', '../wavefunctions/CO.py',
'../wannier/si.py', '../aluminium/Al_fcc.py'])]
if __name__ == '__main__':
import os
......
def agts(queue):
calc1 = queue.add('Na2TDDFT.py',
ncpus=2,
walltime=60)
queue.add('part2.py', deps=calc1)
gs = queue.add('ground_state.py', ncpus=8)
queue.add('spectrum.py', deps=gs)
from myqueue.job import Job
def workflow():
return [
Job('Na2TDDFT.py@2x1h'),
Job('part2.py', deps=['Na2TDDFT.py']),
Job('ground_state.py@8x15s'),
Job('spectrum.py', deps=['ground_state.py'])]
def agts(queue):
job = queue.add('HAl100.py')
queue.add('stm.agts.py', ncpus=1, deps=[job])
def workflow():
from myqueue.job import Job
return [
Job('HAl100.py'),
Job('stm.agts.py', deps=['HAl100.py'])]
if __name__ == '__main__':
import sys
......
def agts(queue):
queue.add('water/h2o.py', ncpus=1)
queue.add('wavefunctions/CO.py', ncpus=8)
queue.add('aluminium/Al_fcc.py', ncpus=2)
queue.add('aluminium/Al_bcc.py', ncpus=2)
queue.add('aluminium/Al_fcc_vs_bcc.py', ncpus=2)
queue.add('aluminium/Al_fcc_modified.py', ncpus=2)
queue.add('diffusion/initial.py', ncpus=2)
sol = queue.add('diffusion/solution.py', ncpus=2)
queue.add('diffusion/densitydiff.py', deps=[sol])
si = queue.add('wannier/si.py', ncpus=8)
queue.add('wannier/wannier-si.py', deps=[si])
benzene = queue.add('wannier/benzene.py', ncpus=8)
queue.add('wannier/wannier-benzene.py', deps=[benzene])
band = queue.add('band_structure/ag.py', ncpus=1, creates='Ag.png')
h2o = queue.add('vibrations/h2o.py', ncpus=8)
h2ovib = queue.add('vibrations/H2O_vib.py', ncpus=8, deps=[h2o])
queue.add('vibrations/H2O_vib_2.py', ncpus=4, deps=[h2ovib])
ferro = queue.add('iron/ferro.py', ncpus=4)
anti = queue.add('iron/anti.py', ncpus=4)
non = queue.add('iron/non.py', ncpus=2)
queue.add('iron/PBE.py', deps=[ferro, anti, non])
queue.add('eels/test.py', deps=band)
queue.add('gw/test.py')
rpa_si_exxgs = queue.add('rpa/si.pbe.py')
queue.add('rpa/si.pbe+exx.py', deps=rpa_si_exxgs, ncpus=4)
rpa_si_rpags = queue.add('rpa/si.rpa_init_pbe.py')
queue.add('rpa/si.rpa.py', deps=rpa_si_rpags, ncpus=4)
queue.add('stress/con_pw.py', ncpus=1)
queue.add('stress/stress.py', ncpus=1)
queue.add('transport/pt_h2_tb_transport.py')
t1 = queue.add('transport/pt_h2_lcao_manual.py')
queue.add('transport/pt_h2_lcao_transport.py', deps=t1)
from myqueue.job import Job
def workflow():
return [
Job('h2o.py', folder='water'),
Job('CO.py@8x15m', folder='wavefunctions'),
Job('Al_fcc.py@2x15m', folder='aluminium'),
Job('Al_bcc.py@2x15m', folder='aluminium'),
Job('Al_fcc_vs_bcc.py@2x15s', folder='aluminium'),
Job('Al_fcc_modified.py@2x15s', folder='aluminium'),
Job('initial.py@2x15m', folder='diffusion'),
Job('solution.py@2x15m', folder='diffusion'),
Job('densitydiff.py', folder='diffusion', deps=['solution.py']),
Job('si.py@8x15m', folder='wannier'),
Job('wannier-si.py', folder='wannier', deps=['si.py']),
Job('benzene.py@8x15m', folder='wannier'),
Job('wannier-benzene.py', folder='wannier', deps=['benzene.py']),
Job('ag.py', folder='band_structure'),
Job('h2o.py@8x15m', folder='vibrations'),
Job('H2O_vib.py@8x15m', folder='vibrations', deps=['h2o.py']),
Job('H2O_vib_2.py@4x15m', folder='vibrations', deps=['H2O_vib.py']),
Job('ferro.py@4x15m', folder='iron'),
Job('anti.py@4x15m', folder='iron'),
Job('non.py@2x15m', folder='iron'),
Job('PBE.py', folder='iron', deps=['ferro.py', 'anti.py', 'non.py']),