Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line flag for number of threads #34309

Closed
orenbenkiki opened this issue Jan 8, 2020 · 1 comment
Closed

Command line flag for number of threads #34309

orenbenkiki opened this issue Jan 8, 2020 · 1 comment

Comments

@orenbenkiki
Copy link

orenbenkiki commented Jan 8, 2020

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.

@non-Jedi
Copy link
Contributor

non-Jedi commented Jan 8, 2020

This is a duplicate of #26889. Also relevant to your usecase is #16134 for your usecase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants