[Developers] New script options
Arni Magnusson
arnima at hafro.is
Thu Mar 28 10:23:47 PDT 2013
Safe compilation will be the default in all scripts, and that default will
carry over to ADMB-IDE.
The idea was to introduce a new option -o to explicitly build an optimized
model. So "admb -o simple" would do exactly what the scripts do today, and
"admb -s simple" would be equivalent to "admb simple".
I don't have a model that takes long to build, but can someone benchmark
this:
Build time | Executable size | Run time
admb bigmodel
admb -s bigmodel
admb -g bigmodel
admb -g -s bigmodel
The results will help us decide how the compilation scripts should work.
For example, we could have safe compilation turn off the -O3 optimization
- like Ian suggests. In this way, safe compilation would be safe (checking
array bounds) and also build fast. Sounds like a reasonable default while
developing a model.
It's tempting to keep the script UI simple and couple together
functionality (bounds, optimization, libraries, debug) that would be
sensible to use together. I think this coupling should be based on the
results from the above benchmark.
Arni
On Thu, 28 Mar 2013, Ian Taylor - NOAA Federal wrote:
> Hi Developers,
>
> I know it's not that helpful for folks like me to make suggestions that
> they're not skilled enough to implement, but how hard would it be for
> ADMB to add a -o option that would turn on or off the -O3 or -Ox? And
> wasn't -s going to become the default at some point, or was the only
> proposed change the one that Arni to set this as default in the IDE?
>
> -Ian
>
>
>
> On Thu, 28 Mar 2013, Larry Jacobson wrote:
>
>> Sorry, my original note summarizing approaches to reducing compile time
>> for ADMB using the MinGW or Visual C++ 2010 Express compilersin Windows
>> left out 3 important items. Unfortunately, one cannot recompile
>> e-mails.
>>
>> In any case:
>>
>> 1) Optimization is turned off using the MinGW compiler by changing line
>> line sym=-O3 in adcomp.bat so that it reads sym=-O.
>>
>> 2) Optimization is turned off using the Microsoft compiler by omitting
>> -Ox from the first call to the compiler. That is, use:
>>
>>> cl -c /EHsc -DUSE_LAPLACE -DWIN32 %opt% -D__MSVC32__=8 -I.
>>> -I"%ADMB_HOME%"\include -I"%ADMB_HOME%"\contrib %1.cpp
>>>
>> instead of:
>>
>>> cl -c /EHsc -DUSE_LAPLACE -DWIN32 %opt% /Ox -D__MSVC32__=8 -I.
>>> -I"%ADMB_HOME%"\include -I"%ADMB_HOME%"\contrib %1.cpp
>>
>> 3) The popular IDE for Windows uses the MinGW compilerwith a slightly
>> different adcomp.bat file that is probably in a directory named
>> something like C:\admb\admb101-gcc452-win32\**bin. To turn off
>> optimization in the IDE, change theline sym=-O3 in adcomp.bat so that
>> it reads sym=-O(same as #1). See Arni's note belowand an additional
>> one from John Sibert below Arni's.
>>
>> Cheers!
>>
>> Hi Larry,
>
More information about the Developers
mailing list