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

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

mariatmolina
Beginner
718 Views

I'm updating and old code. There is currently alimit of 970 in the size of the arrays it reads from and writes to and I want to change it to 1020. I thought it was straightforward thing to do (replace 970 by 1020), but when I do thatI get a message saying:

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

I guess I need to change something else, but I know very little about programming. Can anybody help, please?

0 Kudos
5 Replies
Les_Neilson
Valued Contributor II
718 Views

First thing to check is that _every_ 970 was changed to 1020
The usual causes of this kind of errorare :
a subscript out of range
a call to a subroutine has an argument mismatch
using a variable that has not been given an initial value

Les

0 Kudos
Les_Neilson
Valued Contributor II
718 Views

A thought for the future, you could use a PARAMETER to specify the model size

INTEGER MSIZE
PARAMETER MSIZE = 1020

and replace all 1020 with MSIZE

Then you would only need to change the parameter statement(s) to increase your model size

Les

0 Kudos
mariatmolina
Beginner
718 Views
Thanks for this. I have made sure that all 970 were replaced, and the code works prefectly fine with 970. How can I check the other posibles causes?
0 Kudos
Les_Neilson
Valued Contributor II
718 Views

Did you fix the CALL ATRATDAT error ?

If "yes" thenare you using Visual Studio to run your program (preferably in "debug" mode) ?

Les

0 Kudos
mariatmolina
Beginner
718 Views
I hadn't before, but I have done it now and it works. Thank you again.
0 Kudos
Reply