I’m using julia v1.9.0-beta3 on a SLURM cluster. On a login node with versioninfo
julia> versioninfo()
Julia Version 1.9.0-beta3
Commit 24204a73447 (2023-01-18 07:20 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 64 × AMD EPYC 7742 64-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, znver2)
Threads: 1 on 64 virtual cores
if I run
OMP_NUM_THREADS=1 julia --project --startup=no -e "import Pkg; Pkg.instantiate(); Pkg.precompile()"
this precompiles dependencies in my project (110 overall, so this takes a while). After this, I log in to a compute node with versioninfo
julia> versioninfo()
Julia Version 1.9.0-beta3
Commit 24204a73447 (2023-01-18 07:20 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 40 × Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake-avx512)
Threads: 1 on 40 virtual cores
and run
julia> import Pkg; Pkg.precompile()
Precompiling environment...
110 dependencies successfully precompiled in 541 seconds. 8 already precompiled.
This seems to precompile dependencies again, which is quite time-consuming.
Once this is over, though, if I return to the login node, and run
julia> import Pkg; Pkg.precompile()
Precompiling environment...
110 dependencies successfully precompiled in 443 seconds. 8 already precompiled.
this restarts the precompilation process all over again! Why is everything being precompiled repeatedly, when nothing has changed in the dependencies or the source? The cycle continues if I try it on the compute node subsequently.
I have tried deleting the compile cache, which didn’t change anything. Ideally, Julia would need to precompile dependencies only once on each architecture.