<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Terrific, thanks very much.<br>
&nbsp;&nbsp; Ken<br>
<br>
<br>
Andreas Stolcke wrote:
<blockquote cite="mid:200811081505.mA8F5iq26837@ns2" type="cite">
  <pre wrap="">In message <a class="moz-txt-link-rfc2396E" href="mailto:49087CA2.3030504@jhu.edu">&lt;49087CA2.3030504@jhu.edu&gt;</a>you wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,
  I didn't see anything about this in the mailing-list archive.  I just 
installed 1.5.7 and ran the
tests.  I saw one failure, in nbest-optimize-bleu.   I looked at the 
code briefly; the output is coming from nbest-optimize.cc:1179, but 
that's about as far as I got.  I built on Mac OS 10.4.11 using
this compiler version:

~/work/srilm--$ c++ --version
i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)

I can try another system if that will help, or let me know if anyone 
wants more information.
    Thanks,
        Ken Basye

    </pre>
  </blockquote>
  <pre wrap=""><!---->
It turns out this problems seems to affect compilation with gcc 4.2 on all
the platforms I tried (Linux, Solaris), so I assume it's the same bug as 
you describe.  The problem has to do with expression evaluation order
when the expression has side effects (++ operator).

You can apply the following patch, or download the beta release
(which also has some other fixes for BLEU optimization).

Andreas

*** lm/src/nbest-optimize.cc        2008/11/07 15:14:15        1.58
--- lm/src/nbest-optimize.cc        2008/11/08 13:49:49        1.59
***************
*** 1176,1182 ****
                      {
                          if (!fixLambdas[k])
                              cerr &lt;&lt; "lambda_" &lt;&lt; j - 1
!                                  &lt;&lt; " " &lt;&lt; p[ilo][j++] &lt;&lt; endl;
                      }
                  }
              }
--- 1176,1183 ----
                      {
                          if (!fixLambdas[k])
                              cerr &lt;&lt; "lambda_" &lt;&lt; j - 1
!                                  &lt;&lt; " " &lt;&lt; p[ilo][j] &lt;&lt; endl;
!                             j ++;
                      }
                  }
              }

  </pre>
</blockquote>
</body>
</html>