Lecture summary: Programming Techniques for Scientific Simulations

During the autumn semester of 2017 I took the course “Programming Techniques for Scientific Simulations” as part of my BSc course in Computational Science and engineering at ETH Z├╝rich. This is a summary of the course’s contents I wrote and used during the actual exam. Some things are missing, as it was an open-book exam

Accelerating build processes with multithreading

Building (compiling) large projects can take a long time. Build systems like Make and SCons do a really good job of reusing resources that don’t need recompiling because we didn’t change anything, but compiling a large project for the first time can still take a while. One solution to this issue, especially with multicore and

Automating builds with Make

make is a very useful tool when working on large projects with many dependencies. A C++ project with many header includes, for instance, can quickly get tedious to compile, when at each compilation you must run several commands: g++ -c main.cpp -o lib/main.o g++ -c myfile.cpp -o lib/myfile.o g++ lib/main.o lib/myfile.o -o main What make