Scientific computing

From Wikiversity
Jump to navigation Jump to search
Anton is a massively parallel supercomputer. It is a special-purpose system for molecular dynamics (MD) simulations.

Computational science, also known as scientific computing or scientific computation (SC), is a rapidly growing multidisciplinary field that uses advanced computing capabilities to understand and solve complex problems. It is an area of science which spans many disciplines, but at its core it involves the development of models and simulations to understand natural systems.

  • Algorithms (numerical and non-numerical): mathematical models, computational models, and computer simulations developed to solve science (e.g., biological, physical, and social), engineering, and humanities problems
  • Computer and information science that develops and optimizes the advanced system hardware, software, networking, and data management components needed to solve computationally demanding problems
  • The computing infrastructure that supports both the science and engineering problem solving and the developmental computer and information science

Best Practices[edit]

The purpose of this resource is to describe best practices in the field of scientific computing. Computing has become an essential scientific tool in research, yet techniques in this discipline are often not taught.[1]

Summary of Best Practices (reproduced from Wilson et al 2014)[2]

  1. Write programs for people, not computers.
    1. A program should not require its readers to hold more than a handful of facts in memory at once.
    2. Make names consistent, distinctive, and meaningful.
    3. Make code style and formatting consistent.
  2. Let the computer do the work.
    1. Make the computer repeat tasks.
    2. Save recent commands in a file for re-use.
    3. Use a build tool to automate workflows.
  3. Make incremental changes.
    1. Work in small steps with frequent feedback and course correction.
    2. Use a version control system.
    3. Put everything that has been created manually in version control.
  4. Don't repeat yourself (or others).
    1. Every piece of data must have a single authoritative representation in the system.
    2. Modularize code rather than copying and pasting.
    3. Re-use code instead of rewriting it.
  5. Plan for mistakes.
    1. Add assertions to programs to check their operation.
    2. Use an off-the-shelf unit testing library.
    3. Turn bugs into test cases.
    4. Use a symbolic debugger.
  6. Optimize software only after it works correctly.
    1. Use a profiler to identify bottlenecks.
    2. Write code in the highest-level language possible.
  7. Document design and purpose, not mechanics.
    1. Document interfaces and reasons, not implementations.
    2. Refactor code in preference to explaining how it works.
    3. Embed the documentation for a piece of software in that software.
  8. Collaborate.
    1. Use pre-merge code reviews.
    2. Use pair programming when bringing someone new up to speed and when tackling particularly tricky problems.
    3. Use an issue tracking tool.

See also[edit]

References[edit]

  1. Wilson, Greg; Bryan, Jennifer; Cranston, Karen; Kitzes, Justin; Nederbragt, Lex; Teal, Tracy K. (2017). "Good enough practices in scientific computing". Plos Computational Biology 13 (6): e1005510. doi:10.1371/journal.pcbi.1005510. PMID 28640806. PMC 5480810. //www.ncbi.nlm.nih.gov/pmc/articles/PMC5480810/. "Computers are now essential in all branches of science, but most researchers are never taught the equivalent of basic lab skills for research computing." 
  2. Wilson, Greg; Aruliah, D. A.; Brown, C. Titus; Chue Hong, Neil P.; Davis, Matt; Guy, Richard T.; Haddock, Steven H. D.; Huff, Kathryn D. et al. (2014). "Best Practices for Scientific Computing". PLOS Biology 12 (1): e1001745. doi:10.1371/journal.pbio.1001745. PMID 24415924. PMC 3886731. //www.ncbi.nlm.nih.gov/pmc/articles/PMC3886731/. "This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited."