The ARGS you see there are what is passed to each worker on startup. Try
something like:

@everywhere myargs = ARGS
@everywhere println(myargs)


On Wed, Sep 3, 2014 at 10:33 PM, Thomas Covert <[email protected]>
wrote:

> Is it possible to retrieve the contents of command line arguments in
> parallel processing mode?  I'm having trouble making it work.  For example,
> if the file temp.jl contains:
>
> addprocs(2)
> @everywhere println(ARGS)
>
> Then when I type
>
> bash$ julia temp.jl 1 2 3
>
> I get:
>
> UTF8String["1","2","3"]
> From worker 2: UTF8String["--worker","--bind-to","10.0.0.6"]
> From worker 3: UTF8String["--worker","--bind-to","10.0.0.6"]
>
> Whereas I would have expected it to give me:
> UTF8String["1","2","3"]
> From worker 2: UTF8String["1","2","3"]
> From worker 3: UTF8String["1","2","3"]
>
> Is @everywhere not the way to do this?
>
> -thom
>
>

Reply via email to