Skip to content

Commit

Permalink
Merge pull request #38 from fangohr/review-next-steps
Browse files Browse the repository at this point in the history
Review next steps (two years ago)
  • Loading branch information
fangohr authored Jan 26, 2024
2 parents a74e2a5 + 9e4760d commit a520f4a
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions book/19-next-steps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,49 @@
"source": [
"# Where to go from here?\n",
"\n",
"Learning a programming language is the first step towards becoming a computationalists who advances science and engineering through computational modelling and simulation.\n",
"Learning a programming language is the first step towards becoming a computationalist who advances science and engineering through computational modelling and simulation.\n",
"\n",
"We list some additional skills that can be very beneficial for day-to-day computational science work, but is of course not exhaustive.\n",
"\n",
"## Advanced programming\n",
"\n",
"This text has put emphasis on providing a robust foundation in terms of programming, covering control flow, data structures and elements from function and procedural programming. We have not touch Object Orientation in great detail, nor have we discussed some of Python’s more advanced features such as iterators, and decorators, for example.\n",
"This text has put emphasis on providing a robust foundation in terms of programming, covering control flow, data structures and elements from function and procedural programming. We have not touch Object Orientation in great detail, nor have we discussed some of Python’s more advanced features such as iterators, and decorators, type hinting, nor many of the fantastic (standard) libraries available.\n",
"\n",
"## Compiled programming language\n",
"\n",
"When performance starts to be the highest priority, we may need to use compiled code, and likely embed this in a Python code to carry out the computational that are the performance bottle neck.\n",
"\n",
"Fortran, C and C++ are sensible choices here; maybe Julia in the near future.\n",
"Fortran, C and C++ are sensible choices here; maybe Rust in the near future.\n",
"\n",
"We also need to learn how to integrate the compiled code with Python using tools such as Cython, Boost, Ctypes and Swig.\n",
"We may also need to learn how to integrate the compiled code with Python using tools such as Cython, Boost, Ctypes and Swig.\n",
"\n",
"With the rise of GPUs as cheap and powerful compute resources, it is likely we want to drive computation carried out on the GPU. This can be done through GPU-specific libraries and languages (CUDA and OpenCL, for example). For some use cases, it may be sufficient to use frameworks that translate computational work from a higher level language (ideally as high as Python) to the GPUs.\n",
"\n",
"## Testing\n",
"\n",
"Good coding is supported by a range of unit and system tests that can be run routinely to check that the code works correctly. Tools such as doctest, nose and pytest are invaluable, and we should learn at least how to use pytest (or nose).\n",
"Good software development is supported by a range of unit and system tests that can be run routinely to check that the code works correctly. Tools such as pytest, doctest and others are invaluable, and we should at least learn at least how to use pytest for automated tests.\n",
"\n",
"## Simulation models\n",
"\n",
"A number of standard simulation tools such as Monte Carlo, Molecular Dynamics, lattice based models, agents, finite difference and finite element models are commonly used to solve particular simulation challenges – it is useful to have at least a broad overview of these.\n",
"\n",
"## Software engineering for research codes\n",
"\n",
"Research codes bring particular challenges: the requirements may change during the run time of the project, we need great flexibility yet reproducibility. A number of techniques are available to support effectively.\n",
"Research codes bring particular challenges: the requirements may change during the run time of the project, we need great flexibility yet reproducibility. A number of techniques are available to support effectively, including version control (see below), automatic tests and continous integration.\n",
"\n",
"## Data and visualisation\n",
"\n",
"Dealing with large amounts of data, processing and visualising it can be a challenge. Fundamental knowledge of database design, 3d visualisation and modern data processing tools such as the Pandas Python package help with this.\n",
"Dealing with large amounts of data, processing and visualising it can be a challenge. Fundamental knowledge of database design, 3d visualisation and modern data processing tools such as the Pandas and xarray Python package help with this. For interactive 3d visualisation VTK remains an important tool, although WebGL starts to be an interesting alternative.\n",
"\n",
"## Version control\n",
"\n",
"Using a version control tool, such as git or mercurial, should be a standard approach and improves code writing effectiveness significantly, helps with working in teams, and - maybe most importantly - supports reproducibility of computational results.\n",
"Using a version control tool, such as git, should be a standard approach and improves code writing effectiveness significantly, helps with working in teams, and - maybe most importantly - supports reproducibility of computational results.\n",
"\n",
"## Parallel execution\n",
"\n",
"Parallel execution of code is a way to make it run orders of magnitude faster. This could be using MPI for inter-node communication or OpenMP for intra-node parallelisation or a hybrid mode bringing both together.\n",
"\n",
"The recent rise of GPU computing provides yet another avenue of parallelisation, and so do the many-core chips such as the Intel Phi.\n",
"The recent rise of GPU computing provides yet another avenue of parallelisation. \n",
"\n",
"## Acknowledgements\n",
"\n",
Expand Down Expand Up @@ -78,19 +80,12 @@
"\n",
"[6] Historical note: this has changed from scipy version 0.7 to 0.8. Before 0.8, the return value was a float if a one-dimensional problem was to solve."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -104,7 +99,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.8.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit a520f4a

Please sign in to comment.