[postgis-devel] Sparc 64bit problems

Stephen Campbell Stephen at me.massey.landcare.cri.nz
Thu Oct 13 14:04:21 PDT 2005


Having a few problems with postgis on sparcv9 architecture (64bit)...


I'm not sure if I should have posted this to user or developer but it look like a problem with either gcc-4.0.2 or the code on sparcv9 so I post it here.


Builds are of : postgresql-8.0.4 postgis-cvs geos-2.1.4 proj-4.4.9
   (all the regressions pass on the 64bit postgresql).
 - 32bit install built by gcc-3.3.3 using Suns assembler and linker
 - 64bit install built by gcc-4.0.2 using Suns assembler and linker

Running the ogc_test_suite on a sparcstation5 (32bit) and Sun-Fire V480 (64bit)

In both there is a second "buildings" from the T1 query presumable due to the point and polygon representations (position & footprint columns) in the buildings table, so I've adjusted for that in the "correct" reference output (runs are with query echo on)...

Below under "GOOD (sparcv7)" and "NOT SO GOOD(sparcv9)" are edited diffs against the constructed "correct" reference output. 

Any ideas?, cheers, Stephen.



GOOD (sparcv7):
======================================================================
The 32bit (sparcv7) build just has a couple of polygon strings that start at different points, which I presume is ok?  There a diff-u (1 space indented) with some trailing context edited out and the polygon string padded to make it easier to see...


 --- 2_queries.correct       2005-10-13 12:09:05.459992000 +1300
 +++ 2_queries-sparcv7.out   2005-10-13 12:07:43.660007000 +1300

 @@ -394,11 +395,11 @@
  SELECT AsText(Difference(named_places.boundary, forests.boundary))
  FROM named_places, forests 
  WHERE named_places.name = 'Ashton' AND forests.name = 'Green Forest';
        astext      
  ------------------------------------------
 - POLYGON((56 34,62 48,84 48,84 42,56 34      ))
 + POLYGON((      62 48,84 48,84 42,56 34,62 48))
  (1 row)
  
 @@ -426,8 +427,8 @@
  SELECT AsText(ConvexHull(shore))
  FROM lakes
  WHERE lakes.name = 'Blue Lake';
      astext     
  ---------------------------------------
 - POLYGON((     52 18,66 23,73 9,48 6,52 18))
 + POLYGON((48 6,52 18,66 23,73 9,48 6      ))
  (1 row)



NOT SO GOOD (sparcv9):
======================================================================
The 64bit build on the sparcv9 arch has a few problems, here is a diff-u on that (again 1 space indented and edited out trailing contexts)...


 --- 2_queries.correct	     2005-10-13 14:10:23.414031000 +1300
 +++ 2_queries-sparcv9.out   2005-10-11 17:10:09.050419000 +1300
 @@ -74,22 +74,19 @@
  SELECT AsText(boundary) 
  FROM named_places 
  WHERE name = 'Goose Island';
              astext  
 -------------------------------------------                                 
 - POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )
 +-------------------------------
 + POLYGON( EMPTY, EMPTY, EMPTY)
  (1 row)
 
 
  SELECT AsText(PolygonFromWKB(AsBinary(boundary))) 
  FROM named_places 
  WHERE name = 'Goose Island';
 -            astext             
 -------------------------------------------                                 
 - POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )
 -(1 row)
 -
 +psql:2_queries.sql:243: ERROR:  Invalid type in wbk
 +CONTEXT:  SQL function "polygonfromwkb" statement 1
 
 @@ -114,20 +111,20 @@
  SELECT AsText(Boundary(boundary)) 
  FROM named_places 
  WHERE name = 'Goose Island';
        astext      
 --------------------------------------------
 - LINESTRING( 67 13, 67 18, 59 18, 59 13, 67 13 )
 +------------------
 + LINESTRING EMPTY
  (1 row)
  
  SELECT AsText(Envelope(boundary)) 
  FROM named_places 
  WHERE name = 'Goose Island';
      astext     
 -------------------------------------------
 - POLYGON( ( 59 13, 59 18, 67 18, 67 13, 59 13) )
 +---------------
 + POLYGON EMPTY
  (1 row)
  
 @@ -226,12 +223,12 @@
  SELECT AsText(ExteriorRing(shore))
  FROM lakes 
  WHERE name = 'Blue Lake';
        astext      
 ------------------------------------------
 - LINESTRING(52 18, 66 23, 73  9, 48  6, 52 18)
 +------------------
 + LINESTRING EMPTY
  (1 row)
  
 @@ -242,12 +239,12 @@
  SELECT AsText(InteriorRingN(shore, 1))
  FROM lakes 
  WHERE name = 'Blue Lake';
        astext       
 --------------------------------------------
 - LINESTRING(59 18, 67 18, 67 13, 59 13, 59 18)
 +-------------------
 + LINESTRING(59 18)
  (1 row)
  
 @@ -258,12 +255,12 @@
  SELECT AsText(GeometryN(centerlines, 2))
  FROM divided_routes 
  WHERE name = 'Route 75';
           astext         
 -------------------------------
 - LINESTRING( 16 0, 16 23, 16 48 )
 +------------------------
 + LINESTRING(16 0,16 23)
  (1 row)
  
 @@ -393,31 +390,19 @@
  SELECT AsText(Difference(named_places.boundary, forests.boundary))
  FROM named_places, forests 
  WHERE named_places.name = 'Ashton' AND forests.name = 'Green Forest';
 -      astext      
 -------------------------------------------
 -POLYGON( ( 56 34, 62 48, 84 48, 84 42, 56 34) )
 -(1 row)
 -
 +psql:2_queries.sql:922: ERROR:  invalid memory alloc request size 1073741824
 
  SELECT AsText(GeomUnion(shore, boundary))
  FROM lakes, named_places 
  WHERE lakes.name = 'Blue Lake' AND named_places.name = 'Goose Island';
 -      astext      
 -----------------------------------------
 -POLYGON((52 18,66 23,73 9,48 6,52 18))
 -(1 row)
 -
 +psql:2_queries.sql:936: ERROR:  invalid memory alloc request size 1073741824
 
  SELECT AsText(SymmetricDifference(shore, boundary))
  FROM lakes, named_places 
  WHERE lakes.name = 'Blue Lake' AND named_places.name = 'Goose Island';
 -      astext      
 -----------------------------------------
 -POLYGON((52 18,66 23,73 9,48 6,52 18))
 -(1 row)
 -
 +psql:2_queries.sql:951: ERROR:  invalid memory alloc request size 1073741824
  
 @@ -426,9 +411,9 @@
  SELECT AsText(ConvexHull(shore))
  FROM lakes
  WHERE lakes.name = 'Blue Lake';
      astext     
 ----------------------------------------
 - POLYGON((52 18,66 23,73 9,48 6,52 18))
 +---------------
 + POLYGON EMPTY
  (1 row)
  



More information about the postgis-devel mailing list