-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Provide script julia-native
#14995
Provide script julia-native
#14995
Conversation
Provide two scripts `julia-native-setup` and `julia-native`. These are installed into the `bin` directory, intended to be called by the end user and/or administrator who installs Julia. From the documentation: The script 'julia-native-setup' creates an optimized version of Julia's system image for a particular CPU type. Together with the script 'julia-native', this makes it quite easy to maintain a single Julia installation on a heterogeneous cluster that has a common file system. 1. Install Julia in such a way that it works on every machine of the cluster. This usually requires either building Julia on a machine with the oldest CPU type, or explicitly setting "JULIA_CPU_TARGET". 2. For each CPU type, run 'julia-native-setup' once, on a machine with this CPU type. This creates an optimized version of Julia's system image for this CPU type. (Note: This script cannot run in parallel.) 3. To run Julia, use the script 'julia-native' instead of plain 'julia'. This script detects the machine's CPU type, and then executes Julia with the optimized system image.
I'm not certain we want to go this way exactly. In particular, I think it should be quite trivial for us to cross-compile to a different architecture (or several simultaneously, at a reasonable cost of tens of seconds per cpu-arch). What we've needed is a way to specify it so that they can be selected from I'd be happy to help walk you through the required changes in more detail. Probably easiest to PM me (my user id @ gmail.com) over working it out over the github issues. |
Hi @eschnett, |
Indeed @vtjnash's approach looks like it would also allow generic binary tarballs and distribution packages to ship additional images optimized for recent architectures, instead of always falling back to the greatest common denominator (i.e. |
@nalimilan "Generic" binary tarballs (that handle multiple architectures) are also possible with I'll contact @vtjnash to see how involved his idea is. |
All of the underlying functionality is portable so silly to go through a bash dependency for this. |
@tkelman Do you refer to using Bash instead of sh, or to using a shell script instead of a Julia script, or to using a wrapper script at all? |
All of the above, but mostly the first two until @vtjnash works a bit of magic. |
Note that I had to explicitly set It would be good if whatever the solution, it deals with all the deps as well as the core of Julia. |
This is about the system image. #9372 is about deps. |
@tkelman The main reason I'm using a shell script is that I want to call |
Ah right, I missed what advantage the |
My solution is quick and dirty, but easy to use and reliable. In the end, this (or an equivalent mechanism) should become part of the |
As I mentioned on #18179, it would be nice if something like this was available as an installation option. |
We don't ship a linker (yet), so this would only be available if you have development tools available at install time. Or you wouldn't get a shared library so you'd have faster runtime but slow startup. |
Can't we at least have an optimize script that does the right thing if you have the linker? Doesn't need to be post-install. |
Lines 15 to 27 in a4e212b
|
We do a much job at generating native code for the current architecture now, thanks to @yuyichao 's work. |
Provide two scripts
julia-native-setup
andjulia-native
. These are installed into thebin
directory, intended to be called by the end user and/or administrator who installs Julia.From the documentation:
The script 'julia-native-setup' creates an optimized version of Julia's system image for a particular CPU type. Together with the script 'julia-native', this makes it quite easy to maintain a single Julia installation on a heterogeneous cluster that has a common file system.