version up : OpenBLAS 0.2.15. Add make-ext-options to specify more make options.
-
Developer
For Wendelin where we have people trying to use it with different architectures I believe we should set TARGET=GENERIC This will assure us that we do not have to maintain silly instructions like this one here: http://www.wendelin.io/P-WIA.Wendelin.Standalone, see Note 1: openblast compile will fail if CPU type of the VM is unknown
For projects for which we know the architecture of deployed we can override it if needed.
-
Owner
Can you try 'qemu-kvm -cpu host' with the latest OpenBLAS to see if it can detect a good target automatically without TARGET= parameter ?
-
Developer
Yes, I can try but not this week.
-
Owner
Another possibility I'm wondering is building with 'DYNAMIC_ARCH=1' without 'TARGET=...' can work on KVM, in both compilation and usage. Ideally, the best architecture is chosen and hopefully GENERIC is chosen as fallback, but I am not sure if it is possible.
-
Developer
So here's some results:
-
kvm with following CPU (/usr/bin/qemu-system-x86_64 -machine accel=kvm -m 4096 -hda /mnt/hd1/vm/debian8.1_neo.img -net nic,vlan=0,model=virtio,macaddr=00:16:35:AF:94:4B -net tap,vlan=0,ifname=tap0,script=no,downscript=no -vnc :1 -no-reboot -enable-kvm -smp 4) and not set TARGET at all ========================= processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 6 model name : QEMU Virtual CPU version 2.4.0 stepping : 3 microcode : 0x1 cpu MHz : 3299.996 cache size : 4096 KB physical id : 3 siblings : 1 core id : 0 cpu cores : 1 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni cx16 x2apic popcnt hypervisor lahf_lm abm bogomips : 6599.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual ================================== Build: fails
-
Same but set TARGET = GENERIC Build: OK
My conclusion, use TARGET = GENERIC by default and commit this is OK I didn't try 'DYNAMIC_ARCH=1'
-
-
Owner
First, '-cpu host' is required when we build without TARGET parameter. https://github.com/xianyi/OpenBLAS/wiki/faq#qemu
I am not sure if there is any bad side-effect of using '-cpu host' for generic purpose. (I believe it's safe though).
My preference is always using '-cpu host' in kvm and building OpenBLAS without target by default, that will make (mostly) everyone happy by default.
For DYNAMIC_ARCH=1, unless we use binary cache, we compile the software to use it on the same environment and I don't think it is good to use it by default. It will take much more time to build and use more diskspace.
-
Developer
I'm trying now '-cpu host' in kvm and without set TARGET.
So far seems working, passed openblast build. So question is what's acceptable trade-off:
- TARGET = GENERIC, no optimization and less if any build issues
- Let openblast detect first and if fails recommend use kvm option '-cpu host' which we must maintain in documentation.
Let's follow #2 as you suggest and see how many people complain (almost everybody who tried to use hit this bug before as not always able to control the VM they have). If required we can either override for Wendelin or fix for generic later.
CPU:
processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz stepping : 3 microcode : 0x1 cpu MHz : 3299.996 cache size : 6144 KB physical id : 3 siblings : 1 core id : 0 cpu cores : 1 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 13 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 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm arat xsaveopt fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid bogomips : 6599.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:
-
Developer
Can you please commit it?
-
Owner
@kazuhiko, please add reviewd-by @Tyagov and reference to merge-request (
nexedi/slapos!42
) and apply the patch to master. If you need help with this I can assist and teach you how to do.Thanks beforehand,
Kirill -
Owner
Thanks for your feedbacks. I just pushed d09b1946 so that :
- First it tries build with auto detected target (or specifying build-ext-options)
- If it fails, it tries build with TARGET=GENERIC
What do you think ?
-
Developer
Seems fine, I try build now.