When developing parallel computation, a beginner often runs into the following issues:
- Functions not defined in the worker processes: This can be a symptom of a library package not being loaded, or a function that was only defined in the current process but not defined in the worker processes. Both issues can be resolved by using the @everywhere macro as shown in the preceding examples.
- Data not available in the worker processes: This can be a symptom of the data being stored as a variable in the current processes but not passed to the worker processes. SharedArray is convenient because it is automatically made available to worker processes. For other cases, the programmer generally ...