[ADMB Users] ARRAY_MEMBLOCK_SIZE

100 views
Skip to first unread message

Mollie Brooks

unread,
Sep 7, 2010, 11:26:34 AM9/7/10
to us...@admb-project.org
Hello ADMB users,
I'm trying to figure out how to increase the ARRAY_MEMBLOCK_SIZE. Is there some trick to it? 

After I clicked on the .exe file generated by running my code, it gave me this error

159456>=150000
 No memory for dvar_vectors
 Need to increase ARRAY_MEMBLOCK_SIZE parameter
In gradient_structure declaration
logout


So I added this line to the end of my .tpl file

TOP_OF_MAIN_SECTION
arrmblsize = 10000000;

after reading here http://otter-rsch.com/cc/cc6.html and in the admb.pdf file.

But this gives me an error that I don't understand. 

*** tpl2cpp   ADMBponds_process3
Error in line 98 while reading
a

Line 98 is the first line of my TOP_OF_MAIN_SECTION. 
Do you have any idea why this gives an error?
The version I'm running is from Nov 2009. I'm using a Mac. 

thanks,
Mollie

Mollie Brooks
Ph.D. Candidate
NSF IGERT Fellow
Biology Department
University of Florida



dave fournier

unread,
Sep 7, 2010, 11:40:24 AM9/7/10
to us...@admb-project.org

It is easier to do this with command line options

myprog -ams nnnnnn

will do the job. there are also options like -gbs and -cbs
for allocating buffers.
_______________________________________________
Users mailing list
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users

Mollie Brooks

unread,
Sep 7, 2010, 11:51:49 AM9/7/10
to dave fournier, us...@admb-project.org
Are buffers more automatic than array memblock size? Or are there other benefits to using them?
-Mollie

Mark Maunder

unread,
Sep 7, 2010, 11:59:28 AM9/7/10
to Mollie Brooks, dave fournier, us...@admb-project.org

Mollie,

 

See http://admb-project.org/community/tutorials-and-examples/memory-management for memory management

 

And http://admb-foundation.org/wp-content/uploads/Newsletter/ADMBNewsletterOctober2009.pdf for creating functions.

 

Mark

 

 

 

Mark Maunder

Head of the Stock Assessment Program

Inter-American  Tropical Tuna Commission
8604 La Jolla Shores Drive
La Jolla, CA, 92037-1508, USA
  
Tel: (858) 546-7027
Fax: (858) 546-7133
mmau...@iattc.org
http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder

 

Visit the AD Model Builder project at
 http://admb-project.org/

 

See the following website for information on fisheries stock assessment

http://www.fisheriesstockassessment.com/

 

Steve Martell

unread,
Sep 7, 2010, 12:01:11 PM9/7/10
to Mollie Brooks, us...@admb-project.org
Try using spaces not tabs in the TOP_OF_MAIN_SECTION

the error is occurring in the tpl2cpp translation.

S.
_______________________________________________
Users mailing list
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users

Mollie Brooks

unread,
Sep 7, 2010, 5:40:39 PM9/7/10
to Steve Martell, us...@admb-project.org
Thanks for all the help; I'm almost able to run the program now. 
I got the code to compile with Steve's suggestion of this at the end

TOP_OF_MAIN_SECTION
time(&start);
arrmblsize = 50000000;
gradient_structure::set_GRADSTACK_BUFFER_SIZE(1.e7);
gradient_structure::set_CMPDIF_BUFFER_SIZE(1.e7);
gradient_structure::set_MAX_NVAR_OFFSET(5000);
gradient_structure::set_NUM_DEPENDENT_VARIABLES(5000);

But I had to comment out the line time(&start) because I didn't define start.
Also, I had to leave a blank line after the last line. 

Now I'm getting a warning about the line arrmblsize = 50000000;
warning: integer constant is too large for 'long' type

Is this a problem?
-Mollie
Reply all
Reply to author
Forward
0 new messages