maintainability, sustainability, testing and deployment of qe

19
«WhatIcannotcompute, I do notunderstand.» (adapted from Richard P. Feynman) Maintainability,Sustainability, Testing and Deployment of QE Filippo Spiga 1,2 < [email protected] > 1 Head of Research Software Engineering, Univ. of Cambridge 2 Quantum ESPRESSOFoundation

Upload: others

Post on 23-Mar-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Maintainability, Sustainability, Testing and Deployment of QE

«WhatIcannotcompute,Idonotunderstand.»(adaptedfromRichardP.Feynman)

Maintainability,Sustainability,TestingandDeploymentofQE

FilippoSpiga1,2 <[email protected] >

1 HeadofResearchSoftwareEngineering,Univ.ofCambridge2 QuantumESPRESSOFoundation

Page 2: Maintainability, Sustainability, Testing and Deployment of QE

Elevatorpitch:ResearchSoftwareEngineering

"Software isacornerstoneofscience.Withoutsoftware, twenty-firstcenturysciencewouldbeimpossible.Withoutbettersoftware,sciencecannotprogress.”-- SCIENCECODEMANIFESTO

BETTERSOFTWAREBETTERRESEARCH

Page 3: Maintainability, Sustainability, Testing and Deployment of QE

Thishappens…lotoftimes!

Page 4: Maintainability, Sustainability, Testing and Deployment of QE

Becauseeverybody…

Page 5: Maintainability, Sustainability, Testing and Deployment of QE

The(invalid)argument

Whybotheraboutallofthis,wealwaysdidwithoutthoseanditwasgood

enough…

WRONG

Page 6: Maintainability, Sustainability, Testing and Deployment of QE

3principles

• Versioning(SVNà SVN+GIT)• ContinuousIntegration(BuildBot)• Testing(test-code)

…appliedtoQuantumESPRESSO.

Demoincluded,referencesincluded.

Page 7: Maintainability, Sustainability, Testing and Deployment of QE

Versioning(classic)

SVN

Page 8: Maintainability, Sustainability, Testing and Deployment of QE

Versioning(ideal)

GIT

Page 9: Maintainability, Sustainability, Testing and Deployment of QE

Versioning(sustainable)

SVN(legacy)

GIT(mirror)

NEWRELEASE

Page 10: Maintainability, Sustainability, Testing and Deployment of QE

ContinuousIntegration(C-I)

Automate,Automate,Automate…

Page 11: Maintainability, Sustainability, Testing and Deployment of QE

BuildBot

WritteninPython,verysimple!

Page 12: Maintainability, Sustainability, Testing and Deployment of QE

BuildBot

Buildbot overview

17

http://buildbot.net/buildbot/docs/current/manual/introduction.html Upon branch update, build is created, and test suite is run

Source: buildbot team

Whatbuildbot doesforme…• Uponbranchupdateoratspecific

timeinterval,abuild iscreatedandtestsuiteisrun

• Developer isalerted(viaUIoremail)whenatestfails,cansubmitfix,andre-launchtest(evenmanually)

• Uploadtestresultsorcompiledapplicationstoanexternalserver

Page 13: Maintainability, Sustainability, Testing and Deployment of QE

DeployyourBuildBot (slave)

mkdir -p $HOME/my_buildbot_slavecd $HOME/my_buildbot_slave

virtualenv --no-site-packages buildbot_sandboxsource buildbot_sandbox/bin/activate

buildslave create-slave slave \<my-public-IP>:9989 my_slave_1 <password>

buildbot start my_slave_1

Page 14: Maintainability, Sustainability, Testing and Deployment of QE

DEMO

Page 15: Maintainability, Sustainability, Testing and Deployment of QE

test-code

• Projectinitiated byJamesSpencer(ICL)fortesting lookingatregressionerrorsinscientific software.

• Itrunsasetofcalculations, andcomparestheoutputdatatothatgeneratedbyapreviouscalculation (whichisregardedtobe"correct").

• Written inpython,designed tobelightweight andhighlyportable.• Itcanrunasetoftestsandcheckthecalculated dataiswithinathedesired

toleranceofresultscontained inpreviousoutput(dataextractionfeatures)• Theprogramstobetested canberuninserialandinparallelandtests canberun

ineither locallyorsubmitted toacomputecluster.

Page 16: Maintainability, Sustainability, Testing and Deployment of QE

test-code- capabilities

• compare =comparesetoftestoutputsfromaprevioustestcode runagainstthebenchmarkoutputs.

• diff =diffsetoftestoutputsfromaprevioustestcode runagainstthebenchmarkoutputs.• make-benchmarks =createanewsetofbenchmarksandupdatetheuserconfig filewiththe

newbenchmarkid.Alsorunsthe‘run’action.• recheck =comparesetoftestoutputsfromaprevioustestcode runagainstbenchmark

outputsandrerunanyfailedtests.• run =runasetoftestsandcompareagainstthebenchmarkoutputs.• tidy =removefilesfromprevioustestcode runsfromthetestdirectories.

Page 17: Maintainability, Sustainability, Testing and Deployment of QE

test-code- configuration

Twoconfigurationfiles:• jobconfig defines theteststorun• userconfig definesaprogramtobetested

Page 18: Maintainability, Sustainability, Testing and Deployment of QE

DEMO

Page 19: Maintainability, Sustainability, Testing and Deployment of QE

ProductionRoadmap

Phase1-- April2015,v5.3.1:• QE-FORGEContinuous Integrationgoesliveasservice• All“slaves”welcome (butwevaluediversity)• Development branchescovered ifpushedontheQE-FORGE

(Possible)Phase2-- September2015,v5.x.x:• Regular (howregular?)nightlybinaries• Morepackageswithinsuite(PH,TDDFPT,…)• Morecomplex