[GRASS-dev] [GRASS GIS] #2074: r3.mapcalc neighborhood modifier hash table and tile errors

GRASS GIS trac at osgeo.org
Wed Oct 1 09:12:08 PDT 2014


#2074: r3.mapcalc neighborhood modifier hash table and tile errors
-------------------------+--------------------------------------------------
 Reporter:  wenzeslaus   |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Raster3D     |     Version:  svn-trunk                
 Keywords:  r3.mapcalc   |    Platform:  All                      
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by wenzeslaus):

 Replying to [comment:12 glynn]:
 > Replying to [comment:11 wenzeslaus]:
 >
 > > I though that `putenv("WORKERS=1")` solved it and I don't have to set
 anything, is that right?
 >
 > Actually it probably needs to be `putenv("WORKERS=0")`. WORKERS=1 will
 create 1 additional thread, but will also execute code in the main thread.

 This makes sense although it is not consistent with other usages of
 `WORKERS`:

 `r3.in.xyz`:
 {{{
 To enable parallel processing support, set the <b>workers=</b> option
 to match the number of CPUs or CPU-cores avaiable on your system.
 Alternatively, the <tt>WORKERS</tt> environment variable can be set
 to the number of concurrent processes desired.
 }}}

 `i.oif`:
 {{{
 By default the module will calculate standard deviations for all bands in
 parallel. To run serially use the <b>-s</b> flag. If the <tt>WORKERS</tt>
 environment variable is set, the number of concurrent processes will be
 limited to that number of jobs.
 }}}

 Anyway, I made the change in r62147. The issue is that I wanted to create
 test which would show the problem with `WORKERS=1` (and run with
 `WORKERS=0`) but I was able to get the error only sometimes. More often I
 got different error. It was error in computation and I don't understand
 it:

 {{{
 ======================================================================
 FAIL: test_difference_of_the_same_map_double
 (__main__.TestBasicOperations)
 Test zero difference of map with itself
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "test_r3_mapcalc.py", line 35, in
 test_difference_of_the_same_map_double
     self.assertRaster3dMinMax('diff_a_a', refmin=0, refmax=0)
   File "/home/vasek/dev/grass/gcc_trunk/dist.x86_64-unknown-linux-
 gnu/etc/python/grass/gunittest/case.py", line 449, in assertRaster3dMinMax
     self.fail(self._formatMessage(msg, stdmsg))
 AssertionError: The actual minimum (-194.646443) is smaller than the
 reference one (0) for 3D raster map diff_a_a (with maximum 0.0)

 ======================================================================
 FAIL: test_difference_of_the_same_map_float (__main__.TestBasicOperations)
 Test zero difference of map with itself
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "test_r3_mapcalc.py", line 45, in
 test_difference_of_the_same_map_float
     self.assertRaster3dMinMax('diff_af_af', refmin=0, refmax=0)
   File "/home/vasek/dev/grass/gcc_trunk/dist.x86_64-unknown-linux-
 gnu/etc/python/grass/gunittest/case.py", line 449, in assertRaster3dMinMax
     self.fail(self._formatMessage(msg, stdmsg))
 AssertionError: The actual minimum (-193.378128) is smaller than the
 reference one (0) for 3D raster map diff_af_af (with maximum 0.0)
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2074#comment:13>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list