Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Introduction Documentation Correctness Performance
Strategies for correctness, performance anddocumentation in research software
Albert Solernou
RSE 2017, Manchester.
8th Sep, 2017
Introduction Documentation Correctness Performance
Contents
1 Introduction
2 Documentation
3 Correctness
4 Performance
Introduction Documentation Correctness Performance
Contents
1 Introduction
2 Documentation
3 Correctness
4 Performance
Introduction Documentation Correctness Performance
Background
FFEA: continuum mechanicsfor biomolecules
ρDuDt
= ∇( σv + σe + π ) + f
viscous stress
elastic stress
thermal noise
external forces
Finite Element Method leads to:
Mdudt
= −Ku + E + N + O
a Langevin matrix equation.
Initial situation:
Proposed works:develop new methodologiesfor interactionsimprove the performance formany body simulations
Challenges:learn cont. mech. & FEMsurvive a new code
Introduction Documentation Correctness Performance
Contents
1 Introduction
2 Documentation
3 Correctness
4 Performance
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codedescribe variables,methods & classesnavigate through thecodegreat for developers!
Markdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codedescribe variables,methods & classesnavigate through thecodegreat for developers!
Markdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codedescribe variables,methods & classesnavigate through thecodegreat for developers!
Markdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codedescribe variables,methods & classesnavigate through thecodegreat for developers!
Markdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codedescribe variables,methods & classesnavigate through thecodegreat for developers!
Markdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codedescribe variables,methods & classesnavigate through thecodegreat for developers!
Markdown for the restDocumenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the rest
file formatskeyword referencegeneral usagetutorial
Documenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the rest
file formatskeyword referencegeneral usagetutorial
Documenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the rest
file formatskeyword referencegeneral usagetutorial
Documenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the rest
file formatskeyword referencegeneral usagetutorial
Documenting morepackagesOnline availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackages
FFEA Toolsbuilt inside FFEA/docautomated withCMake
Online availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackages
FFEA Toolsbuilt inside FFEA/docautomated withCMake
Online availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackages
FFEA Toolsbuilt inside FFEA/docautomated withCMake
Online availability
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackagesOnline availability
readthedocs.orgdesigned for Sphinxand Mkdocsworked with Doxygen!
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackagesOnline availability
readthedocs.orgdesigned for Sphinxand Mkdocsworked with Doxygen!
Introduction Documentation Correctness Performance
Documenting FFEA
Doxygen for the codeMarkdown for the restDocumenting morepackagesOnline availability
readthedocs.orgdesigned for Sphinxand Mkdocsworked with Doxygen!
Introduction Documentation Correctness Performance
Contents
1 Introduction
2 Documentation
3 Correctness
4 Performance
Introduction Documentation Correctness Performance
analytical testing
testing throughshort trajectories:
proof physics
learned a lot
more affordablethan unit tests
many bugs fixed
Steric repulsion Energy contributions
Bending & Stretching Energy distribution & Diffusion
Introduction Documentation Correctness Performance
Correctness & Usability
Random Number Generators:
Mersenne-Twisterhuge period: 219937 − 1parallel issuesfails testU011
RNGStreams2:long period: 2191
251 independent streamspasses testU01restarting is possible
Automatic version labelling:
A Git hook saves the previousCommit ID.
CMake configures the sorces:
if it finds Git→get the latest Commit IDotherwise→use the previous Commit ID
[1] P. L’Ecuyer & R. Simard, ACM Trans Math Soft (TOMS), 33(4):22 (2007)[2] P. L’Ecuyer et al. Oper Res, 50(6):1073-1075 (2002)
Introduction Documentation Correctness Performance
Contents
1 Introduction
2 Documentation
3 Correctness
4 Performance
Introduction Documentation Correctness Performance
Parallel approach
Iteratively:calculate forcessolve:
Mpqdvq
dt= −Kpqvq+Ep+Np+Op
update the positions
Orthogonal work distribution:n2 interactions in Opare fully distributedeach thread works on a body:
calculates Kpq, Ep and Npsolves the equations ofmotiontakes the time step
C++11 threads update:update neighbour listswrite to files
Introduction Documentation Correctness Performance
Optimisation & Performance
Optimisation works:
remove calls to pow
extensive refactoring
split n2 interactions in cells (linkedlists)
adjust OMP loops & schedules
remove some OMP Criticalsections (at the cost of computingmore)
allocate memory to the rightNUMA node
use C++11 threads for serial tasks
strong scaling, 32 HT cores:
256-core SGI UV2000:
Introduction Documentation Correctness Performance
Optimisation & Performance
Optimisation works:
remove calls to pow
extensive refactoring
split n2 interactions in cells (linkedlists)
adjust OMP loops & schedules
remove some OMP Criticalsections (at the cost of computingmore)
allocate memory to the rightNUMA node
use C++11 threads for serial tasks
strong scaling, 32 HT cores:
256-core SGI UV2000:
Introduction Documentation Correctness Performance
Acknowledgements
FFEA team
Sarah A. HarrisDaniel J. ReadOliver G. HarlenBenjamin Hanson
Robert WelchRobin A. Richarson
Thank you!