Fortran debugging help: faulty pointers?

  • Comp Sci
  • Thread starter ASGtFT
  • Start date
  • #1
10
0
Hi, I tried compiling my program in Fortran using the following commands:

Code:
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!

Homework Statement





Homework Equations





The Attempt at a Solution

 

Answers and Replies

  • #2
35,017
6,767
Hi, I tried compiling my program in Fortran using the following commands:

Code:
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"?
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.
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!

Homework Statement





Homework Equations





The Attempt at a Solution

 

Related Threads on Fortran debugging help: faulty pointers?

  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
16
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
7
Views
900
Replies
2
Views
911
  • Last Post
Replies
6
Views
5K
  • Last Post
Replies
9
Views
2K
Top