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

0.7 compile time doesn't work as well anymore #110

Closed
SimonDanisch opened this issue Aug 24, 2018 · 10 comments
Closed

0.7 compile time doesn't work as well anymore #110

SimonDanisch opened this issue Aug 24, 2018 · 10 comments

Comments

@SimonDanisch
Copy link
Collaborator

I'll soon push a branch with snoopcompile + sysimage working.
Meanwhile, the compilation speed improvements are not as drastic anymore.
I hope (am pretty sure?), this is just some flag we need to figure out.

userimg = Pkg.dir("Makie", "test", "precompile.jl")
image_path = PackageCompiler.sysimg_folder()
PackageCompiler.build_sysimg(image_path, userimg, compilecache = "yes")

precompile.jl generated with julia --trace-compilation=yes runtests.jl.
Speed improvement is just from 80s to 20s, with a precompile file that should definitely have everything needed in it.

@SimonDanisch
Copy link
Collaborator Author

Damn, if I try to double check with build_sysimg.jl, I'll get:

PS C:\Users\sdani> julia
ERROR: System image file failed consistency check: maybe opened the wrong version?

With PackageCompiler it works though - and I also double checked that it's not some actual runtime in Makie that takes the 20s.
@vtjnash > 90% of the profile trace point to abstract interpretation, so I guess it's save to assume that some compilation/lowering isn't cached.

@SimonDanisch
Copy link
Collaborator Author

I see:
JuliaLang/julia#27629

@SimonDanisch
Copy link
Collaborator Author

JuliaLang/julia#27451

@SimonDanisch
Copy link
Collaborator Author

Good and bad news :D build_sysimg works exactly the same as PackageCompiler... So guess that means PackageCompiler is already up to date - but also means we don't get such large speed ups for some reason.

@NHDaly
Copy link
Member

NHDaly commented Sep 5, 2018

I talked some about my investigations into this here:
NHDaly/ApplicationBuilder.jl#24

Perhaps I should merge that issue into this one, since this Repo sees a lot more traffic.

But, tl;dr, by setting both --compile=all when compiling, and compile=min in the jloptions in the C driver program at runtime, i was able to actually avoid a bunch of recompilation at runtime. Without this, it was always recompiling everything for me.

Is this already something you're doing in your analysis?

@SimonDanisch
Copy link
Collaborator Author

sigh

signal (11): Segmentation fault
in expression starting at no file:0

But thanks, that gives me something to look into :)

@NHDaly
Copy link
Member

NHDaly commented Sep 6, 2018

Haha XD

yeah no problem. Weee the land of static compiling!

Also, if it's helpful, here's the changes i made to do what I talked about above:
NHDaly/ApplicationBuilder.jl@ed97fc8

    PackageCompiler.build_executable(...
        compile="all",
    ...)
    jl_options.compile_enabled = 3;  // 0 = "no"; 3 = "min"; 1 = "yes" (default)

@lucatrv
Copy link
Collaborator

lucatrv commented Sep 30, 2018

Can this issue be closed?

@SimonDanisch
Copy link
Collaborator Author

@NHDaly you said you compiled your app successfully without JIT overhead in NHDaly/ApplicationBuilder.jl#24 (comment)... But I also can't see compile="all" on the master branch, and the branch you link never got merged - And for me compile="all" still segfaults.
Can you update us on the current status?

@KristofferC
Copy link
Member

This is fixed (in Julia 1.3)

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

4 participants