Opened 6 years ago

Last modified 6 years ago

#5082 new defect

internal compiler error: Segmentation fault

Reported by: anonymous Owned by: Lennart Ochel
Priority: high Milestone: Future
Component: Code Generation Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

I was trying to compile in gcc when I received the following message:

S730_02nls.c: In function 'S730_eqFunction_32331':
S730_02nls.c: 54238: 1: internal compiler error: Segmentation fault

}

libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
make: * [S730_02nls.o] Error 1

Can anyone help me solve this problem? My version of OMEdit is v1.13.0-dev-196-g9199a1a6 (64-bit) and mingw / gcc is up to date.

Change History (3)

comment:1 by Adrian Pop, 6 years ago

Can you send us the S730_* generated C code and all the other files (makefile, xml, json) that have the S730_ prefix?
You can send them (zipped) directly to us at OpenModelica @ ida.liu.se if they are not public.

If you cannot send them then is rather complicated to find out what the problem might be.
You could try to play with the GCC compiler flags and disable some optimization.
In OMEdit simulation setup

  • "C/C++ Compiler Flags (Optional):" add -g there or -O0
  • Number of Processors: set to 1 so that it has enough memory if the model is large

comment:2 by Adrian Pop, 6 years ago

Thanks for the model!

Indeed there is a gcc issue with the C code.
The file S730_02nls.c has 118 MB and gcc
just crashes on it after allocating 4GB+.

I tried to compile this on Linux using
clang and it works fine. With -O0 it takes
a bit more than a minute and it needs 3GB.
With gcc on Linux it needs at least 7GB to
compile the nls file and takes about 4 minutes
to compile.

I think we should split this file
when it gets too big same as we do
for S730_08bnd.c for example.

Also, it seems we need to support clang
on Windows as well to compile the C code
as it deals much better with huge files.

Until we find a solution for this, can you
run this model on a Linux machine with
enough memory using the clang or gcc
compiler?

comment:3 by Francesco Casella, 6 years ago

See also #3963 and #4851

Note: See TracTickets for help on using tickets.