I am processing satellite data in R and need to merge sat images of different UTM zones, which is where I ran into unexpected problems. I think I have solved them, but before moving to the production server I'd like to (have to) regain full control over the number of cores that are used. In addition to my own parallelizations, GDAL also runs commands in parallel / multiple times. Is it possible to set the number of workers that are being started?
In detail, I have the call
require(gdalUtils)
mosaic_rasters(gdalfile = list.of.two.files, dst_dataset = ftemp,
gdalwarp_index = 2, of = "GTiff")
This results in all of my available cores starting an instance of gdal_translate. I want to limit this.
I could not find anything about this topic in the GDAL configuration files, and passing co = "NUM_THREADS=2" has no effect - rightfully so I think.