Hi Sébastien,
On 2015-04-28 20:37, Sébastien Villemot wrote:
>> When using the libraries provided by libopenblas-base:i386 on a computer
>> with a Pentium (586) processor, a program may crash with SIGILL. Here is
>> the tail of the output of the upstream test suite:
>>
>> | OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat3 < ./sblat3.dat
>> | Makefile:59: recipe for target 'level3' failed
>> |
>> | Program received signal SIGILL: Illegal instruction.
>> |
>> | Backtrace for this error:
>> | #0 0xB76D9D6E
>> | #1 0xB76DA3C7
>> | #2 0xB77D9CDF
>> | #3 0xB67A9388
>> | Illegal instruction
>>
>>
>> This is because the libraries were built with SSE optimizations enabled.
>>
>> The decision to use SSE appears to be determined at compile-time -- see
>> cpuid.h and cpuid_x86.c -- so the optimizations are based on whatever
>> the buildd supports, and not what the target supports.
>
> Thanks for your report.
>
> However your diagnostic is slightly incorrect. On x86 archs, OpenBLAS is
> compiled with the so-called "dynamic arch" feature. The library binary
> contains kernels optimized for several different CPUs, and the right
> kernel is selected at runtime after detecting the CPU.
Oh, I wasn't aware of this, sorry.
> So your problem comes either because the binary does not contain a
> kernel suitable for 586, or because the CPU detection goes wrong.
>
> I know that CPU detection does not always work very well in VMs (see
> #743490 for an example). Did your crash occur on real 586 hardware, or
> in a VM?
I don't have a real 586, but I have an real AMD Geode LX800, which is an
x86 CPU which also lacks SSE, and I managed to reproduce the issue
there. Full log attached.
This is a wheezy system, but with the openblas packages + dependencies
from jessie. The hardware is a PC Engines ALIX 2D.13 system board. I ran
the tests just as the autopkgtest would have done from #781996, but I
executed all the steps manually.
Please let me know if there is anything else I can do.
Regards,
Christian
getarch_2nd.c: In function âmainâ:
getarch_2nd.c:12:35: error: âSGEMM_DEFAULT_UNROLL_Mâ undeclared (first use in this function)
getarch_2nd.c:12:35: note: each undeclared identifier is reported only once for each function it appears in
getarch_2nd.c:13:35: error: âSGEMM_DEFAULT_UNROLL_Nâ undeclared (first use in this function)
getarch_2nd.c:14:35: error: âDGEMM_DEFAULT_UNROLL_Mâ undeclared (first use in this function)
getarch_2nd.c:15:35: error: âDGEMM_DEFAULT_UNROLL_Nâ undeclared (first use in this function)
getarch_2nd.c:19:35: error: âCGEMM_DEFAULT_UNROLL_Mâ undeclared (first use in this function)
getarch_2nd.c:20:35: error: âCGEMM_DEFAULT_UNROLL_Nâ undeclared (first use in this function)
getarch_2nd.c:21:35: error: âZGEMM_DEFAULT_UNROLL_Mâ undeclared (first use in this function)
getarch_2nd.c:22:35: error: âZGEMM_DEFAULT_UNROLL_Nâ undeclared (first use in this function)
getarch_2nd.c:67:50: error: âSGEMM_DEFAULT_Qâ undeclared (first use in this function)
getarch_2nd.c:68:50: error: âDGEMM_DEFAULT_Qâ undeclared (first use in this function)
getarch_2nd.c:69:50: error: âCGEMM_DEFAULT_Qâ undeclared (first use in this function)
getarch_2nd.c:70:50: error: âZGEMM_DEFAULT_Qâ undeclared (first use in this function)
make: *** [getarch_2nd] Error 1
gfortran -O2 -Wall -fPIC -c sblat1.f -o sblat1.o
sblat1.f:215.44:
CALL STEST1(SNRM2(N,SX,INCX),STEMP,STEMP,SFAC)
1
Warning: Rank mismatch in argument 'strue1' at (1) (scalar and rank-1)
sblat1.f:219.44:
CALL STEST1(SASUM(N,SX,INCX),STEMP,STEMP,SFAC)
1
Warning: Rank mismatch in argument 'strue1' at (1) (scalar and rank-1)
gfortran -O2 -Wall -o sblat1 sblat1.o -lm -lgfortran -lopenblas -lpthread
gfortran -O2 -Wall -fPIC -c dblat1.f -o dblat1.o
dblat1.f:215.44:
CALL STEST1(DNRM2(N,SX,INCX),STEMP,STEMP,SFAC)
1
Warning: Rank mismatch in argument 'strue1' at (1) (scalar and rank-1)
dblat1.f:219.44:
CALL STEST1(DASUM(N,SX,INCX),STEMP,STEMP,SFAC)
1
Warning: Rank mismatch in argument 'strue1' at (1) (scalar and rank-1)
gfortran -O2 -Wall -o dblat1 dblat1.o -lm -lgfortran -lopenblas -lpthread
gfortran -O2 -Wall -fPIC -c cblat1.f -o cblat1.o
gfortran -O2 -Wall -o cblat1 cblat1.o -lm -lgfortran -lopenblas -lpthread
gfortran -O2 -Wall -fPIC -c zblat1.f -o zblat1.o
gfortran -O2 -Wall -o zblat1 zblat1.o -lm -lgfortran -lopenblas -lpthread
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat1
Real BLAS Test Program Results
Test of subprogram number 1 SDOT
----- PASS -----
Test of subprogram number 2 SAXPY
Program received signal SIGILL: Illegal instruction.
Backtrace for this error:
#0 0x4003AF6B
#1 0x4003B5AC
#2 0x4001ED1F
#3 0x40897140
Illegal instruction
make: *** [level1] Error 132
--
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers