<!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 text="#000000" bgcolor="#ffffff">
    Hi Mollie,<br>
    <br>
    I believe that the error message is left over from early versions of
    ADMB, and the error should refer to 32-bit now.  But, I believe you
    are receiving this error because you are supplying a number that is
    too large to the GRADSTACK_BUFFER_SIZE function. The command line
    argument doesn't quite go through the same checks as the call to the
    function in the tpl code, which explains the difference.  <br>
    <br>
    Ian Taylor and I investigated memory usage in ADMB and posted a
    summary of our findings on the ADMB-project website. See<br>
    <a class="moz-txt-link-freetext" href="http://admb-project.org/community/benchmarks">http://admb-project.org/community/benchmarks</a><br>
    <br>
    Without knowing too much about your problem, a solution may be to
    compile your code with the 64-bit version of ADMB and run using
    64-bit Linux.  Unfortunately 64-bit Windows allocates some variables
    in 32-bit whereas Linux allocates these variables in 64-bit, so
    64-bit Windows may not entirely fix your problem.  Furthermore, and
    I am not certain, but you may have to increase -gbs from the command
    line to avoid the error.  <br>
    <br>
    Also, you may want to have a look at Mark Maunder's summary of
    memory management:<br>
<a class="moz-txt-link-freetext" href="http://admb-project.org/community/tutorials-and-examples/memory-management">http://admb-project.org/community/tutorials-and-examples/memory-management</a><br>
    <br>
    Some other suggestions I have are to set -ams to a level just above
    what is necessary, to set -cbs just above what keeps the cmpdiff.tmp
    file size to zero (additional -cbs values keep hogging memory even
    when not needed), and then to increase -gbs levels to what is
    needed.<br>
    <br>
    Good luck and let me know if you have any questions,<br>
    Allan<br>
    <br>
    <br>
    On 2/1/2011 4:56 PM, Mollie Brooks wrote:
    <blockquote cite="mid:685FBBBC-9FE3-4EB1-9A76-DF30A3F8B414@ufl.edu"
      type="cite">
      <div apple-content-edited="true"><span class="Apple-style-span"
          style="border-collapse: separate; color: rgb(0, 0, 0);
          font-family: Helvetica; font-size: medium; font-style: normal;
          font-variant: normal; font-weight: normal; letter-spacing:
          normal; line-height: normal; orphans: 2; text-indent: 0px;
          text-transform: none; white-space: normal; widows: 2;
          word-spacing: 0px;">
          <div style="word-wrap: break-word;">
            <div><span class="Apple-style-span" style="font-size: 12px;">
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;">Hi,</span></font></div>
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;">I'm
                      continually having problems with memory
                      allocation. I don't understand the purpose of this
                      error</span></font></div>
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;"><br>
                    </span></font></div>
                <div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;"> It appears that the size you are setting
                        for the</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;"> GRADSTACK_BUFFER is > 64K in a 16 bit
                        word machine.This appears</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;"> to be an error. The maximum size
                        argument for the function</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;">---
                        gradient_structure::set_GRADSTACK_BUFFER_SIZE(long
                        int i) ---</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;">should probably be  89478485</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;">UINT_MAX = 4294967295</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;"> i = 10000000000</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;"> gs_size = 48</span></font></div>
                  <div><font class="Apple-style-span" size="4"><span
                        class="Apple-style-span" style="font-size:
                        14px;"> i*gs_size = 480000000000</span></font></div>
                </div>
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;"><br>
                    </span></font></div>
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;">I
                      really do need a buffer larger than this
                      (otherwise I get a gradfil1.tmp >32GB). When I
                      ask for a larger buffer in the command line
                      (-gbs), it behaves erratically: sometimes it is
                      enough and sometimes I get the gradfil1.tmp. It's
                      very frustrating. The only difference between the
                      different runs is the node on the cluster that the
                      job goes to. Could that be causing the program to
                      use different amounts of memory. </span></font></div>
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;">thanks,</span></font></div>
                <div><font class="Apple-style-span" size="4"><span
                      class="Apple-style-span" style="font-size: 14px;">Mollie</span></font></div>
                <div> </div>
              </span></div>
          </div>
        </span><br class="Apple-interchange-newline">
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@admb-project.org">Users@admb-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>