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

The .mem files are suspect on the Mac #21871

Closed
PetrKryslUCSD opened this issue May 14, 2017 · 4 comments
Closed

The .mem files are suspect on the Mac #21871

PetrKryslUCSD opened this issue May 14, 2017 · 4 comments

Comments

@PetrKryslUCSD
Copy link

I ran Julia 0.5.2 on an up-to-date Mac with --track-allocation =all.. The produced .mem files are highly suspect. Some lines are listed as having large allocations, when in fact that cannot be true. Example:

8718110 param_coords = [1./3. 1./3.];

This line gets called just once to create an array of floating-point numbers. Yet it is listed as having allocated 8 MB?

@KristofferC
Copy link
Member

Is it the first line of the function?

@PetrKryslUCSD
Copy link
Author

PetrKryslUCSD commented May 14, 2017

It more or less is:

function TriRule(;npts=1)
#    npts=number of points (1-- one-point rule, 3 -- three-point rule,
#      6 -- six point rule, 10 -- Strang 10 point, order 13, degree of precision 7, rule).

    if npts==1 # integrates exactly linear polynomials
          param_coords = [1./3. 1./3.]; # <= This is where the allocation is shown

But the entire object is tiny: two floating-point arrays, each with two entries. It gets created just once. I can't believe the allocation would be 8 MB.

Another example:

        -     #     # get the locations of all the nodes
        0     #     xs = fens.xyz;
   131072     #     #     Disqualify all the nodes that are not connected to the finite

The allocation is shown next to a comment line. And xs creates an alias for an array, I don't think this will lead to memory allocation?

@PetrKryslUCSD
Copy link
Author

Sorry, forgot about markdown.

@KristofferC
Copy link
Member

Hm, if possible you could perhaps try the 0.6 release candidate, I think there are some improvements on line information. You could also try https://github.com/KristofferC/TimerOutputs.jl just as a double check.

vtjnash added a commit that referenced this issue Jan 3, 2020
Don't include one-time costs (JIT compilation) so that warm-up isn't generally required.
And adjust codegen emission to charge call entry costs to the caller.

fixes #11753
fixes #19981
fixes #21871
fixes #34054
close #18595
vtjnash added a commit that referenced this issue Jan 15, 2020
Don't include one-time costs (JIT compilation) so that warm-up isn't generally required.
And adjust codegen emission to charge call entry costs to the caller.

fixes #11753
fixes #19981
fixes #21871
fixes #34054
close #18595
vtjnash added a commit that referenced this issue Jan 21, 2020
Don't include one-time costs (JIT compilation) so that warm-up isn't generally required.
And adjust codegen emission to charge call entry costs to the caller.

fixes #11753
fixes #19981
fixes #21871
fixes #34054
close #18595
KristofferC pushed a commit that referenced this issue Apr 11, 2020
Don't include one-time costs (JIT compilation) so that warm-up isn't generally required.
And adjust codegen emission to charge call entry costs to the caller.

fixes #11753
fixes #19981
fixes #21871
fixes #34054
close #18595
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

No branches or pull requests

2 participants