[gdal-dev] Multithreading issue on pixel-based intensive access (GDAL 2.1.0)

Francisco Javier Calzado francisco.javier.calzado at ericsson.com
Mon Aug 1 06:57:44 PDT 2016


Thank you so much Even, it is working now!

I will check the link and send my driver code soon.

Javier.

-----Original Message-----
From: Even Rouault [mailto:even.rouault at spatialys.com] 
Sent: 30 July, 2016 17:10
To: Francisco Javier Calzado <francisco.javier.calzado at ericsson.com>
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Multithreading issue on pixel-based intensive access (GDAL 2.1.0)

Javier,

> I have attached a simple code to reproduce it (Test.cpp). If you need 
> the whole solution just ask me, although it is a very simple console 
> test. I have also shared with you the zipped datasets through this link:
> https://drive.google.com/file/d/0B-OCl1FjBi0YblRPRGZlQWx4eEE/view?usp=
> shari ng Just place them along with Test.exe file.

I managed to reproduce on Linux after some compilation fixes in your driver (constants _UI8_MAX and similar ones aren't recognized. I just commented out that code), and changing your Test.cpp to use GDAL thread machinery, since std::future/std::async doesn't create threads with gcc (4.8.4) for some reason but runs everything sequentially in the main thread.
The issue was that the call to GDALSetCacheMax() prevented the raster block mutex from being created. Fixed per https://trac.osgeo.org/gdal/ticket/6611. 
As a workaround you can call GDALGetCacheMax() just before.

> 
> IMPORTANT: Bear in mind that these datasets come in a format still not 
> supported officially by GDAL, as I am developing the driver. It is 
> almost finished (just a few details pending) and fully working. Find 
> the driver attached (Wizard_Driver.7z). By the way, what do we have to 
> do to contribute with this new driver for GDAL?

See https://trac.osgeo.org/gdal/wiki/HowToContribute

Even

--
Spatialys - Geospatial professional services http://www.spatialys.com


More information about the gdal-dev mailing list