Julia Language Adding Workers


When you first start Julia, by default, there will only be a single process running and available to give work to. You can verify this using:

julia> nprocs()

In order to take advantage of parallel processing, you must first add additional workers who will then be available to do work that you assign to them. You can do this within your script (or from the interpreter) using: addprocs(n) where n is the number of processes you want to use.

Alternatively, you can add processes when you start Julia from the command line using:

$ julia -p n

where n is how many additional processes you want to add. Thus, if we start Julia with

$ julia -p 2

When Julia starts we will get:

julia> nprocs()