{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Disentangling Scientific Software\n", "\n", "This is a lecture on dissecting a piece of scientific software.\n", "\n", "You'll find all the materials on:\n", "\n", "\n", "There also is a launch-binder button that will get you a fully functional Jupyter session. So feel free to try everything along as I talk or play with it later on your own time." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Outline\n", "\n", "### Messy but realistic toy model\n", "\n", "I'll first show a very simple physical model (many particles randomly moving around in a 2-dimensional box) that allows for calculating (or diagnosing) physical quantities. We'll use the [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) and the [moment of inertia](https://en.wikipedia.org/wiki/Moment_of_inertia) across all the particles.\n", "\n", "The implementation of this example will be messy but fairly realistic.\n", "\n", "### Dissecting the structure\n", "\n", "I'll then go on to separate different parts of the model (space where the particles live, a group of particles, a source of randomness) to more clearly understand the relationship between the different parts.\n", "\n", "The implementation of that part will be what scientific software developers do if the modularize their software for better understanding the structure, for separating the development into work packages, etc.\n", "\n", "### Distributing the different parts of the model\n", "\n", "Finally, I'll use [Dask](https://dask.org/) to distribute the model. Each component will live on a different worker (can be threads, processes, nodes in a cluster, different data centres, ...). All parts will talk to each other using [actors](https://en.wikipedia.org/wiki/Actor_model).\n", "\n", "### Room for own work\n", "\n", "The distributed step will be used as a starting point to think about\n", "\n", "- how to add components to the model\n", "- how to optimize the layout of the different components under different conditions\n", "- how to ensure reproducibility of the computation\n", "- ..." ] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:climnum-exercise]", "language": "python", "name": "conda-env-climnum-exercise-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }