[gdal-dev] x86/ARM Differences

Simon Eves simon.eves at heavy.ai
Fri Aug 30 13:12:25 PDT 2024


Dear List,

We are in the process of creating an ARM build of our system, and we have
discovered some differences in GDAL behavior between the two.

One is the declared block size of a simple RGB PNG image, which we use for
some raster import tests. The image is 320x225 and gdalinfo on x86 reports
that for the block size of the three bands also. However, on ARM it reports
the block sizes as 320x1.

ubuntu at guest:~/work/heavydb-internal$ gdalinfo
Tests/Import/datafiles/raster/beach.png
Driver: PNG/Portable Network Graphics
Files: Tests/Import/datafiles/raster/beach.png
Size is 320, 225
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  225.0)
Upper Right (  320.0,    0.0)
Lower Right (  320.0,  225.0)
Center      (  160.0,  112.5)
Band 1 Block=320x1 Type=Byte, ColorInterp=Red
Band 2 Block=320x1 Type=Byte, ColorInterp=Green
Band 3 Block=320x1 Type=Byte, ColorInterp=Blue

PNG file here (as a Zip to avoid risk of binary change)...

https://drive.google.com/file/d/1MaK_oBvX8YjgYNMrDpc0Hv7SlQFZ4890/view?usp=sharing

The second difference is the point order of the (single, outer) ring of a
MULTIPOLYGON when exported and re-imported as GeoJSONL. In either the
export or the import (haven't looked that deeply yet) the ring is getting
reversed. Note that the ring data is actually very bogus (lots of repeated
points and no avoidance of self-intersection). We simplified it to
topologically valid data and then there are no differences between
platforms. So it's possible that the CW/CCW auto-detection/reversal is
getting confused by some floating-point precision differences (which we
have also encountered in other places). We are not worried about this one,
having simplified the test so that it now passes, but the difference is
still slightly concerning.

These differences are consistent on both an AWS G5g.8xlarge and an nVidia
GH200, both running Ubuntu 22.04 and our own build (done on the AWS
instance) of GDAL 3.7.3.

I intend to try 3.9.2 also, as we are intending to upgrade to that for our
next release.

(repost after canceling original post held for moderation due to attachment
size)

-- 
Simon Eves
Senior Rendering Engineer
+1 (415) 902-1996
simon.eves at heavy.ai

<http://www.heavy.ai>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240830/d7c3b416/attachment.htm>


More information about the gdal-dev mailing list