Confusing behaviour of include("source.jl") in parallel codes

In general, I would move your thinking away from “running scripts”, where you want to substitute some values into global variables in the script in order to control its operation.

Instead, write functions (and ideally, for any nontrivial amount of code, put the functions in a module in a package), and then call the functions with different parameters to control their behavior.

5 Likes