Hi,
Recently I started using the Microsoft Visual C++ 2008 Express compiler to compile my model. Previously I was using Visual studio 6.0. The compile time has gone up from seconds to minutes. Has anyone else experienced this and does anyone have any tips on what might be causing it?
Thanks
Will
[Edited on 6-22-2010 by wsp]
[Edited on 6-22-2010 by wsp]
Slow Compiler
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
I noticed this as well.
I got around it by turning off the optimisation switch on the command line.
If you edit MDL.BAT and search for "CL " you will see two lines
CL /O2 /c /I "%2" /DWIN32 mdl.c
CL /O2 /c /DWIN32 mdl.c
I think I just removed the /O2. It compiled in seconds and was still pretty fast.
Tony.
I got around it by turning off the optimisation switch on the command line.
If you edit MDL.BAT and search for "CL " you will see two lines
CL /O2 /c /I "%2" /DWIN32 mdl.c
CL /O2 /c /DWIN32 mdl.c
I think I just removed the /O2. It compiled in seconds and was still pretty fast.
Tony.
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
It might be worth trying the 2010 version. I know Bob had to skip a couple of versions of visual studio because he couldn't get Vensim to compile properly.
Tom
Tom
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
If you go to Tools>Options>Advanced there is an entry called "Variable count for function breaks is."
The default value for this is 100 and normally works reasonably well with the newer Microsoft compilers which attempt more global code optimization. If you have models that contain complicated formulas, or many equations per variable, lowering this might help.
You might also just change the optimization option from /O2 to /O1 (and experiment with some of the other variations on that as there are quite a number in the newer MS compilers).
The default value for this is 100 and normally works reasonably well with the newer Microsoft compilers which attempt more global code optimization. If you have models that contain complicated formulas, or many equations per variable, lowering this might help.
You might also just change the optimization option from /O2 to /O1 (and experiment with some of the other variations on that as there are quite a number in the newer MS compilers).