Help - Search - Members - Calendar
Full Version: Problem with large models in Dymola
Modelica Forum > Modelica > Dymola
wagner
Hi everyone,

I've got a very large model with a lot of subcomponents. If I increase the number of subcomponents above a certain number dymola is unable to compile the model anymore. The simulation tab of the messages windows shows the following message:

QUELLTEXT
Compiling the model with GCC.
June 19, 2006 20:48:21
gcc -c -O1 -ffunction-sections -mpentium -march=pentium -ffast-math -DDYMOSIM dsmodel.c
C:\Programme\Dymola6.0\source\dsblock1.c: In function `equations_':
C:\Programme\Dymola6.0\source\dsblock1.c:285: warning: This file contains more `{'s than `}'s.
C:\Programme\Dymola6.0\source\dsblock2.c: In function `dsblock_':
C:\Programme\Dymola6.0\source\dsblock2.c:103: warning: This file contains more `{'s than `}'s.
C:\Programme\Dymola6.0\source\dsblock3.c:52: warning: This file contains more `{'s than `}'s.
C:\Programme\Dymola6.0\source\dsblock4.c: In function `declare_':
C:\Programme\Dymola6.0\source\dsblock4.c:114: warning: This file contains more `}'s than `{'s.
C:\Programme\Dymola6.0\source\dsblock5.c: At top level:
C:\Programme\Dymola6.0\source\dsblock5.c:532: warning: This file contains more `}'s than `{'s.
as: dsmodel.o: reloc overflow: 0x115a1 > 0xffff
dsmodel.o: File truncated
C:\DOKUME~1\Florian\LOKALE~1\Temp\ccqQbaaa.s: Assembler messages:
C:\DOKUME~1\Florian\LOKALE~1\Temp\ccqQbaaa.s:473557: FATAL: Can't close dsmodel.o
: File truncated
gcc -c -O1 -mpentium -march=pentium -ffast-math -DDYMOSIM dsmodelext*.c

Error generating Dymosim.

June 19, 2006 20:50:11


Has anyone ever had a similar problem?

Regards wagner
Carsten
As I see from your message, you use the GCC compiler. Try the MS Visusal C++ Compiler, which is freely available under http://msdn.microsoft.com/visualc/vctoolkit2003/ .

Especially if I had huge models, the Visual C++ compiler was much faster and including of external libraries was much easier.

Regards,
Carsten
jce
ZITAT(Carsten @ Jul 19 2006, 09:06 AM) *

Try the MS Visusal C++ Compiler, which is freely available under http://msdn.microsoft.com/visualc/vctoolkit2003/ .


Hi Carsten,

unfortunately, the Visual C++ Toolkit 2003 is not available anymore. Instead, you have to use the new Visual C++ 2005 Express Edition which is also freely available under http://msdn.microsoft.com/vstudio/express/visualC/ . Because this Edition is designed to build .NET executables you have to perform some additional steps to use it as a pure Win32 command line compiler in Dymola:
  1. Follow step 4 on the Express Edition installation web page to install the Windows Server 2003 R2 Platform SDK. (necessary for building Win32 executables)
  2. After installing the Platform SDK and successful testing in the VC++ IDE you have to add the Executable, Include and Library paths (given in step 3 of the Platform SDK installation guide) also to the file "vsvars32.bat" in the "\Common7\Tools" subfolder of your VC++.
  3. The default build script for VC++ in Dymola uses an obsolete compiler option which you have to replace in the file "build.bat" in the "bin" subfolder of your Dymola installation: In section ":compile" you have two lines (around line 60) starting with "cl". There you have to change the parameter /o"dymosim.exe" to /Fe"dymosim".
  4. Finally, choose the Visual C++ compiler in the simulation setup dialog and everything should work fine.
  5. OPTIONAL modifications in "build.bat": Remove the /Od parameter in the "cl" lines and all /O* parameters in the "set CL=..." line and replace it with /O2 to enable maximum speed optimisation. You can also add the parameter /arch:SSE2 in the "set CL=..." line to enable the use of SSE2 extensions if you own a P4 CPU.
Good luck,
Jonathan
footwork
QUOTE

[*]OPTIONAL modifications in "build.bat": Remove the /Od parameter in the "cl" lines and all /O* parameters in the "set CL=..." line and replace it with /O2 to enable maximum speed optimisation. You can also add the parameter /arch:SSE2 in the "set CL=..." line to enable the use of SSE2 extensions if you own a P4 CPU.


Hi,
I've just had a look at this as I've also been having problems with large models. With respect to the optimisation switches, redutcions in computation time on a P4 duo 3.2Ghz are
  1. 55% Using /O2
  2. 8% Using /O1
  3. 6% Using /O2 /arch:SSE2
  4. 9% Using /arch:SSE2

Not entirely surprised the SSE option doesn't improve things but didn't think it would be worse than just the optimisation switch!
On my own problem, I've been experimenting with different compilers recently,
  1. GCC
  2. MS Visual Studio 2003 standard
  3. Visual C++ express 2005

I have a large model ~= 140K equations which I can't get to build with any of these compilers, "Dymola experiences a critical error", except if I switch on the DDE extensions on MSVC 2003 standard. However as the recent posting shows, the MS optimisations are significant, run-times for this model are around 12hours with out optmisations and I 'd like to push the model complexity further. However, the 2003 standard compiler doesn't support any of the mentioned optimisations and the 2005 express doesn't support the DDE extensions. Has any one had similar experiences? Or know of any tricks to play with very large models.

Thanks.
jce
ZITAT(footwork @ Aug 11 2006, 11:45 AM) *

On my own problem, I've been experimenting with different compilers recently,
  1. GCC
  2. MS Visual Studio 2003 standard
  3. Visual C++ express 2005


What about the full version of MS Visual Studio 2005? I don't have this large models (up to now) but it seems to be the logical conclusion to use Visual Studio 2005 with DDE and the optimisations?

Best regards,
Jonathan

footwork
QUOTE(jce @ Aug 14 2006, 08:48 AM) *

What about the full version of MS Visual Studio 2005? I don't have this large models (up to now) but it seems to be the logical conclusion to use Visual Studio 2005 with DDE and the optimisations?

Best regards,
Jonathan

Logical but I don't want to spend the £500 per seat for MS VC 2005 pro if the benefits are marginal or.... if the problem is more fundamental and needs a solution in the Model or from Dynasim.

Also the DDE solution is much slower to execute so is the least desirable route forward.

Regards

Mark



This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.