Documentation on using multiple threads in v0.5-dev?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Documentation on using multiple threads in v0.5-dev?

Douglas Bates
Is there documentation on how to compile v0.5-dev to allow for multiple threads and how to invoke julia when doing so?  In Make.user I have a line

override JULIA_THREADS=4

but I still get

julia> versioninfo(true)
Julia Version 0.5.0-dev+4011
Commit 89487db* (2016-05-10 04:13 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
  WORD_SIZE: 64
           Ubuntu 16.04 LTS
  uname: Linux 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC 2016 x86_64 x86_64
Memory: 15.561084747314453 GB (11693.4375 MB free)
Uptime: 7396.0 sec
Load Avg:  0.2685546875  0.439453125  0.5302734375
Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz: 
       speed         user         nice          sys         idle          irq
#1  3799 MHz     104047 s        584 s      18851 s     611960 s          0 s
#2  3692 MHz     110583 s        381 s      17647 s     607300 s          0 s
#3  3728 MHz     127508 s        367 s      19402 s     588641 s          0 s
#4  3738 MHz     102908 s        306 s      20362 s     608373 s          0 s

  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: liblapack
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)
Environment:
  TERM = screen
  ...

Package Directory: /home/bates/.julia/v0.5
4 required packages:
 - FlatBuffers                   0.0.1
 - IJulia                        1.1.9
 ...

julia> Threads.nthreads()
1


I don't see anything in the output of "julia --help" about threads.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on using multiple threads in v0.5-dev?

Yichao Yu
On Tue, May 10, 2016 at 12:58 PM, Douglas Bates <[hidden email]> wrote:
> Is there documentation on how to compile v0.5-dev to allow for multiple
> threads and how to invoke julia when doing so?  In Make.user I have a line
>
> override JULIA_THREADS=4

threading is on by default. And I believe this variable is never used
to specify how many threads we use.

To turn on threading, you need to start julia with environment
variable `JULIA_NUM_THREAD=n` where `n` is the number of worker thread
(limited to number of cores).
There's current no way to compile a julia with threading on by default anymore.

>
> but I still get
>
> julia> versioninfo(true)
> Julia Version 0.5.0-dev+4011
> Commit 89487db* (2016-05-10 04:13 UTC)
> Platform Info:
>   System: Linux (x86_64-linux-gnu)
>   CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
>   WORD_SIZE: 64
>            Ubuntu 16.04 LTS
>   uname: Linux 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC 2016
> x86_64 x86_64
> Memory: 15.561084747314453 GB (11693.4375 MB free)
> Uptime: 7396.0 sec
> Load Avg:  0.2685546875  0.439453125  0.5302734375
> Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz:
>        speed         user         nice          sys         idle
> irq
> #1  3799 MHz     104047 s        584 s      18851 s     611960 s          0
> s
> #2  3692 MHz     110583 s        381 s      17647 s     607300 s          0
> s
> #3  3728 MHz     127508 s        367 s      19402 s     588641 s          0
> s
> #4  3738 MHz     102908 s        306 s      20362 s     608373 s          0
> s
>
>   BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>   LAPACK: liblapack
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)
> Environment:
>   TERM = screen
>   ...
>
> Package Directory: /home/bates/.julia/v0.5
> 4 required packages:
>  - FlatBuffers                   0.0.1
>  - IJulia                        1.1.9
>  ...
>
> julia> Threads.nthreads()
> 1
>
>
> I don't see anything in the output of "julia --help" about threads.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on using multiple threads in v0.5-dev?

Yichao Yu
On Tue, May 10, 2016 at 1:01 PM, Yichao Yu <[hidden email]> wrote:

