queue = AGTSQueue() queue.collect() cluster = NiflheimCluster(asepath=os.path.join(dir, 'ase'), setuppath=os.path.join(gpawdir, 'gpaw-setups')) # Example below is confusing: job.script must NOT be the *.agts.py script, # but the actual python script to be run! # testsuite.agts.py does both: see gpaw/test/big/miscellaneous/testsuite.agts.py #queue.jobs = [job for job in queue.jobs if job.script == 'testsuite.agts.py'] nfailed = queue.run(cluster) gfiles = os.path.join(dir, 'gpaw-files') if not os.path.isdir(gfiles): os.mkdir(gfiles) queue.copy_created_files(gfiles) # make files readable by go files = glob.glob(gfiles + '/*') for f in files: os.chmod(f, 0644) from gpaw.version import version subject = 'AGTS GPAW %s: ' % str(version) # Send mail: sfile = os.path.join(dir, 'status.log') attach = sfile if not nfailed: subject += ' succeeded' fail(subject, email, attach, mailer='mutt')
# examples of selecting jobs # # **Note** that this script searches the directories # created during the niflheim.install() step above! # #queue.jobs = [j for j in queue.jobs if j.script == 'testsuite.agts.py'] #queue.jobs = [j for j in queue.jobs if j.script == 'neb.agts.py'] #queue.jobs = [j for j in queue.jobs if j.dir.startswith('doc')] #queue.jobs = [j for j in queue.jobs # if j.dir.startswith('gpaw/test/big/bader_water')] #queue.jobs = [j for j in queue.jobs # if j.dir.startswith('doc/devel/memory_bandwidth')] nfailed = queue.run(niflheim) queue.copy_created_files('/home/camp2/jensj/WWW/gpaw-files') # Analysis: import matplotlib matplotlib.use('Agg') from gpaw.test.big.analysis import analyse user = os.environ['USER'] analyse( queue, '../analysis/analyse.pickle', # file keeping history '../analysis', # Where to dump figures rev=niflheim.revision, #mailto='*****@*****.**', mailto='*****@*****.**', mailserver='servfys.fysik.dtu.dk', attachment='status.log')
# examples of selecting jobs # # **Note** that this script searches the directories # created during the niflheim.install() step above! # #queue.jobs = [j for j in queue.jobs if j.script == 'testsuite.agts.py'] #queue.jobs = [j for j in queue.jobs if j.script == 'neb.agts.py'] #queue.jobs = [j for j in queue.jobs if j.dir.startswith('doc')] #queue.jobs = [j for j in queue.jobs # if j.dir.startswith('gpaw/test/big/bader_water')] #queue.jobs = [j for j in queue.jobs # if j.dir.startswith('doc/devel/memory_bandwidth')] nfailed = queue.run(niflheim) queue.copy_created_files('/home/camp2/jensj/WWW/gpaw-files') # Analysis: import matplotlib matplotlib.use('Agg') from gpaw.test.big.analysis import analyse user = os.environ['USER'] analyse(queue, '../analysis/analyse.pickle', # file keeping history '../analysis', # Where to dump figures rev=niflheim.revision, #mailto='*****@*****.**', mailto='*****@*****.**', mailserver='servfys.fysik.dtu.dk', attachment='status.log')