Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3688 closed defect (fixed)

gdalwarp -multi outputs duplicated progress bar for some images

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.8.0
Component: Algorithms Version: unspecified
Severity: normal Keywords:
Cc:

Description

In 90% of the runs of :

gdalwarp korea_high_res.tif korea_out.tif -multi -wm 800 -co TILED=YES

with the following image :

Driver: GTiff/GeoTIFF
Files: korea_high_res.tif
Size is 33554, 17476
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (126.179995536804199,36.150040626525879)
Pixel Size = (0.000042915344238,-0.000042915344238)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 126.1799955,  36.1500406) (126d10'47.98"E, 36d 9'0.15"N)
Lower Left  ( 126.1799955,  35.4000521) (126d10'47.98"E, 35d24'0.19"N)
Upper Right ( 127.6199770,  36.1500406) (127d37'11.92"E, 36d 9'0.15"N)
Lower Right ( 127.6199770,  35.4000521) (127d37'11.92"E, 35d24'0.19"N)
Center      ( 126.8999863,  35.7750463) (126d53'59.95"E, 35d46'30.17"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue

I get the following output :

Creating output file that is 33554P x 17476L.
Processing input file korea_high_res.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.

The reason is that the progress base and scale value were stored by the warp operation object (that is shared by the 2 worker threads) and set at the creation of the thread. So in some cases depending on when threads starts & ends, the (n-1)th thread instance could get the progress info of the (n)th thread

Change History (2)

comment:1 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk in r20080

comment:2 by Even Rouault, 14 years ago

r20081 /trunk/gdal/alg/gdalwarpoperation.cpp: Fix r20080 when there's only one chunk to compute (#3688)

Note: See TracTickets for help on using tickets.