<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 13-11-14 04:31 PM, Leo Polansky
      wrote:<br>
      <br>
      my version of the code looks like<br>
      <br>
      void function_minimizer::trust_region_update(int nvar,int _crit,<br>
        independent_variables& x,const dvector& _g,const
      double& _f)<br>
      {<br>
        double & f= (double&)_f;<br>
        dvector & g= (dvector&)_g;<br>
        int unvar=1;                                                   
        // unvar defined here<br>
        fmm fmc(nvar);<br>
        if (random_effects_flag)<br>
        {<br>
          initial_params::set_active_only_random_effects();<br>
          //cout << nvar << endl;<br>
          unvar=initial_params::nvarcalc();                 //unvar used
      here<br>
          initial_params::restore_start_phase();<br>
      <br>
      So I have no idea why it thinks that unvar is undefined here.<br>
      <br>
      What does your version of the code look like?<br>
      <br>
    </div>
    <blockquote
cite="mid:CAPa4Kffc6RCexd8SJXgLuBNwGO2v67xg=kNJ9YkJ4M0Wgs0t7A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dear ADMB Developers,
        <div>Thank you for making this software; I'm looking forward to
          using it to move beyond shoehorning my problems into things
          solvable in R. I attempted to install admb on Mac with
          Mavericks (OS X 10.9) following the instructions from Johnoel
          and Steve on earlier posting on this thread, i.e.</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">$ svn
          checkout <a moz-do-not-send="true"
            href="http://www.admb-project.org/svn/trunk" target="_blank">http://www.admb-project.org/svn/trunk</a> admb-trunk</div>
        <div style="font-family:arial,sans-serif;font-size:13px">$ cd
          admb-trunk</div>
        <div><span style="font-family:arial,sans-serif;font-size:13px">$
            make</span></div>
        <div><br>
        </div>
        <div>However,  besides the occasional warning, this did not
          work. In the end the make command produced</div>
        <div><br>
        </div>
        <div>
          <p style="margin:0px;font-size:11px;font-family:Menlo"><b>df1b2-separable/f1b2trst.cpp:31:5:
            </b><span style="color:rgb(195,55,32)"><b>error: </b></span><b>use
              of undeclared identifier 'unvar'; did you mean 'nvar'?</b></p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">   
            unvar=initial_params::nvarcalc(); // get the number of
            active</p>
          <p
            style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)"><b> 
                ^~~~~</b></p>
          <p
            style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)"> 
              nvar</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo"><b>df1b2-separable/f1b2trst.cpp:21:50:
              note: </b>'nvar' declared here</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">void
            function_minimizer::trust_region_update(int nvar,int _crit,</p>
          <p
            style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)"><b>  
                                                            ^</b></p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">1 error
            generated.</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">make[1]:
            ***
            [../build/objects/dist/optlp-df1b2-separable-f1b2trst.obj]
            Error 1</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">make:
            *** [c++-all] Error 2</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo"><br>
          </p>
          <p style="margin:0px">It appears I didn't get as far as
            Alejandro who seemed to get it to the point of being able to
            have an 'admb' command available. I'm not sure how to
            proceed, what to try, etc. Trying to download admb directly
            from the ADMB webpage and following the unix installation
            instructions did not work. Also, should I be nervous about
            Dave's earlier comment that an unsafe version was installed
            in some earlier cases? Any suggestions would be appreciated.
            In case it's helpful here is the C compiler version info.</p>
        </div>
        <div><br>
        </div>
        <div>
          <p style="margin:0px;font-size:11px;font-family:Menlo">gcc -v</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Configured
            with:
            --prefix=/Applications/Xcode.app/Contents/Developer/usr
            --with-gxx-include-dir=/usr/include/c++/4.2.1</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Apple
            LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Target:
            x86_64-apple-darwin13.0.0</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Thread
            model: posix</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo"><br>
          </p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">g++ -v</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">
            Configured with:
            --prefix=/Applications/Xcode.app/Contents/Developer/usr
            --with-gxx-include-dir=/usr/include/c++/4.2.1</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Apple
            LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Target:
            x86_64-apple-darwin13.0.0</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">
          </p>
          <p style="margin:0px;font-size:11px;font-family:Menlo">Thread
            model: posix</p>
          <p style="margin:0px;font-size:11px;font-family:Menlo"><br>
          </p>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Mon, Nov 11, 2013 at 9:03 AM, dave fournier <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            Your first version appears to make the optimized version of
            the<br>
            program which is intended to run fast and does not do bounds
            checks.
            <div class="im"><br>
              <br>
              *** tpl2cpp mixsan<br>
              <br>
              *** adcomp mixsan<br>
              g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux -DOPT_LIB
              -DUSE_LAPLACE -fpermissive -I.
              -I"/Applications/ADMB/ADMB-11
              Terminal.app/Contents/admb-11"/include -<br>
              <br>
              b<br>
              <br>
              <br>
            </div>
            Your second version
            <div class="im"><br>
              <br>
              *** tpl2cpp -bounds mixsan<br>
              <br>
              *** adcomp -s mixsan.cpp<br>
              c++ -c -O3 -D__GNUDOS__ -Dlinux -DSAFE_ALL -DUSE_LAPLACE
              -I. -I"/Users/alejandro/admb-trunk/build/dist"/include
              -I"/Users/alejandro/admb-trunk/build/dist"/contrib/include
              mixsan.cpp<br>
              <br>
              <br>
            </div>
            makes the slower "safe" version of the program which does
            bounds checking.  You should always do this first<br>
            to make sure that a new program does not walk out of any
            arrays.<br>
            <br>
            So it appears that your program never really worked, but the
            first version did not report the problem.
            <div class="HOEnZb">
              <div class="h5"><br>
                <br>
                <br>
                <br>
                <br>
                _______________________________________________<br>
                Users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Users@admb-project.org" target="_blank">Users@admb-project.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.admb-project.org/mailman/listinfo/users"
                  target="_blank">http://lists.admb-project.org/mailman/listinfo/users</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>