[ADMB Users] ADMB V11.0 build (compile/link) time using MinGW or Visual C++ 2010 Express in Windows 7 (32 bit) - very slow - suggestions to speed it up??
Allan Hicks - NOAA Federal
allan.hicks at noaa.gov
Thu Mar 21 10:21:11 PDT 2013
Hi Larry,
We also have this issue when compiling SS with Visual C++, except that it
can take up to 20 minutes. The reason is that the compiler is trying to
optimize the executable (the /Ox flag in the compile command). Even in
safe-mode, the compiler is optimizing the tpl code (the /Ox command is
there for safe-mode and optimized-mode). A side-note, optimized mode in
ADMB only refers to the optimized libraries, not optimization of the code
written by a user.
To speed up development, I made my own batch file (based on Rick Methot's
idea) to compile SS without the /Ox flag. Here are the lines I use in
Visaul C++ 64-bit:
~~~~~~~~~~~~~~~~~~~
set Include=C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\INCLUDE;%Include%
set LIBPATH_MSSDK=/libpath:"%MSSDK%"\lib
SET PATH=C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64;%PATH%
SET LIB=C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\LIB\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;%LIB%
tpl2cpp ss3
cl -c /EHsc -DUSE_LAPLACE -DWIN32 -DOPT_LIB -D__MSVC32__=8 -I.
-I"%ADMB64_HOME%"\include -I"%MSSDK%"\include ss3.cpp
cl ss3.obj df1b2o.lib admod32.lib ado32.lib adt32.lib /link
/libpath:"%ADMB64_HOME%"\lib /libpath:"%MSSDK%"\lib\x64
~~~~~~~~~~~~~~~~~~~~~
These commands are drawn from the adcomp.bat and adlink.bat batch files,
and the /Ox command removed from the first call to cl (which is found in
the adcomp.bat file). Alternatively, you could make a modified version of
the adcomp.bat file, removing the /Ox command, and call that when needed
and then call the adlink.bat file. We often use the safe-mode libraries
during development (highly recommended), although the commands above use
the optimized ADMB libraries.
We only use this during development, because the 20 minutes spent on
optimizing the code speeds up the executable. So, when we are releasing a
version of SS, we make sure to fully optimize the code. As a side note,
this may be why Borland compiled executables would run slower than Visual
C++ compiled executables. Maybe the optimization in Visual C++ was better,
but I am just guessing.
Please let me know if I can help set up some alternate batch files or
commands for you to call. But, I do recommend using the batch files that
come with ADMB (both safe and optimized) for any final releases.
I hope this helps,
Allan
On Thu, Mar 21, 2013 at 9:46 AM, Larry Jacobson (NOAA Federal) <
larry.jacobson at noaa.gov> wrote:
> Cheers!
>
> Does anyone how to reduce build time using the free MinGW or free Visual
> C++ 2010 Express compilerswith ADMB 11.0 and Windows 7?
>
> A large program that used to compile with the free Borland 5.5 compiler in
> about 30 seconds takes two minutes with MinGW and seven minutes with
> Visual C++ 2010 Express.
>
> I am using a 32 bit machine with a dual core 3.3 GHZ processor and 4 GB of
> RAM. I have virus software (McAffe) running in the background (can't
> escape due to lab policies but probably could exclude one or more
> directories).
>
> Task manager says that both compilers (cc1plus.exe or cl.exe) are using an
> entire processor so I don't think competition with other processes is the
> issue.
>
> Thanks and cheers!
>
> --
> **********************
> Larry Jacobson
> National Marine Fisheries Service
> Northeast Fisheries Science Center
> 166 Water Street
> Woods Hole, MA 02543-1026
> Voice: 508-495-2317
> Fax: 508-495-2393
> E-mail: larry.jacobson at noaa.gov
> **********************
>
> ______________________________**_________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/**mailman/listinfo/users<http://lists.admb-project.org/mailman/listinfo/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20130321/219a0f68/attachment.html>
More information about the Users
mailing list