[ADMB Users] gradstack buffer size error
Allan Hicks
Allan.Hicks at noaa.gov
Tue Feb 1 17:16:02 PST 2011
Hi Mollie,
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.
Ian Taylor and I investigated memory usage in ADMB and posted a summary
of our findings on the ADMB-project website. See
http://admb-project.org/community/benchmarks
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.
Also, you may want to have a look at Mark Maunder's summary of memory
management:
http://admb-project.org/community/tutorials-and-examples/memory-management
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.
Good luck and let me know if you have any questions,
Allan
On 2/1/2011 4:56 PM, Mollie Brooks wrote:
> Hi,
> I'm continually having problems with memory allocation. I don't
> understand the purpose of this error
>
> It appears that the size you are setting for the
> GRADSTACK_BUFFER is > 64K in a 16 bit word machine.This appears
> to be an error. The maximum size argument for the function
> --- gradient_structure::set_GRADSTACK_BUFFER_SIZE(long int i) ---
> should probably be 89478485
> UINT_MAX = 4294967295
> i = 10000000000
> gs_size = 48
> i*gs_size = 480000000000
>
> 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.
> thanks,
> Mollie
>
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110201/3d0b175e/attachment.html>
More information about the Users
mailing list