Target Architecture Mismatch

951 views
Skip to first unread message

James Barker

unread,
Apr 18, 2014, 12:48:34 PM4/18/14
to juli...@googlegroups.com
All our computers run RHEL 6.5 x86_64.

I built Julia on an Intel i7 Cpu, in a NFS export directory.  When you run Julia on a computer that has an i7, everything works as expected.  However, if you switch to a CoreDuo, Xeon, or an Opteron, Julia throws out the error:

"Target Architecture Mismatch.please delete or regenerate sys.{so,dll,dylib}.Hostname"


So in order to have all users in the data Center be able to share Julia over NFS, I have to compile a version of Julia for Every different CPU we have in the building.  Which I guess is not a the worst thing in the world.  It's just a pain for System Administrators who are trying to offer the same Software to every computer in the building.

Is there a way to build a vanilla version of Julia that will run on any CPU, regardless of CPU Flags?  Will this reduce the performance of Julia drastically?

Isaiah Norton

unread,
Apr 18, 2014, 1:21:22 PM4/18/14
to juli...@googlegroups.com
Yes: put "JULIA_CPU_TARGET = core2" in julia/Make.user

This will generate the system image with the instruction set available on core2 (so no AVX, for example). Should be fine on Xeon, but not sure about Operon and CoreDuo.

If this is still an issue, or there is a newer baseline ISA that will work on all of your systems, you should be able to target something other than core2 with a few modifications. See the following commit and discussion for more information:


Regarding performance: if you are not using 'userimg.jl' to precompile user code into the system image, then the target ISA of the system image should have little effect overall because user code will be JIT'd against the actual processor.

Simon Kornblith

unread,
Apr 18, 2014, 1:21:44 PM4/18/14
to juli...@googlegroups.com
If all CPUs support SSE3 (and maybe some other features that nearly all modern CPUs support?), I think you should be able to set JULIA_CPU_TARGET=core2 in Make.user when you build and get a binary that runs everywhere. This is what is done for the official Julia binaries. This probably incurs some minor performance overhead, but only for precompiled standard library functions that would otherwise be able to use features available on a newer CPU. Most code should run at exactly the same speed, since most code is compiled at runtime and the JIT still optimizes for the architecture on which it's running.

Simon
Reply all
Reply to author
Forward
0 new messages