﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6351	Severe memory management issue in Ubuntu	Francesco Casella	Martin Sjölund	"Please consider the attached test case, which handles a 116.000 equations model of a power grid. The model is large, but definitely not huge, and it should be handled by the current OMC.

When running the Test_N_6_M_4.mos script under Linux Ubuntu 18.04 LTS, the code generation process aborts with the following error message:
{{{
mmap(PROT_NONE) failed
Aborted (core dumped)
}}}

Note that the same model is run successfully under Windows 10.

By adding
{{{
setCommandLineOptions(""-d=exectstat,optdaedump"");getErrorString();
}}}
to the script before the {{{simulate()}}} command, I got some more intel about what goes wrong.

The log file reports
{{{
pre-optimization done.
...
Index reduction done.

########################################
created initial system
########################################
...
BackendDAEType: initialization

Known variables only depending on parameters and constants - globalKnownVars (75826)
...
########################################
partitioned initial system
########################################
...
BackendDAEType: initialization


Known variables only depending on parameters and constants - globalKnownVars (75826)
}}}
the crash happens at the end of the list of known variables. 

Unfortunately the buffer is not flushed when the crash takes place, so I can't see the last lines, but I guess the crash takes place during the {{{analyzeInitialSystem}}} phase.

Currently this issue prevents me to test models above 50.000 equations. This is too bad, considering that four years ago we tested systems with 750.000 equations and almost 1.000.000 initial equations.

Please investigate."	defect	reopened	critical		Backend	1.16.0			Adrian Pop Per Östlund Karim Adbdelhak Andreas Heuermann
