# Multiple machines with same file system, should Julia recompile on each?

**URL:** <https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219>\
**Category:** General Usage\
**Tags:** precompilation\
**Created:** [September 9, 2025, 8:27am UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219 "2025-09-09T08:27:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [September 9, 2025, 8:27am UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/1 "2025-09-09T08:27:01Z")

</div>

At work, we have a system where I have a single user account, a desktop on my desk, and multiple compute machines I can ssh into. All these share the same, shared, file system. E.g. they use the same .julia folder, if i add a package in one machine they are avaiable when I ssh into another machine. They all share he same config file etc.

However, I am having tons of problems with precompilation. Pretty much every time I start Julia I have to go through long precompilation processes. I have a package with my project, and every time I run `using MyProjectPackage`, there is precompilation, often without making any actual changes.

One question I had is, if I precompile something on one of these machines, since they have a shared file system, should/should not Julia be precompiled on all machines? Right now separate precompilations on all machines seems very much to be the case (with everything etting stuch if I attempt to run something on two machines separately).

Is this expected behaviour, or are my problems likely due to something else?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [September 9, 2025, 2:29pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/2 "2025-09-09T14:29:11Z")

</div>

Are the CPUs diffferent? You might need to launch julia with flags to make it not use native cpu features and instead pick a common baseline.

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [September 9, 2025, 2:39pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/3 "2025-09-09T14:39:39Z")

</div>

Yeah, the CPUs are different. You mean something like

```julia-auto
julia -Cgeneric

```

?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [September 9, 2025, 3:43pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/4 "2025-09-09T15:43:50Z")

</div>

you don’t want `-Cgeneric`. That will limit you to instructions from the 1990s. You probably want `-Cx86-64-v3` if all your CPUs are from the past 10 years ago or `-Cx86-64-v4` if they all have AVX-512.

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [September 9, 2025, 3:46pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/5 "2025-09-09T15:46:58Z")

</div>

Thanks, that sounds good, also helps me know the flag to use.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 9, 2025, 4:10pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/6 "2025-09-09T16:10:52Z")

</div>

[Here are the flags the Julia binaries are using](https://github.com/JuliaCI/julia-buildkite/blob/85037fcb52ac7c16750f0fbe13a3b90dca3843b8/utilities/build_envs.sh#L23-L96).

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [September 9, 2025, 4:33pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/7 "2025-09-09T16:33:23Z")

</div>

Thanks, very useful!

---

<div class="post-metadata">

**Author:** ![Sevi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Post date:** [September 9, 2025, 9:27pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219/8 "2025-09-09T21:27:47Z")

</div>

Similar problem with essentially the same solution. Just cross-posting it here in case it helps anyone: [Julia 1.9, same depot with different machines?](https://discourse.julialang.org/t/julia-1-9-same-depot-with-different-machines/103463)

There is also the environment variable [`JULIA_MAX_NUM_PRECOMPILE_FILES`](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_MAX_NUM_PRECOMPILE_FILES), which someone in this forum suggested to set to a higher value (e.g. ~50) if disk space is not a big issue. It does seem to help in my case (heterogeneous cluster machines) to reduce the number of potential (re-)precompilations.
