- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Not enough memory error
Not enough memory error
Not enough memory error
Hi All,
I've been trying to do a very simple model of a transmission line, see below.
Code:
model circuit
Modelica.Electrical.Analog.Sources.SineVoltage V (V = 15, freqHz = 795.8);
Modelica.Electrical.Analog.Lines.OLine
T (length = 100.0, r = 4, l = 3e-3, g = 1e-6, c = 0.015e-6, N = 4);
Modelica.Electrical.Analog.Basic.Ground ground;
equation
connect (ground.p, V.n);
connect (V.p, T.p1);
connect (T.p3, ground.p);
end circuit;
When I increase N to a number greater than 13, omc (1.8.0, r10397) fails and gives the following error:
returning NULL (not enough memory) from rml_major_collection!
returning NULL (not enough memory) from rml_older_alloc!
rml_prim_gcalloc failed to get 805306368 words
returning NULL (not enough memory) from rml_prim_gcalloc!
Segmentation fault
It also gobbles up all 16GB of memory before crashing. Has anyone seen a similar error before?
Re: Not enough memory error
Hi aido,
Thank you for reporting this, it turned out to be a small mistake in the compiler that caused it to allocate huge amounts of memory in some cases. I have fixed this in revision 10424.
- perost
- 114 Posts
Re: Not enough memory error
Hi perost,
I've tried it on r10484 this morning and it's working now. Thanks for fixing it so quickly!
I've noticed that omc doesn't scale well on this model and others. Here are the times taken to run the above model with different values of N:
N Time (s)
16 6
32 11
64 37
128 302
256 4079
Do you know how to improve omc performance on large problems?
Re: Not enough memory error
Hi,
Improving performance is always tricky as we have a lot of legacy code in the compiler.
Of course one of our goals is to improve performance, but it will take a while as the
priority now is on fully supporting Modelica Standard LIbrary (MSL) 3.1.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Not enough memory error