I run julia -p 2 --trace-compile=custom_precompile.jl myFile.jl, where myFile.jl runs a simple example. Then, when I try to generate the sysimage create_sysimage([:JuMP, :GLPK], sysimage_path="JuMPGLPKSysimage_CustomPrecompile.so", precompile_execution_file="custom_precompile.jl")
I get the following error:
**[ Info:** ===== Start precompile execution =====
**ERROR:** LoadError: UndefVarError: Distributed not defined
[...]
It might be not possible to generate a sysimage using a distributed code as precompile_execution_file.
Use ["JuMP", "GLPK", "Distributed"] for the package list. I am not sure if this makes a difference. If not, maybe it is because Distributed is not added a dependency (even though it is in the standard library), so try ] add Distributed, otherwise, I am not sure why it isn’t working.
I cannot use an array of strings, there is no method matching. I guess it is because in version 1.4.1 of PackageCompiler only an array of symbols could be provided.
(@v1.5) pkg> status PackageCompiler
Status `~/.julia/environments/v1.5/Project.toml`
[9b87118b] PackageCompiler v1.4.1
(@v1.5) pkg> update PackageCompiler
Updating registry at `~/.julia/registries/General`
######################################################################## 100.0%
No Changes to `~/.julia/environments/v1.5/Project.toml`
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
(@v1.5) pkg> status PackageCompiler
Status `~/.julia/environments/v1.5/Project.toml`
[9b87118b] PackageCompiler v1.4.1
(@v1.5) pkg>
Is First call latency in distributed code - #19 by jmair not an option for updating the Julia version? If you want to still use the “module load” syntax for the cluster then I have a modulefile you can use (you don’t need any admin rights, and should work the same as if the admins installed it themselves). On your own local machine, you can use juliaup, and switch back to your old version if things don’t work out.
Yes, it is but I’m afraid that updating julia will break my code. I prefer not to update any software in the middle of a project. Nonetheless, based on your recommendations, I think it is worth installing the newest version of julia in my laptop and the cluster and see if problems are resolved…
I agree with you on not updating during a project, and I usually feel the same, but when I did update, the code changes were extremely small, the main time was spent just updating the packages and precompiling.
Fortunately, each point release in Julia is non-breaking, but it’s the packages you have to be careful of. Keep a note of your current versions and if a specific package runs into trouble, you can always pin it at an earlier version using a [compat] header.
It seems that the same behavior is observed for v1.6.
Interestingly, I tried my code for medium-complicated functions and it scales reasonably. Currently, I am investigating the issue for the most complicated function (it is with such function when I encounter the problem discussed herein). If it turns out it is something related to my specific function, it is a problem I have to solve myself. Otherwise, I will reopen the discussion.