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

forrtl : severe (157)

Mahdi_S_1
Einsteiger
940Aufrufe

Hi,

I receive the following error and my code does not run at all when I increase the number of calculation steps

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

This is while it runs OK when the calculation steps are less. Does anybody know what is it referring to and how can I solve it?!

0 Kudos
5 Antworten
anthonyrichards
Neuer Beitragender III
940Aufrufe
One possibility is that as the number of steps have increased, you have reached and then gone beyond the limits of an array somewhere in your code. The compiler code as detected the fact that you have addressed a location outside of the memory storage alotted to your program+data. You need to run your program in debug mode so that the debugger can stop the program and show you where the problem is in your code.
Mahdi_S_1
Einsteiger
940Aufrufe

Thanks for your useful advice.

I did as you told and run it in the debug mode. It is in one of the intrinsic functions that the code stops. It is where I wanna find the location, i.e. index, of the minimum value of a 1D array of length 5000; for example "real*8 a(5000)".I use "minloc(a)" and there it stops and prompts that error I wrote before (while it works when the array length is 4000).

Do you know any solutions to it?

anthonyrichards
Neuer Beitragender III
940Aufrufe
If you want to take this further, you are going to have to post enough of your code to show us where the problem might lie. That you get the error message when you are accessing an array element is highly suspicious of an indexing problem. In the debugger, at the program break, carefully examine any indexes you are using to access array elements. An index valuethat iszero or -vemay give you this problem, just as willan index value that goes beyond the bounds of the array.
Les_Neilson
Geschätzter Beitragender II
940Aufrufe

When you build the debug configuration you should turn on all diagnostics checks - both compile time and runtime. (It is also usually recommended that all of your routines have IMPLICIT NONE statement) This could give you information onpossible causes of the error : uninitialised variables, array bounds exceeded and so on. Argument mismatches (the types of the variables passed *to* a routine do not match the types of variablesexpected by that routine) will lead to a stack corruption and possible access violation also.

Les

Steven_L_Intel1
Mitarbeiter
940Aufrufe
See this article for information on the Access Violation error.
Antworten