[GRASS-dev] [GRASS GIS] #2230: 'g.region -p' writes new WIND file, causes race condition for parallel jobs
GRASS GIS
trac at osgeo.org
Thu Mar 27 12:29:32 PDT 2014
#2230: 'g.region -p' writes new WIND file, causes race condition for parallel jobs
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Default | Version: svn-develbranch6
Keywords: g.region | Platform: Linux
Cpu: x86-64 |
----------------------+-----------------------------------------------------
Comment(by glynn):
Replying to [comment:3 wenzeslaus]:
> what is the set of `g.region` flags which should be used by default when
scripting.
If you only want to read the region, use the "-u" flag.
> This is not expected behavior and it is not properly documented.
Agreed; I overlooked it when writing the grass.script.core Python module.
> Also I don't understand why it is necessary to write the WIND file in
`g.region` if the content was not changed.
It's not simple to tell whether the content was changed, i.e. whether the
region which is printed will match the contents of the WIND file.
When the region is changed explicitly (via the -d flag or any option other
than save=), it's reasonable to assume that the updated region doesn't
match the WIND file. But the absence of those options doesn't necessarily
mean that writing to WIND (or $WIND_OVERRIDE) will be a no-op.
If the behaviour was changed so that WIND was only written when one of
those options was used, that would technically be a change to the long-
standing behaviour, but we would probably get away with it. Probably.
Maybe that's close enough; I have no particular opinion on that.
However: we'd need to add a -f (force) flag, otherwise there'd be no way
to copy the $GRASS_REGION value to WIND/$WIND_OVERRIDE, or to perform just
the adjustment (G_adjust_Cell_head3).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2230#comment:4>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list