emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
620 stars 162 forks source link

[julia] support multiple workers in iESS julia #426

Closed sam217pa closed 6 years ago

sam217pa commented 7 years ago

We can call julia on the terminal with julia -p 4 to start julia with 4 workers (depending on the number of CPU on the computer) then call multi-threaded for loops. Another way to specify that Julia should start with 4 workers is using export JULIA_NUM_THREADS=4.

But when I do that in Emacs, comint throes an error and freezes for a while.

Does anybody knows why it is like so ?

izahn commented 7 years ago

I can't reproduce it here, using Emacs 26.0.50, ESS 16.10-1, and Julia 0.5.2 on Archlinux. What versions are you using, and on what OS?

Best, Ista

On Thu, May 18, 2017 at 5:13 AM, Sam217pa notifications@github.com wrote:

We can call julia on the terminal with julia -p 4 to start julia with 4 workers (depending on the number of CPU on the computer) then call multi-threaded for loops. Another way to specify that Julia should start with 4 workers is using export JULIA_NUM_THREADS=4.

But when I do that in Emacs, comint throes an error and freezes for a while.

Does anybody knows why it is like so ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/emacs-ess/ESS/issues/426, or mute the thread https://github.com/notifications/unsubscribe-auth/AATm0-BYW_R5kIczdtKEDlcJDVudHP8Uks5r7AvDgaJpZM4Ne8LE .

sam217pa commented 7 years ago

I am on OSX El Capitan, using Emacs 25.2.1 and ESS 16.10-1. The output of Threads.nthreads() corresponds to the number of workers you defined in your setup ?

Thanks for having a look :)

izahn commented 7 years ago

On Fri, May 19, 2017 at 8:55 AM, Sam217pa notifications@github.com wrote:

I am on OSX El Capitan, using Emacs 25.2.1 and ESS 16.10-1. The output of Threads.nthreads() corresponds to the number of workers you defined in your setup ?

Yes, it does.

Thanks for having a look :)

Sure. It might be helpful for you to verify that you can reproduce the problem starting from 'emacs -q' and just loading ESS. That way we'll know if there is something in your init file causing the problem.

Best, Ista

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jabranham commented 6 years ago

Closing this as it seems to work just fine for me too.

pmcvay commented 4 years ago

Is there a way to set the number of processors in the init file without environment variables?

jabranham commented 4 years ago

Are you talking about using the -p flag? You can modify inferior-julia-args to do that if you want.