> On Tue, May 10, 2016 at 12:58 PM, Douglas Bates <[hidden email]> wrote:
>> Is there documentation on how to compile v0.5-dev to allow for multiple
>> threads and how to invoke julia when doing so?  In Make.user I have a line
>>
>> override JULIA_THREADS=4
>
> threading is on by default. And I believe this variable is never used
> to specify how many threads we use.
>
> To turn on threading, you need to start julia with environment
> variable `JULIA_NUM_THREAD=n` where `n` is the number of worker thread
> (limited to number of cores).
> There's current no way to compile a julia with threading on by default anymore.

I realized that my first and last sentence contradict each other. What
I meant is that the threading code is built by default but there's no
way to compile julia that uses multiple threads by default (without
tweaking options in the source code `src/options.h`)

>
>>
>> but I still get
>>
>> julia> versioninfo(true)
>> Julia Version 0.5.0-dev+4011
>> Commit 89487db* (2016-05-10 04:13 UTC)
>> Platform Info:
>>   System: Linux (x86_64-linux-gnu)
>>   CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
>>   WORD_SIZE: 64
>>            Ubuntu 16.04 LTS
>>   uname: Linux 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC 2016
>> x86_64 x86_64
>> Memory: 15.561084747314453 GB (11693.4375 MB free)
>> Uptime: 7396.0 sec
>> Load Avg:  0.2685546875  0.439453125  0.5302734375
>> Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz:
>>        speed         user         nice          sys         idle
>> irq
>> #1  3799 MHz     104047 s        584 s      18851 s     611960 s          0
>> s
>> #2  3692 MHz     110583 s        381 s      17647 s     607300 s          0
>> s
>> #3  3728 MHz     127508 s        367 s      19402 s     588641 s          0
>> s
>> #4  3738 MHz     102908 s        306 s      20362 s     608373 s          0
>> s
>>
>>   BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>>   LAPACK: liblapack
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)
>> Environment:
>>   TERM = screen
>>   ...
>>
>> Package Directory: /home/bates/.julia/v0.5
>> 4 required packages:
>>  - FlatBuffers                   0.0.1
>>  - IJulia                        1.1.9
>>  ...
>>
>> julia> Threads.nthreads()
>> 1
>>
>>
>> I don't see anything in the output of "julia --help" about threads.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on using multiple threads in v0.5-dev?

Douglas Bates
Thank you.  If I may venture another question, is there or will there be a Compat wrapper for the @threads macro?

On Tuesday, May 10, 2016 at 12:03:32 PM UTC-5, Yichao Yu wrote:
On Tue, May 10, 2016 at 1:01 PM, Yichao Yu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="0lhMYBNNAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">yyc...@...> wrote:

> On Tue, May 10, 2016 at 12:58 PM, Douglas Bates <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="0lhMYBNNAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">dmb...@...> wrote:
>> Is there documentation on how to compile v0.5-dev to allow for multiple
>> threads and how to invoke julia when doing so?  In Make.user I have a line
>>
>> override JULIA_THREADS=4
>
> threading is on by default. And I believe this variable is never used
> to specify how many threads we use.
>
> To turn on threading, you need to start julia with environment
> variable `JULIA_NUM_THREAD=n` where `n` is the number of worker thread
> (limited to number of cores).
> There's current no way to compile a julia with threading on by default anymore.

I realized that my first and last sentence contradict each other. What
I meant is that the threading code is built by default but there's no
way to compile julia that uses multiple threads by default (without
tweaking options in the source code `src/options.h`)

