1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fortran debugging help: faulty pointers?

  1. Aug 3, 2011 #1
    Hi, I tried compiling my program in Fortran using the following commands:

    Code (Text):
    nagfor -g90 -C=all -C=undefined -g -gline -nan -u -mtrace=all test09b.f90 cell_functions.o -o test09b
     
    I ended up getting this error message:

    [Allocated item 15285 (size 17) = Z'FFFFFFFFB744A790']
    Runtime Error: cell_test.f90, line 75: Reference to undefined variable OPT%INDEX
    Program terminated by fatal error
    test09b.f90, line 79: Error occurred in TEST08
    [Deallocated item 2 (size 1025, at Z'FFFFFFFFB741B430')]
    [Deallocated item 3 (size 1025, at Z'FFFFFFFFB741B850')]
    [Deallocated item 15284 (size 1025, at Z'FFFFFFFFB744A370')]
    [Deallocated item 15285 (size 17, at Z'FFFFFFFFB744A790')]
    [Deallocated item 6 (size 65537, at Z'FFFFFFFFB741C320')]
    [Deallocated item 7 (size 21, at Z'FFFFFFFFB742C340')]
    [Deallocated item 1 (size 1025, at Z'FFFFFFFFB741B010')]
    Aborted

    I'm not sure exactly what this means. Is the error the bit which says "Runtime Error: cell_test.f90, line 75: Reference to undefined variable OPT%INDEX", or is it the bit below, which says "test09b.f90, line 79: Error occurred in TEST08
    [Deallocated item 2 (size 1025, at Z'FFFFFFFFB741B430')]...etc"?

    At the moment I think the problem is either a float overflow (which I don't really know how to spot, much less fix), or I've referenced a null pointer.

    I'm not really sure how to solve either problem, does anyone have any suggestions? Thanks!
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Aug 3, 2011 #2

    Mark44

    Staff: Mentor

    I would start by looking at the first error line, the one with OPT%INDEX. If you need some help, please show us your code.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fortran debugging help: faulty pointers?
  1. Help with fortran (Replies: 1)

  2. Fortran Help! (Replies: 4)

  3. Fortran help (Replies: 16)

Loading...