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

Test/build failure (Illegal instruction) #124

Closed
pao opened this issue Jul 9, 2012 · 11 comments
Closed

Test/build failure (Illegal instruction) #124

pao opened this issue Jul 9, 2012 · 11 comments

Comments

@pao
Copy link

pao commented Jul 9, 2012

v0.2.2. Log (from within a Julia build): http://http://sprunge.us/ADMc

Ubuntu 11.10 VM in VirtualBox, with access to four logical cores.

/proc/cpuinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping    : 7
cpu MHz     : 2170.020
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl pni ssse3 lahf_lm
bogomips    : 4340.04
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping    : 7
cpu MHz     : 2170.020
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 4
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl pni ssse3 lahf_lm
bogomips    : 4381.94
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping    : 7
cpu MHz     : 2170.020
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 2
cpu cores   : 4
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl pni ssse3 lahf_lm
bogomips    : 4308.74
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping    : 7
cpu MHz     : 2170.020
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 3
cpu cores   : 4
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl pni ssse3 lahf_lm
bogomips    : 4414.10
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
@xianyi
Copy link
Collaborator

xianyi commented Jul 9, 2012

Hi ,

VirtualBox didn't support AVX instruction.

Because OpenBLAS detects your VM as Sandy Bridge, it uses AVX kernels.
Thus, it causes
the illegal instruction fault.

You can "make TARGET=NEHALEM".

Thanks

Xianyi

2012/7/9 pao <
reply@reply.github.com

v0.2.2. Log (from within a Julia build): http://http://sprunge.us/ADMc

Ubuntu 11.10 VM in VirtualBox, with access to four logical cores.

/proc/cpuinfo:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping        : 7
cpu MHz         : 2170.020
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc
rep_good nopl pni ssse3 lahf_lm
bogomips        : 4340.04
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping        : 7
cpu MHz         : 2170.020
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc
rep_good nopl pni ssse3 lahf_lm
bogomips        : 4381.94
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping        : 7
cpu MHz         : 2170.020
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc
rep_good nopl pni ssse3 lahf_lm
bogomips        : 4308.74
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz
stepping        : 7
cpu MHz         : 2170.020
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc
rep_good nopl pni ssse3 lahf_lm
bogomips        : 4414.10
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Reply to this email directly or view it on GitHub:
#124

@pao
Copy link
Author

pao commented Jul 9, 2012

Ah, that explains why this just recently broke. Thanks! I'll try to verify this soon, and leave it up to you to decide how you want to resolve.

@xianyi
Copy link
Collaborator

xianyi commented Jul 9, 2012

Hi pao,

I think this is Virtual Box issue. It should support AVX.

To my knowledge, KVM supports AVX. I use a Sandy Bridge Win7 64-bit KVM machine to test OpenBLAS.

Xianyi

@Keno
Copy link
Contributor

Keno commented Jul 9, 2012

VMWare supports AVX as well.

@pao
Copy link
Author

pao commented Jul 9, 2012

Agree that it is a VBox issue; just leaving it up to you to decide whether it's worth handling as a special case or not, rather than closing the issue out from under you. I'm not concerned with the performance loss since I'm just using it for Julia development; switching to VMWare is really more trouble than it's worth to me. Thanks for the pointer, though.

@zchothia
Copy link
Contributor

zchothia commented Jul 9, 2012

It isn't actually too difficult to detect whether AVX is actually supported by the operating system/virtualization software. For reference here is small program based on code from one of Agner Fog's libraries: https://gist.github.com/3078968.

I have limited time at the moment, but it would certainly be welcomed if this was incorporated into OpenBLAS's detection routines.

--Zaheer

@pao
Copy link
Author

pao commented Jul 10, 2012

Can confirm that setting TARGET=NEHALEM works fine. Thanks!

@xianyi
Copy link
Collaborator

xianyi commented Sep 18, 2012

Hi @pao ,

Could you try OpenBLAS develop branch.
It detects OS supporting AVX on runtime. If not, it will use old Nehalem kernels.

Thank you

Xianyi

@pao
Copy link
Author

pao commented Sep 19, 2012

Yes, I just built it and it correctly selected the Nehalem kernels. Thanks!

@staticfloat
Copy link
Contributor

@xianyi, I have discovered the problem that OpenBLAS faces with some virtualization suites. It seems that the way e.g. Amazon EC2 nodes "disable" AVX is to disable XSAVE instead, as if XSAVE is disabled, AVX is also not available. Is it possible to check for XSAVE as well when checking to see if AVX is available?

@xianyi
Copy link
Collaborator

xianyi commented Jun 6, 2013

@staticfloat , Thank you for the tip. I will implement it in develop branch.

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

No branches or pull requests

5 participants