[gdal-dev] Different results when reading a GeoTIFF with GDAL 2.1.2 vs 3.x

Momtchil Momtchev momtchil at momtchev.com
Sun Dec 29 13:04:23 PST 2019


     That was my first idea too so I rebuilt without SSE, SSE3 and AVX 
and it is still the same. I haven't rebuilt libgeotiff tho.

Here is the output of cpuid

mmom at mmom-workstation:~$ docker run --rm osgeo/gdal su -c "apt install 
-y cpuid; cpuid" | grep SSSE3
       SSSE3 extensions                        = false
       SSSE3/SSE5 opcode set disable = false
       SSSE3 extensions                        = false
       SSSE3/SSE5 opcode set disable = false
       SSSE3 extensions                        = false
       SSSE3/SSE5 opcode set disable = false
       SSSE3 extensions                        = false
       SSSE3/SSE5 opcode set disable = false

And here are my cpu flags from cpuinfo

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 mmxext fxsr_opt 
pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc 
cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic 
cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt 
hw_pstate vmmcall npt lbrv svm_lock nrip_save

No SSE3 on Phenom X4, only SSE/SSE2.


On 29/12/2019 21:51, Even Rouault wrote:
>>       Is it possible that this is a compiler issue? Anyone else that can
>> test this on an AMD CPU? Mine are old Phenom II X4 965s.
> Perhaps rather a runtime issue. I suspect this is related to a SSSE3
> optimization that has been added in GDAL 2.2 that is used in this use case
> (unpacking of byte buffer with a 2 byte stride to packed buffer)
>
>  From what I found on the net, I think this CPU doesn't support the SSSE3
> instruction set (SSSE3 with three S, not to be confused with SSE3...)
> Can you check the following ?
> cat /proc/cpuinfo | grep ssse3
>
> What is strange is that GDAL does have a runtime check to detect if SSSE3 is
> available, so I'm not sure why you would get that issue. Unless that Docker
> would wrongly expose SSSE3, but Docker is not a VM technology so it shouldn't
> mess up with CPU capability discoveries. This is weird.
>
> Can you try the following ?
>
> docker run --rm osgeo/gdal su -c "apt install -y cpuid; cpuid" | grep SSSE3
>
> In a DEBUG build of GDAL, you could disable at runtime the SSSE3 optimization
> by defining the environment variable/configuration option GDAL_USE_SSSE3 to
> NO, but this will not work on the release builds available on Docker.
>
-- 
Momtchil Momtchev <momtchil at momtchev.com>



More information about the gdal-dev mailing list