[GRASS-dev] r.mapcalc random result different on MS Windows with same seed

Vaclav Petras wenzeslaus at gmail.com
Thu Feb 19 11:33:38 PST 2015


Hello,

it seems that r.mapcalc gives different (pseudo-)random result on MS
Windows then it is giving on Linux. In NC sample dataset:

g.region n=20 s=10 e=25 w=15 res=1
r.mapcalc "rand_cell = rand(1, 200)" seed=500
r.info rand_cell -r

gives the following on Linux:

min=1
max=195

while on MS Windows it gives:

min=1
max=196

The test for r.mapcalc seed fails on MS Windows 8.1 (64bit) [1] but the
results are even worse, so I'm not sure what exactly is the issue there:

    mismatch values (key, reference, actual): [('max', 0, 80), ('min', 0,
-119)]

Can somebody confirm this behavior and/or test it on different platforms?

Both the individual commands and the tests needs to be executed. The test
can be executed using:

cd raster/r.mapcalc/testsuite
python test_r_mapcalc.py
(g.remove rand_cell)

On Linux, I'm getting the same manually and from the test [2]. The thing
which is extra in the tests is the import from ASCII. There are similar
tests for r.mapcalc and seed but the only test which is failing is the one
with type CELL.

Vaclav

[1]
http://fatra.cnr.ncsu.edu/grassgistests/mswindows/reports_for_date-2015-02-18-21-00/report_for_nc_spm_08_grass7_nc/raster/r.mapcalc/test_r_mapcalc/index.html

[2]
http://fatra.cnr.ncsu.edu/grassgistests/reports_for_date-2015-02-18-08-00/report_for_nc_spm_08_grass7_nc/raster/r.mapcalc/test_r_mapcalc/index.html

[3]
https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150219/3d1f3ed4/attachment.html>


More information about the grass-dev mailing list