- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
while compiling a program I am working on, I get the following error:
"...catastrophic error: **Internal compiler error: segmentation violation signal raised**..."
The code compiles with both gfortran 9 and 10. My issue is that I cannot locate the cause of the error.
I am compiling with the latest ifort compiler available through oneAPI for mac. But I have also tried with previous versions of the compiler, with the same result.
I have 'reduced' the code to a minimal (nonsensical) example that triggers the error message. This example also compiles with the gnu compilers.
Compiler flags: -warn all -stand f18 -i8
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Internal compiler error is ALWAYS a compiler bug, regardless of the validity of the source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to identify what triggers the bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no 'easy' way to find the cause. One strategy is to progressively add or remove the compiler options. The presence of some specific option is often a trigger "-warn all" covers a number of option BTW.
The other option is to pair back the code (which it seems you have worked on) to create a minimalist reproducer. This can be very time consuming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestion! Unfortunately, even without any of the compler flags, encounter the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then remove sections of code in a search pattern. Use !dir$ IF(.FALSE.) / !dir$ END IF to encapsulate code removed. e.g. the code part of the suspected procedure. When you locate the offending procedure, move the !dir$ IF(.FALSE.) down and/or !dir$ END IF up while marking the former location(s) with comment. Eventually you will narrow in on the problem section of code.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The specific line that triggers the error is:
call output%printf()
in classA.F90. The Intel compiler developers would have to figure out why. I did note that if I commented out that line, the program still failed to build with other "normal" errors, probably caused by the code reduction - I have not investigated those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page