diff --git a/base/linalg/generic.jl b/base/linalg/generic.jl index 2e5618d7fad1c..cf8ab0ecd9c24 100644 --- a/base/linalg/generic.jl +++ b/base/linalg/generic.jl @@ -336,10 +336,11 @@ scale!(b::AbstractVector, A::AbstractMatrix) = scale!(A,b,A) #findmin(a::AbstractArray) function peakflops(n::Integer=2000; parallel::Bool=false) - a = rand(100,100) - t = @elapsed a*a - a = rand(n,n) - t = @elapsed a*a + a = ones(Float64,100,100) + t = @elapsed a2 = a*a + a = ones(Float64,n,n) + t = @elapsed a2 = a*a + @assert a2[1,1] == n parallel ? sum(pmap(peakflops, [ n for i in 1:nworkers()])) : (2*Float64(n)^3/t) end