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

access violation, moving

wen
Beginner
555 Views

I ran a program and got the error message of

forrtl: severe (157): Program Exception - access violation

By running the Debug configuration, I can see the statement on which the error occurred. When I add or delete a couple of write statements, that location of violation moved to an earlier or later statement.

It seems that this kind of error occurred to me before when the stack size is a little short. For the current application, I know I need a stack size of less than 10,000,000 before. This time, I kept on increasing the stack to 50,000,000 and I still got the error of access violation.

Please help.

Wen

0 Kudos
1 Reply
Wendy_Doerner__Intel
Valued Contributor I
555 Views
An access violation happens when you try to access memory that is not allocated to your program. So this indeed can happen when you overun your stack, but it can also happen if you have a coding error in your program. You might try adding the /check switch to your command line options to add some runtime checking to your application that might give you heads on the cause. If you feel it might be a stack issue you can address it by increasing stack size or reducing the compilers use of the stack. This article outlines the details.

If these are not solutions you may need to try to debug your application to determine the cause of the error.

------

Wendy

Attaching or including files in a post

0 Kudos
Reply