>
>>
>> but I still get
>>
>> julia> versioninfo(true)
>> Julia Version 0.5.0-dev+4011
>> Commit 89487db* (2016-05-10 04:13 UTC)
>> Platform Info:
>>   System: Linux (x86_64-linux-gnu)
>>   CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
>>   WORD_SIZE: 64
>>            Ubuntu 16.04 LTS
>>   uname: Linux 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC 2016
>> x86_64 x86_64
>> Memory: 15.561084747314453 GB (11693.4375 MB free)
>> Uptime: 7396.0 sec
>> Load Avg:  0.2685546875  0.439453125  0.5302734375
>> Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz:
>>        speed         user         nice          sys         idle
>> irq
>> #1  3799 MHz     104047 s        584 s      18851 s     611960 s          0
>> s
>> #2  3692 MHz     110583 s        381 s      17647 s     607300 s          0
>> s
>> #3  3728 MHz     127508 s        367 s      19402 s     588641 s          0
>> s
>> #4  3738 MHz     102908 s        306 s      20362 s     608373 s          0
>> s
>>
>>   BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>>   LAPACK: liblapack
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)
>> Environment:
>>   TERM = screen
>>   ...
>>
>> Package Directory: /home/bates/.julia/v0.5
>> 4 required packages:
>>  - FlatBuffers                   0.0.1
>>  - IJulia                        1.1.9
>>  ...
>>
>> julia> Threads.nthreads()
>> 1
>>
>>
>> I don't see anything in the output of "julia --help" about threads.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on using multiple threads in v0.5-dev?

Yichao Yu
On Tue, May 10, 2016 at 1:21 PM, Douglas Bates <[hidden email]> wrote:
> Thank you.  If I may venture another question, is there or will there be a
> Compat wrapper for the @threads macro?

There's a no-op one.

>
> On Tuesday, May 10, 2016 at 12:03:32 PM UTC-5, Yichao Yu wrote:
>>
>> On Tue, May 10, 2016 at 1:01 PM, Yichao Yu <[hidden email]> wrote:
>> > On Tue, May 10, 2016 at 12:58 PM, Douglas Bates <[hidden email]>
>> > wrote:
>> >> Is there documentation on how to compile v0.5-dev to allow for multiple
>> >> threads and how to invoke julia when doing so?  In Make.user I have a
>> >> line
>> >>
>> >> override JULIA_THREADS=4
>> >
>> > threading is on by default. And I believe this variable is never used
>> > to specify how many threads we use.
>> >
>> > To turn on threading, you need to start julia with environment
>> > variable `JULIA_NUM_THREAD=n` where `n` is the number of worker thread
>> > (limited to number of cores).
>> > There's current no way to compile a julia with threading on by default
>> > anymore.
>>
>> I realized that my first and last sentence contradict each other. What
>> I meant is that the threading code is built by default but there's no
>> way to compile julia that uses multiple threads by default (without
>> tweaking options in the source code `src/options.h`)
>>
>> >
>> >>
>> >> but I still get
>> >>
>> >> julia> versioninfo(true)
>> >> Julia Version 0.5.0-dev+4011
>> >> Commit 89487db* (2016-05-10 04:13 UTC)
>> >> Platform Info:
>> >>   System: Linux (x86_64-linux-gnu)
>> >>   CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
>> >>   WORD_SIZE: 64
>> >>            Ubuntu 16.04 LTS
>> >>   uname: Linux 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC
>> >> 2016
>> >> x86_64 x86_64
>> >> Memory: 15.561084747314453 GB (11693.4375 MB free)
>> >> Uptime: 7396.0 sec
>> >> Load Avg:  0.2685546875  0.439453125  0.5302734375
>> >> Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz:
>> >>        speed         user         nice          sys         idle
>> >> irq
>> >> #1  3799 MHz     104047 s        584 s      18851 s     611960 s
>> >> 0
>> >> s
>> >> #2  3692 MHz     110583 s        381 s      17647 s     607300 s
>> >> 0
>> >> s
>> >> #3  3728 MHz     127508 s        367 s      19402 s     588641 s
>> >> 0
>> >> s
>> >> #4  3738 MHz     102908 s        306 s      20362 s     608373 s
>> >> 0
>> >> s
>> >>
>> >>   BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>> >>   LAPACK: liblapack
>> >>   LIBM: libopenlibm
>> >>   LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)
>> >> Environment:
>> >>   TERM = screen
>> >>   ...
>> >>
>> >> Package Directory: /home/bates/.julia/v0.5
>> >> 4 required packages:
>> >>  - FlatBuffers                   0.0.1
>> >>  - IJulia                        1.1.9
>> >>  ...
>> >>
>> >> julia> Threads.nthreads()
>> >> 1
>> >>
>> >>
>> >> I don't see anything in the output of "julia --help" about threads.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on using multiple threads in v0.5-dev?

