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

12,789

Two educated guesses

  1. The program has tried to read from or write to an array element which doesn't exist, such as the 26th element of a 25-element array.
  2. There is a mismatch between the dummy arguments specified for a procedure and the actual arguments in a call to the procedure; for example passing a 4-byte real value when an 8-byte value is expected (or vice-versa)

Either of these might lead to an attempt to access a memory location to which the program's process has no rights of access. There are many other possible causes, but in my experience these are the most common errors in Fortran programs which give rise to such error messages.

Both of these are easy to spot, you need to (re-)compile your program with compiler options set to check for these conditions

Share:
12,789

Related videos on Youtube

amhemad ahmad
Author by

amhemad ahmad

Updated on September 15, 2022

Comments

  • amhemad ahmad
    amhemad ahmad over 1 year

    I am using "thrgibbs1f90b" one of BLUPF90 Family of Programs which is based on "fortran" and used for gibbs sampling to estimate the variance component for binary data. In each time I try to run thrgibbs1f90b I get the following error message:

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

    Image               PC                Routine            Line        Source
    
    thrgibbs1f90b.exe    0000000140021961    Unknown    Unknown    Unknown
    thrgibbs1f90b.exe    000000014000BB5B    Unknown    Unknown    Unknown
    thrgibbs1f90b.exe    000000014026B41C    Unknown    Unknown    Unknown
    thrgibbs1f90b.exe    000000014024F4E3    Unknown    Unknown    Unknown
    kernel32.dll         0000000076E2652D    Unknown    Unknown    Unknown
    ntdll.dll            0000000076F5C521    Unknown    Unknown    Unknown
    

    Any idea why I have this message?

    Thanks!