Skip to content

Multi-threading doesn't work on master #19876

@giordano

Description

@giordano

I reported on discourse a problem, but didn't get any feedback, so I don't know if anyone else can reproduce it.

Currently, multi-threading doesn't seem to work on master branch (at least on my system). Using the example proposed in the manual:

julia> versioninfo()
Julia Version 0.6.0-dev.1928
Commit cbc6670 (2017-01-05 11:46 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

julia> Threads.nthreads()
4

julia> a = zeros(10);

julia> Threads.@threads for i = 1:10
           a[i] = Threads.threadid()
       end

julia> a
10-element Array{Float64,1}:
 1.0
 1.0
 1.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0

As show in the discourse message, the same example works on my system with Julia 0.5.

I could not find any reference to this problem in the bug tracker, I assume it's a new issue.

Metadata

Metadata

Assignees

Labels

multithreadingBase.Threads and related functionalityregressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions