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

peakflops(; parallel=true) broken on master #1030

Closed
giordano opened this issue Oct 18, 2023 · 0 comments · Fixed by JuliaLang/julia#51757
Closed

peakflops(; parallel=true) broken on master #1030

giordano opened this issue Oct 18, 2023 · 0 comments · Fixed by JuliaLang/julia#51757

Comments

@giordano
Copy link
Contributor

giordano commented Oct 18, 2023

julia> using LinearAlgebra

julia> peakflops(; parallel=true)
ERROR: MethodError: no method matching nworkers()
The applicable method may be too new: running in world age 25267, while current world is 25269.

Closest candidates are:
  nworkers(::Distributed.WorkerPool) (method too new to be called from this world context.)
   @ Distributed ~/repo/julia/usr/share/julia/stdlib/v1.11/Distributed/src/workerpool.jl:139
  nworkers() (method too new to be called from this world context.)
   @ Distributed ~/repo/julia/usr/share/julia/stdlib/v1.11/Distributed/src/cluster.jl:900
  nworkers(::Distributed.AbstractWorkerPool) (method too new to be called from this world context.)
   @ Distributed ~/repo/julia/usr/share/julia/stdlib/v1.11/Distributed/src/workerpool.jl:148

Stacktrace:
 [1] peakflops(n::Int64; eltype::DataType, ntrials::Int64, parallel::Bool)
   @ LinearAlgebra ~/repo/julia/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/LinearAlgebra.jl:622
 [2] peakflops(n::Int64; eltype::DataType, ntrials::Int64, parallel::Bool)
   @ InteractiveUtils ~/repo/julia/usr/share/julia/stdlib/v1.11/InteractiveUtils/src/InteractiveUtils.jl:335
 [3] peakflops
   @ InteractiveUtils ~/repo/julia/usr/share/julia/stdlib/v1.11/InteractiveUtils/src/InteractiveUtils.jl:330 [inlined]
 [4] top-level scope
   @ REPL[2]:1

julia> versioninfo()
Julia Version 1.11.0-DEV.632
Commit 1abafe85b2c* (2023-10-11 07:57 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, haswell)
  Threads: 1 on 8 virtual cores

Explicitly loading Distributed does the trick:

julia> using Distributed

julia> peakflops(; parallel=true)
1.4242260084820227e11

but that's not documented to be required:

help?> peakflops
search: peakflops

  peakflops(n::Integer=4096; eltype::DataType=Float64, ntrials::Integer=3, parallel::Bool=false)

  peakflops computes the peak flop rate of the computer by using double precision gemm!. For more information see LinearAlgebra.peakflops.

  │ Julia 1.1
  │
  │  This function will be moved from InteractiveUtils to LinearAlgebra in the future. In Julia 1.1 and later it is available as LinearAlgebra.peakflops.
ViralBShah referenced this issue in JuliaLang/julia Oct 20, 2023
This is required now once Distributed is not in the sysimage.

Fixes https://github.com/JuliaLang/julia/issues/51756
KristofferC referenced this issue in JuliaLang/julia Nov 6, 2023
This is required now once Distributed is not in the sysimage.

Fixes https://github.com/JuliaLang/julia/issues/51756

(cherry picked from commit 795d8d7)
KristofferC referenced this issue Nov 14, 2024
This is required now once Distributed is not in the sysimage.

Fixes https://github.com/JuliaLang/julia/issues/51756
@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
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

Successfully merging a pull request may close this issue.

1 participant