Automation and Make: Discussion

Parallel Execution

Make can build dependencies in parallel sub-processes, via its --jobs flag (or its -j abbreviation) which specifies the number of sub-processes to use e.g.

$ make --jobs 4 results.txt

If we have independent dependencies then these can be built at the same time. For example, abyss.dat and isles.dat are mutually independent and can both be built at the same time. Likewise for abyss.png and isles.png. If you’ve got a bunch of independent branches in your analysis, this can greatly speed up your build process.

For more information see the GNU Make manual chapter on Parallel Execution.

Different Types of Assignment

Some Makefiles may contain := instead of =. Your Makefile may behave differently depending upon which you use and how you use it:

For a detailed explanation, see:

Make and Reproducible Research

Blog articles, papers, and tutorials on automating commonly occurring research activities using Make: