Skip to content

Command line flag for number of threads #34309

Closed
@orenbenkiki

Description

@orenbenkiki

To create a setup where:

  • There are multiple worker processes on different servers.
  • Using multiple threads in each worker process.

Then one currently needs to jump through some hoops to setup the JULIA_NUM_THREADS environment variable for each worker process. Thus one can't use a simple addprocs with something like SshClusterManater. A possible workaround is writing a shell script which sets the environment variable and launches julia and specify this as the Julia executable.

It would be much more convenient and natural if julia provided a command line option for specifying the number of threads. If such a command line option is explicitly specified, it should override the value of JULIA_NUM_THREADS, if any.

This setup is useful because the threads within each worker process automatically share "everything" without having to resort to constructs like SharedArray. Of course this also means one needs to be more careful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions