<div dir="ltr">I did. I recompile and see if that takes care of the problem.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 10, 2014 at 1:10 AM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Aug 28, 2014 at 7:34 AM, Paulo van Breugel<br>
<<a href="mailto:p.vanbreugel@gmail.com">p.vanbreugel@gmail.com</a>> wrote:<br>
> On Wed, Aug 27, 2014 at 8:20 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>
>> On Wed, Aug 27, 2014 at 3:25 PM, Paulo van Breugel<br>
</span><span class="">>> > I forgot to mention that I am using GRASS 7.1 (rev 61757, had it before<br>
>> > with rev 61413, but I think I had a similar problem about a year ago).<br>
>> ><br>
>> > On Wed, Aug 27, 2014 at 10:13 AM, Paulo van Breugel<br>
</span><span class="">>> >> When running several r.mapcalc in a loop (via R) the function stops<br>
>> >> with an error:<br>
>> >><br>
>> >> ERROR: Error reading null row 2725 for <MASK><br>
>><br>
>> The error comes from read_null_bits() in<br>
>> lib/raster/get_row.c<br>
>><br>
>> around<br>
>> <a href="http://trac.osgeo.org/grass/browser/grass/trunk/lib/raster/get_row.c#L827" target="_blank">http://trac.osgeo.org/grass/browser/grass/trunk/lib/raster/get_row.c#L827</a><br>
>><br>
>> Maybe some off_t definition is missing?<br>
><br>
> I don't know what that means; indication of something being wrong with the<br>
> data, or in the code?<br>
<br>
</span>Question: did you compile with --with-pthread?<br>
AFAIK it causes troubles.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Markus<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>> >> The row number varies. This seems to happen at random, and when I<br>
>> >> repeat<br>
>> >> the same r.mapcalc calculation that stopped with the error before,<br>
>> >> things run without problem.<br>
>><br>
>> Please tell us also<br>
>> - how many raster cells are involved<br>
>> - how many files are opened in the loop?<br>
><br>
> Last time the error occured in the r.mapcalc below:<br>
><br>
>   The command:<br>
> r.mapcalc --overwrite expression="OUTPUT = if(MESSC==0, 100000* 100.0 *<br>
> (MESSB-12300000)/(382900000-12300000), if(MESSC<=5000000, 2*MESSC,<br>
> if(MESSC<=10000000, 2*(10000000-MESSC),100000 * 100.0 * (382900000-<br>
> MESSB)/(382900000-12300000))))"<br>
> produced an error (1) during execution:<br>
> ERROR: Error reading null row 2725 for <MASK><br>
><br>
> These layers have 6515140 raster cells, with 3366825 total null cells. The<br>
> command is part of a sequence of commands that is run in a loop, but these<br>
> are run in sequence so at the time of the error I guess two layers were<br>
> open. As I mentioned, running the command again and it will normally run<br>
> without problems with the given input layers, and it may go wrong with other<br>
> input layers again, without any discernible logic to me.<br>
><br>
>><br>
>> >> I tried after removing the mask, and this time no problem so it may<br>
>> >> have<br>
>> >> to do something with the MASK? (as these error messages only occur once<br>
>> >> in a<br>
>> >> while, I can't be completely sure it only happens when a MASK is<br>
>> >> defined).<br>
>> >><br>
>> >> I ran it through R, using the execGRASS() function of the spgrass6<br>
>> >> package. I ran the same, but using the system call instead of<br>
>> >> execGRASS.<br>
>> >> Still got the same error messages. I therefore guess this has nothing<br>
>> >> to do<br>
>> >> with R?<br>
>><br>
>> Could you "simulate" the loops in a GRASS script outside of R to see<br>
>> if it the same?<br>
><br>
><br>
> I'll have to figure out how to do that. Perhaps running the r.mapcalc above<br>
> several times will do the trick.<br>
>><br>
>><br>
>> Markus<br>
><br>
><br>
</div></div></blockquote></div><br></div>