<div dir="ltr">Thanks Dave,<div><br></div><div>I managed to change the sign parameters to type <b>int</b>.<b>  </b>It seems to work, but I will need to<div>do a more testing and checking before I commit the changes.</div></div>

<div><br></div><div>Johnoel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 30, 2014 at 2:56 PM, dave fournier <span dir="ltr"><<a 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">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>On 06/30/2014 05:24 PM, Johnoel Ancheta
      wrote:<br>
      <br>
      Hi Johnoel,<br>
      <br>
      It is one of those stupid design decisions I made on the fly a
      long time ago.<br>
      <br>
      The problem is with the variable sign.  It is only there to check
      that the determinant is <br>
      positive.  So it only needs to be an int all cases (probably). 
      Something like<br>
      <br>
      dvar_vector solve(const dvar_matrix & aa, const dvar_vector
      & z,<br>
                        prevariable & ln_unsigned_det, int &
      sign);<br>
      <br>
      dvector solve(const dmatrix & aa, const dvector & z,<br>
                    const double &ln_unsigned_det, int &sign);<br>
      <br>
      <br>
      df1b2vector solve(const df1b2matrix & aa, const df1b2vector
      & z,<br>
                        df1b2variable & ln_unsigned_det, int &
      sign);<br>
      <br>
      <br>
      But over time a whole bunch of these things may have proliferated.<span class="HOEnZb"><font color="#888888"><br>
      <br>
           Dave<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
    </font></span></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Sorry, it took awhile, but I finally understood it
        was just needed the function.  It has been 
        <div>added and committed to the source repository (see <a href="http://www.admb-project.org/redmine/projects/issues/repository/revisions/2152" target="_blank">Revision
            2152</a>).  </div>
        <div><br>
        </div>
        <div>To use the most current version, read the <a href="http://www.admb-project.org/buildbot/documentation/INSTALL.html" target="_blank">INSTALL</a>
          procedure.</div>
        <div>Remove the GLOBALS_SECTION, the rebuild.</div>
        <div><br>
        </div>
        <div>Let me know,</div>
        <div>Johnoel</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Sun, Jun 29, 2014 at 10:41 PM,
          Stirrup, Oliver <span dir="ltr"><<a href="mailto:oliver.stirrup.13@ucl.ac.uk" target="_blank">oliver.stirrup.13@ucl.ac.uk</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello
            again Dave<br>
            <br>
            I've now succeeded in compiling and running the example by
            adding the function that you provided to the GLOBALS_SECTION
            as you suggest. This should allow me to move forward in
            terms of the modelling that I am trying to achieve, for
            which I have found no solution other than ADMB, so thank you
            very much for your help!<br>
            <div><br>
              Best wishes<br>
              <br>
              Oliver<br>
              <br>
              Oliver Stirrup<br>
              PhD Student<br>
              <br>
              MRC Clinical Trials Unit at UCL<br>
              Institute of Clinical Trials & Methodology<br>
            </div>
            e-mail:                          <a href="mailto:oliver.stirrup.13@ucl.ac.uk" target="_blank">oliver.stirrup.13@ucl.ac.uk</a><br>
            <div><br>
              -----Original Message-----<br>
              From: dave fournier [mailto:<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>]<br>
              Sent: 27 June 2014 22:41<br>
              To: Stirrup, Oliver; <a href="mailto:users@admb-project.org" target="_blank">users@admb-project.org</a><br>
              Subject: Re: [ADMB Users] Matrix functions for ADMB-RE<br>
              <br>
            </div>
            <div>On 06/27/2014 02:14 PM, Stirrup, Oliver wrote:<br>
              <br>
              It compiles OK for me.  However I have long since
              forgotten the details.  Maybe you are missing the attached
              function, f1b2sol2.cpp.  can you cimple and link that in
              with your program?<br>
              <br>
              Or you can add the guts of it to your tpl file in the
              GLOBALS_SECTION.<br>
              <br>
                    Dave<br>
              <br>
              <br>
              <br>
              > Thanks for getting back to me again, Dave. I have
              made the amendment to the TPL file that you suggest, but
              still haven't quite got this working. Compilation seems to
              progress to a later stage than previously, but I am ending
              up with the following error message:<br>
              > <<<<br>
              ><br>
              > *** adcomp -r orange<br>
              > g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux
              -DOPT_LIB<br>
            </div>
            > g++ -DUSE_LAPLACE -fpermissive -I.<br>
            > g++ -I"c:/ADMB/admb101-gcc452-win64\include" -o
            orange.obj orange.cpp<br>
            <div>><br>
              > *** adlink -r orange<br>
              > g++ -s -static -L"c:/ADMB/admb101-gcc452-win64\lib"
              orange.obj<br>
            </div>
            > g++ -ldf1b2o -ladmod -ladt -lado -ldf1b2o -ladmod -ladt
            -lado -o<br>
            > g++ orange<br>
            <div>>
              orange.obj:orange.cpp:(.text+0xeb3): undefined reference
              to `solve(df1b2matrix const&, df1b2vector const&,
              df1b2variable const&, double&)'<br>
              > orange.obj:orange.cpp:(.text+0x3fe5): undefined
              reference to `solve(df1b2matrix const&, df1b2vector
              const&, df1b2variable const&, double&)'<br>
              > collect2: ld returned 1 exit status<br>
              ><br>
              > Error: could not create orange.exe<br>
              ><br>
              > Oliver<br>
              > ________________________________________<br>
              > From: dave fournier <<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>><br>
              > Sent: 27 June 2014 17:46<br>
              > To: <a href="mailto:users@admb-project.org" target="_blank">users@admb-project.org</a>;
              Stirrup, Oliver<br>
              > Subject: Re: [ADMB Users] Matrix functions for
              ADMB-RE<br>
              ><br>
              > Line 75 in your tpl file should be<br>
              ><br>
              ><br>
              ><br>
              >       dvar_vector tmp=solve(Vi,res,ld,sgn);<br>
              ><br>
              ><br>
              > Sorry this is so finicky.  Maybe eventually  we will
              get past pretty<br>
              > printing documentation and just fix stuff.<br>
              ><br>
              >        Dave<br>
              ><br>
              <br>
            </div>
            <div>
              <div>_______________________________________________<br>
                Users mailing list<br>
                <a href="mailto:Users@admb-project.org" target="_blank">Users@admb-project.org</a><br>
                <a 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>
  </div></div></div>

</blockquote></div><br></div>