- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using fortran and C++ to write my programs. I'm using C++ to allocate memory and fortran to do the work.
I compile my program without any error massages, but when I try to run the program stop whit this messages:
** Illegal Instruction **
End of diagnostics
Do you have any suggestion of what I need to look for to find the error?
The break point depends of level of optimization
I compile my program without any error massages, but when I try to run the program stop whit this messages:
** Illegal Instruction **
End of diagnostics
Do you have any suggestion of what I need to look for to find the error?
The break point depends of level of optimization
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What switches are you using for the compilation and what kind of processor are you running on? The most common cause of an "illegal instruction" error is using one of the architecture-specific code generation options (-QxW, for example), but running on a processor that doesn't support that instruction set.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Thanks a lot for your answer.
I'm running on a Pentium III CPU family 1133MHz with cache size : 512 KB, under Red Hat Linux 7.1.
In my makefile I use this options:
-tpp6 -xKW -ip -w -I/usr/include -Vaxlib -lm
with the option -O3 or -O0
Do you think that there are some problems with this options?
Regards
bulcao
Thanks a lot for your answer.
I'm running on a Pentium III CPU family 1133MHz with cache size : 512 KB, under Red Hat Linux 7.1.
In my makefile I use this options:
-tpp6 -xKW -ip -w -I/usr/include -Vaxlib -lm
with the option -O3 or -O0
Do you think that there are some problems with this options?
Regards
bulcao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace -xKW with -xK and see what happens. I'm still a bit fuzzy on how -x with multiple target codes works. I think -axKW would work and do auto-dispatch.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works!
The problem was that I used the option -xKW, when I follow your suggestion, i.e., replace -xKW with -xK or -axKW the program run correctly.
Thanks
I still have a gap when I compare the performance betwen GNU and Intel compiler
GNU compiler: real time 0m39.583s
Compile options: -fno-globals -Wno-globals -O3
Intel compiler: real time 0m47.497s
Compile options: -tpp6 -axKW -ip -w -Vaxlib -O3
At least works!
Now I can try optimize the source code for Intel compiler.
Thanks
The problem was that I used the option -xKW, when I follow your suggestion, i.e., replace -xKW with -xK or -axKW the program run correctly.
Thanks
I still have a gap when I compare the performance betwen GNU and Intel compiler
GNU compiler: real time 0m39.583s
Compile options: -fno-globals -Wno-globals -O3
Intel compiler: real time 0m47.497s
Compile options: -tpp6 -axKW -ip -w -Vaxlib -O3
At least works!
Now I can try optimize the source code for Intel compiler.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-xK will give you somewhat better performance than -axKW.
Explanation: -xKW basically told the compiler to assume Pentium 4 instructions (the K was ignored). -xK says assume Pentium III.
-axKW says to generate code that automatically detects the CPU type and dispatches to one of three different code sets, generic, Pentium III and Pentium 4. This may slow down a program somewhat.
Steve
Explanation: -xKW basically told the compiler to assume Pentium 4 instructions (the K was ignored). -xK says assume Pentium III.
-axKW says to generate code that automatically detects the CPU type and dispatches to one of three different code sets, generic, Pentium III and Pentium 4. This may slow down a program somewhat.
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page