JuliaCI / Coverage.jl

Take Julia code coverage and memory allocation results, do useful things with them
MIT License
174 stars 68 forks source link

Weird memory allocation numbers #260

Closed PetrKryslUCSD closed 4 years ago

PetrKryslUCSD commented 4 years ago

With Julia 1.3, julia --track-allocation=user. The measurement was collected during a second run, after clearing the malloc data after the first run. Code fragment from a .mem file:

        0     lambda = E * nu / (1 + nu) / (1 - 2*(nu));
        0     mu = E / 2. / (1+nu);
   860578     mI = diagm(0=>[1, 1, 1, 0.5, 0.5, 0.5]);
      768     m1m1 = _m1*_m1';
  3499241     I3 = [1.0 0 0; 0 1.0 0; 0 0 1.0]
     2016     b = [0.0 0 0; 0 0.0 0; 0 0 0.0]
     2016     sigma = [0.0 0 0; 0 0.0 0; 0 0 0.0]
     6560     return MatDeforNeohookean(mr, mass_density, E, nu, lambda, mu,
        -                     tangentmoduli3d!, update3d!, 
        -                     deepcopy(mI), deepcopy(m1m1), deepcopy(I3), deepcopy(b), deepcopy(sigma))

How does one interpret the above? The function with this code is called once. Where does all the allocation come from?

DilumAluthge commented 4 years ago

Is this the raw output that you get from julia --track-allocation=user?

If so, you should open this issue on the main JuliaLang/julia repository.

PetrKryslUCSD commented 4 years ago

Good point, done. Thank you.

DilumAluthge commented 4 years ago

This issue has been cross-posted to https://github.com/JuliaLang/julia/issues/34054

vtjnash commented 4 years ago

Closing as this is being tracked upstream now