Skip to content
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

Add env variable JULIA_CXX_CPU to explicitly set LLVM CPU #380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oschulz
Copy link
Contributor

@oschulz oschulz commented May 8, 2018

Currently, precompilation of Cxx.jl results in a PCH-file compiled for the CPU on the current host. This poses a serious problem in environments with multiple CPU types, but shared files (e.g. using different hosts with an NFS home directory). For example, if Cxx.jl is precompiled on a Broadwell CPU, it won't run when logging in to a host with a Skylake CPU, and vice-versa.

I frequently find myself running into this problem, both when switching between workstations of different age, and when running on a compute cluster with two partitions of different CPU type. A workaround is to delete the "Cxx.ji" file every time, but that's not really a viable long-term solution.

A similar problematic situations are read-only software container images with baked-in precompiled Julia packages (we use Singularity containers, a lot).

This PR introduces a new enviroment variable JULIA_CXX_CPU that allows the user to specify the CPU type to be used by Cxx.jl. For example, export JULIA_CXX_CPU="corei7-avx" will allow a shared Cxx.jl installation to be used on a wide range of current (and slightly older) systems.

@oschulz
Copy link
Contributor Author

oschulz commented Jun 19, 2018

Gentle bump.

@Gnimuc
Copy link
Member

Gnimuc commented Dec 29, 2019

Hi @oschulz, do you still want this? Please let me know if there is anything I can help with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants