Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compile Options for Array Overruns

pjfinn
Beginner
684 Views
I am currently using the enterprise edition 6.6 of VF and have run across a problem. When I run the code remotely on an SGI machine, I get a segmentation fault. Unfortunately, the enterprise toolkit doesn't allow for remote debugging on an SGI. When I compile the program locally on my PC it runs fine, so I think that the PC just doesn't crash on and array-overrun. I know that there is usually a compile time option to force a fatal error when an array is over-run, but I can't figure out how to do it in VF. Anyone done this??
0 Kudos
3 Replies
Steven_L_Intel1
Employee
684 Views
The option for array bounds checking is on by default in a Debug configuration in Developer Studio. If you are compiling from the command line, use /check:bounds. Please note that if you declare assumed-size arrays with bounds (*), these are not checked.

Another possible cause of such errors is argument type mismatches.

Steve
0 Kudos
pjfinn
Beginner
684 Views
Is there a way to cause a fatal error when a mismatch occurs?? I can't quite figure out why I get a fault on the SGI machine but not the PC..
0 Kudos
Steven_L_Intel1
Employee
684 Views
Well, if you compile all your sources together and use the option /warn:argument_checking, the compiler may be able to tell you at compile time. Segmentation faults (access violations) can be caused by many different things. Do you not have any clue as to where in the program the error occurs?

Steve
0 Kudos
Reply