Sorry again. I thought that the N in '-p N' meant the total number of 
processes, not the number of addition (worker) processes. I was wrong.  I 
just did a 'julia -p 4' and the ran procs() and it returned [1:5]. But my 
issue still stands.  Adding processors from the command line really works 
to speed up execution with the '@parallel (+) for' construct; using 
addprocs() doesn't.
_____________
On Wednesday, August 20, 2014 6:33:41 PM UTC-7, Jameson wrote:
>
> Somewhat trivial, but I notice that you add 4 processes in the first call, 
> but only 3 in the second call. Presumably you meant to add 4 in both cases 
> (master prompt + 4 workers)? In either case, `-p N` and `addprocs(N)` 
> should work exactly equivalently.
>
>
> On Wed, Aug 20, 2014 at 6:53 PM, <[email protected] <javascript:>> wrote:
>
>> Forgive me if this has been answered before; I couldn't find the answer.
>>
>> I'm having fun with *IJulia Notebook*, and wanted to create a demo to 
>> show how easy it is to speed up a loop by using the
>>
>> julia> *@parallel (+) for . . .*
>>
>> construction. In the past, I've launched plain julia from the command 
>> line via
>>
>> $ *julia -p 4*
>>
>> to use all four cores on my machine.  But there doesn't seem to be any 
>> way to do that when launching 
>>
>> $ *ipython notebook --profile julia*
>>
>> So I tried using 
>>
>> julia>* addproc(3)*
>>
>> inside the notebook, but it doesn't utilize all the cores.  I even tried 
>> that method in plain julia, and likewise do not get the speedup that I get 
>> by launching julia with the *-p* switch.
>>
>> Please help!
>>
>
>

Reply via email to