Douglas Bates
It's not in the released version of Compat, only the development version, which is what confused me.

On Tuesday, May 10, 2016 at 12:22:02 PM UTC-5, Yichao Yu wrote:
On Tue, May 10, 2016 at 1:21 PM, Douglas Bates <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Uy_06xVOAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">dmb...@...> wrote:
> Thank you.  If I may venture another question, is there or will there be a
> Compat wrapper for the @threads macro?

There's a no-op one.

>
> On Tuesday, May 10, 2016 at 12:03:32 PM UTC-5, Yichao Yu wrote:
>>
>> On Tue, May 10, 2016 at 1:01 PM, Yichao Yu <[hidden email]> wrote:
>> > On Tue, May 10, 2016 at 12:58 PM, Douglas Bates <[hidden email]>
>> > wrote:
>> >> Is there documentation on how to compile v0.5-dev to allow for multiple
>> >> threads and how to invoke julia when doing so?  In Make.user I have a
>> >> line
>> >>
>> >> override JULIA_THREADS=4
>> >
>> > threading is on by default. And I believe this variable is never used
>> > to specify how many threads we use.
>> >
>> > To turn on threading, you need to start julia with environment
>> > variable `JULIA_NUM_THREAD=n` where `n` is the number of worker thread
>> > (limited to number of cores).
>> > There's current no way to compile a julia with threading on by default
>> > anymore.
>>
>> I realized that my first and last sentence contradict each other. What
>> I meant is that the threading code is built by default but there's no
>> way to compile julia that uses multiple threads by default (without
>> tweaking options in the source code `src/options.h`)
>>
>> >
>> >>
>> >> but I still get
>> >>
>> >> julia> versioninfo(true)
>> >> Julia Version 0.5.0-dev+4011
>> >> Commit 89487db* (2016-05-10 04:13 UTC)
>> >> Platform Info:
>> >>   System: Linux (x86_64-linux-gnu)
>> >>   CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
>> >>   WORD_SIZE: 64
>> >>            Ubuntu 16.04 LTS
>> >>   uname: Linux 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC
>> >> 2016
>> >> x86_64 x86_64
>> >> Memory: 15.561084747314453 GB (11693.4375 MB free)
>> >> Uptime: 7396.0 sec
>> >> Load Avg:  0.2685546875  0.439453125  0.5302734375
>> >> Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz:
>> >>        speed         user         nice          sys         idle
>> >> irq
>> >> #1  3799 MHz     104047 s        584 s      18851 s     611960 s
>> >> 0
>> >> s
>> >> #2  3692 MHz     110583 s        381 s      17647 s     607300 s
>> >> 0
>> >> s
>> >> #3  3728 MHz     127508 s        367 s      19402 s     588641 s
>> >> 0
>> >> s
>> >> #4  3738 MHz     102908 s        306 s      20362 s     608373 s
>> >> 0
>> >> s
>> >>
>> >>   BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>> >>   LAPACK: liblapack
>> >>   LIBM: libopenlibm
>> >>   LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)
>> >> Environment:
>> >>   TERM = screen
>> >>   ...
>> >>
>> >> Package Directory: /home/bates/.julia/v0.5
>> >> 4 required packages:
>> >>  - FlatBuffers                   0.0.1
>> >>  - IJulia                        1.1.9
>> >>  ...
>> >>
>> >> julia> Threads.nthreads()
>> >> 1
>> >>
>> >>
>> >> I don't see anything in the output of "julia --help" about threads.