[ADMB Users] Summary -> ADMB V11.0 build (compile/link) time using MinGW or Visual C++ 2010 Express in Windows 7 (32 bit) - very slow

John Sibert sibert at hawaii.edu
Mon Mar 25 10:37:19 PDT 2013


Indeed, nice summary.

Dave also raised the issue of using "precompiled" headers, which is one 
of the reasons that the Borland compiler is so fast. Dave showed it to 
be feasible with the Gnu compilers, but  I'm not sure about Microsoft.

Another way to greatly decrease compile time for applications is to 
break the source code into  smaller pieces by changing ADMB FUNCTIONs 
into real C++ functions. It is generally considered good practice for 
maintaining large software projects. It is not difficult to do, but does 
require extra work and and climbing a bit of a learning curve for the 
"make". A simple Makefile for ADMB projects hidden on the ADMB website 
http://www.admb-project.org/developers/admb-developers-workshops/admb-developers-workshop-march-13-16-2012/simple-makefile-for-admb.

John

John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa
Honolulu HI (GMT-10)
808-294-3842

Visit the ADMB project http://admb-project.org/

On 03/25/2013 01:56 AM, Larry Jacobson (NOAA Federal) wrote:
> My original question concerned speeding up ADMB builds using the 
> MingGW and Microsoft 2010 Express compilers with ADMB V11.0 on a 32 
> bit Windows computer.
>
> Rick Methot, Jim Ianelli, Alen Hicks, Johnoel Ancheta and Dave 
> Fournier responded.  All suggested reducing the level of optimization 
> with the cpp program gets compiled.  This is done in the adcomp.bat file.
>
> Turning off optimization works wonders for compile time and has modest 
> effects on run time. Build time with the Microsoft compiler dropped 
> from 8.25 minutes to 0.13 minutes (not a typo!) and the run time 
> increased by only 0.17 minutes.  Build time with the MinGW compiler 
> dropped from 1.75 minutes to 1 minute and the run time decreased by 
> about 0.25 minutes (surprising but the MinGW web site said this can 
> happen and my results varied a bit from trial to trial). Some results 
> are summarized in a bitmap table below.
>
> I wouldn't say that there was a clear winner between Microsoft and 
> MinGW.  It depends on the optimization level and whether you are 
> interested in time to build or time to run.  Both are free...
>
> Rick Methot got the same results building the Stock Synthesis model 
> using the Microsoft compiler. Getting rid of the optimization 
> shortened the build time a lot but had little effect on run times.
>
> Johnoel Ancheta indicated that the ADMBTeam is currently working on 
> this issue also.
>
> Dave Fournier recommended getting a new computer or running in Linux. 
> I use the Linux option pretty routinely for ADMB models (for speed) 
> but didn't test it here.  I have noticed that the compile times on 
> Linux are longish too and I bet they get much shorter when the 
> optimization level is reduced.  I agree with him about the new 
> computer but with sequestration etc. on the horizon it is not going to 
> happen.
>
> Alan Hicks recommended (several times) using reduced optimization for 
> debugging/programming and full optimization for releases. Sounds like 
> a good idea to me. Some care seems advisable because turning off the 
> optimization may have unintended side effects.  I shouldn't have any 
> effect on error checking during the compilation step but what do I know?
>
>
> Thanks everyone and cheers!
>
>
>




More information about the Users mailing list