-
Notifications
You must be signed in to change notification settings - Fork 8
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
Loading a RoMEPlotting sysimage fails #140
Comments
Not with RoMEPlotting unfortunately, but we are using Gadfly for plotting which should work with PackageCompiler.jl. Sure you did see this before from their docs? My suggestion is perhaps best to get Gadfly.jl working on its own. Or, at least adjacent to the RoME sysimage, and that way only RoMEPlotting.jl will need to be compiled live. If both RoME and Gadfly can compile into an image, my expectation is that one image with both should not be too difficult. I'm assuming you are on
|
I already put ´RoME,Gadfly,GraphPlot,DistributedFactorGraphs,Compose,ArgParse´ sucessfully into one image, which reduced startup times a lot. I can live with it now, but maybe adding something like a test for this would be nice, so we know if Package Compiler can handle it one day :) |
As @dehann requested, this is the code I currently use to build sysimage for swift startup: Firstly, I have a using RoME,RoMEPlotting,Gadfly,GraphPlot,DistributedFactorGraphs,Compose,ArgParse Secondly, theres this (kind of hacky) script taking the include.jl and building a sysimage from it: using PackageCompiler
pkgString = open(f->read(f, String), "include.jl")
pkgString = replace(pkgString,"using " => "")
pkgString = replace(pkgString,"\n" => "")
pkgString = replace(pkgString,"RoMEPlotting," => "") # fix because starting with it fails ...
pkgNames = split(pkgString,',')
pkgSyms = Symbol.(pkgNames)
create_sysimage(pkgSyms; sysimage_path="$(homedir())/.julia/sysimage_RoME.so") This state could be put into one file as follows I think: using PackageCompiler
pkgSyms = [:RoME,:Gadfly,:GraphPlot,:DistributedFactorGraphs,:Compose,:ArgParse]
create_sysimage(pkgSyms; sysimage_path="$(homedir())/.julia/sysimage_RoME.so") Besides, I'm not not really sure all Packages need to be included like this individually, but it did not hurt things. Whats also still missing are precompile triggers and maybe the directory and project stuff present in https://github.com/JuliaRobotics/RoME.jl/blob/master/compileRoME/compileRoMESysimage.jl . Adding the cd and project stuff should be no problem, but for the precompile triggers and the stuff that should actually be required, I'd need your advice @dehann @Affie . I'd happily file a PR afterwards :) |
Hi, you can get some more information here: https://julialang.github.io/PackageCompiler.jl/dev/sysimages/#tracing-1 |
Hi Leo,
Agree, that sounds fine to me too.
Perhaps easiest is just a draft PR with new files at
We can use something like julia -O3 -e 'using PackageCompiler, Caesar, RoMEPlotting; compileCaesar_so(usecase=:full);' Not only faster loading times in Julia, but one could then bind on the resulting #include "include/libcaesar.h" Best, |
Hi, I just sent out the draft PR for you to have a look at. A lot of the test scripts i wanted to use as precompile triggers dont run at the moment, It would be nice to know if thats also the case on your machines. What I questioned from the beginning on the existing scripts is if its good to keep seperate Project.toml's for the compile script. Is there a deeper reason you did this for the initial RoME-Compile-script @Affie ? (Besides that for compiling RoMEPlotting we obviosly also need this in that file) Also testing the compilation in CI would be a great thing, compiling and booting up julia with it. Another question is the storage location of the output file. I always found it nice to store this directly in my ~/.julia directory or some subfolder to make it easy to find and start julia with it. But this may be personal preference. Best, |
Might be fixed? JuliaLang/PackageCompiler.jl#478 (comment) |
Hi,
To reduce the time Julia needs to load RoMEPlotting I created a system image using PackageCompiler.jl
This works fine, but trying to use it with
produces an error
Doing the same procedure with RoME itself works fine. Is there any experience with creating a RoMEPlotting sysimage?
The text was updated successfully, but these errors were encountered: