• Information For
    • Computational Molecular Sciences Community
    • Environmental System Science Community
    • Exascale Computing Community
    • Scientific Libraries Community
    • Software Engineering Community
    • Supercomputer Facilities and their Users
  • Contribute to BSSw
  • Receive Our Email Digest
  • Contact BSSw
  • Information For
    Computational Molecular Sciences Community Environmental System Science Community Exascale Computing Community Scientific Libraries Community Software Engineering Community Supercomputer Facilities and their Users
  • Contribute to BSSw
  • Receive Our Email Digest
  • Resources

    Better

    Planning

    • Software Process Improvement
    • Software Engineering
    • Requirements
    • Design
    • Software Interoperability
    • Software Sustainability

    Better

    Development

    • Documentation
    • Configuration and Builds
    • Revision Control
    • Release and Deployment
    • Issue Tracking
    • Programming Languages
    • Development Tools
    • Refactoring

    Better

    Performance

    • High-Performance Computing (HPC)
    • Performance at Leadership Computing Facilities
    • Performance Portability
    • Cloud Computing
    • Big Data

    Better

    Reliability

    • Peer Code Review
    • Testing
    • Continuous Integration Testing
    • Reproducibility
    • Debugging

    Better

    Collaboration

    • Projects and Organizations
    • Strategies for More Effective Teams
    • Inclusivity
    • Funding Sources and Programs
    • Software Publishing and Citation
    • Licensing
    • Discussion and Question Sites
    • Conferences and Workshops

    Better

    Skills

    • Online Learning
    • In-Person Learning
    • Personal Productivity and Sustainability

    View All Resources

    • Better Planning
    • Better Development
    • Better Performance
    • Better Reliability
    • Better Collaboration
    • Better Skills
    • View All Resources
  • Blog
  • Events
  • About
    • Site Overview
    • Team
    • Policies and Code of Conduct
    • BSSw Fellowship Program
  • Home
  • Blog
  • Hello CSE...

Hello CSE World

Share on LinkedIn Share on Facebook Tweet Copied! Permalink

PublishedDec 05, 2019
Authors Heather M. Switzer, Elsa Gonsiorowski, and Mark C. Miller
TOPICS
Better Planning
Software Engineering
Better Development
Development Tools

"Hello World!" is the canonical first program beginners write to learn new programming methodologies. In computational science and engineering (CSE) circles, programming methodologies can involve a variety of languages, parallel execution and programming models, discretization techniques, interdependent libraries, and more. An application solving the heat equation represents the perfect "Hello World!" program for the CSE world.

What is the heat equation?

The heat equation, a special case of the diffusion equation, was developed by Joseph Fourier in 1822. It describes how the distribution of heat varies over space and time in a material. While there are many adaptations for different scenarios, beginner CSE programmers often start with the one-dimensional, homogeneous heat equation as an introductory problem,

∂u / ∂t = α∇ ²u

where:

  • u = Temperature
  • t = time
  • α = thermal diffusivity of the material
  • ∇ = The Laplace operator.

To make the equation even more approachable, we make some simplifying assumptions:

  • α is constant (the material is homogeneous).
  • Apart from initial/boundary conditions, there are no other heat sources.
  • Only Cartesian coordinates in 1 dimension are used.

Why this form of the heat equation?

The one-dimensional heat equation might not be sufficient to model solar heating of the Earth. However, even in this relatively simple form, interesting and meaningful science questions may be investigated involving both transient and steady-state behavior. Examples are determining whether water pipes embedded in the walls of a log cabin (solid wood) would freeze during a cold storm, or computing the required thickness of insulation around fuel pipeline to avoid combustion from a fast burning brush fire. These and many other questions involving heat flow can be investigated with this relatively simple form of the heat equation.

Solutions to the one-dimensional heat equation are easy for beginners to visualize, which can help with understanding how different approaches work. The simplicity of the physics and mathematics also allows beginners to focus more on the implementation details, such as the programming language, parallel execution paradigm, discretization, and mathematical support libraries.

A repository for 'Hello CSE World'

We are announcing the beginning of an effort to populate and maintain a repository of working implementations of the heat equation demonstrating various aspects of CSE software. The resulting repository will be useful in training about fundamental aspects of the design and development of CSE software as well as providing examples of continuous integration (CI) testing, including demonstrating the use of CI resources for the DOE Exascale Computing Project (ECP).

Each implementation we gather will have to conform to a minimal set of requirements, including providing a fully self-contained build, accommodating a common set of command-line arguments, producing ascii text files for results output, and providing ways to probe time and space performance behavior via tools such as PAPI or Caliper.

Our goal in collecting such examples isn't so much to demonstrate the use of different programming languages as it is to demonstrate different approaches to computation and execution paradigms as well as to provide instructive insights by comparing of time, space, and scaling performance of various approaches.

As a precursor to that effort, we have begun collecting, documenting, and comparing similarities and differences of various code snippits from existing implementations in a temporary repository. After evaluating them, we will then evolve a subset of these code snippits to full, working implementations we intend to maintain for the training and testing example purposes described above.

Conclusion

The heat equation is well known and has many practical applications even in its one-dimensional form. Because of these advantages, a variety of implementations are easily available. This exemplar PDE makes it the perfect "Hello World!" for the scientific software community. Collecting a number of working examples together with unique implementation characteristics will help to create useful introductory CSE training material.

Author bios

Heather M. Switzer worked as a computing summer intern at Lawrence Livermore National Laboratory during summer 2019. She graduated with a B.S. in mathematics and computer science from Longwood University in 2018 and is currently a 2nd-year M.S./Ph.D. student in computer science with a specialization in computational science at the College of William & Mary.

Elsa Gonsiorowski is an HPC I/O specialist at Lawrence Livermore National Laboratory. She graduated with a Ph.D. in computer science in 2016 from Rensselaer Polytechnic Institute. Elsa works on a number of open source, system software tools to support HPC users as they manage files across an increasingly complex storage hierarchy. She has a passion for useful documentation and CMake.

Mark C. Miller is a computer scientist at Lawrence Livermore National Laboratory supporting VisIt, Silo, and other visualization and data infrastructure for LLNL simulation codes.

Comment

More on Software Engineering and Development Tools

Recap: Encouraging and Enabling Mutual Ownership in a RSE Community of Practice

Published Dec 09, 2022

By Miranda Mundt, Jonathan Bisila, Jon Guyer, Daniel Howard, Daniel S. Katz, Reed Milewicz, Henry Schreiner, Joshua Teves, and Chris Wiswell

Overcoming Complexity in Testing Multiphysics Coupling Software

Published Feb 07, 2022

By Frédéric Simonis, Gerasimos Chourdakis, and Benjamin Uekermann

My Reading List for Research Software Engineers

Published Oct 26, 2022

By Chase Million

Rethinking Software Variants

Published Sep 29, 2022

By Axel Huebl

Trusted Cyberinfrastructure Evaluation, Guidance, and Programs for Assurance of Scientific Software

Published May 13, 2022

By Elisa Heymann Pignolo, Barton Miller, and Sean Peisert

logo Better Scientific Software
  • BSSw Fellowship Program
  • Policies
  • Site Contributors
  • Contact BSSw
  • Receive Our Email Digest
  • Follow Our RSS Feed

Copyright © 2023 Better Scientific Software under MIT License

United States Department of Energy Office of Science National Nuclear Security Administration Exascale Computing Project