Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Deallocating Arrays

Status
Not open for further replies.

Fozzeebear

Technical User
Oct 20, 2003
6
0
0
GB
I am having some strange problems with a piece of F90 coding I am currently working on.

I have a module using a number of allocatable arrays. The code runs to the point where the arrays are due to be deallocated, then fails with a SIGSEGV error during the de-allocation step.

I know the arrays are previously allocated correctly, since I am able to successfully print their contents immediately before the deallocate step.

If I temporarily comment out one de-allocate step, the code fails when it later tries to de-allocate a later array.

The de-allocations fails even if I put "STAT=junk" in the deallocate statements.

I thought one potential cause of this could be memory space being over-written. Don't know how to check for this though.

Any suggestions to the possible cause of the problem would be most welcome. I'm running out of ideas!!
 
Are you exceeding the size of the allocated array?

Try this: allocate 1 more than required and fill the end one with a known pattern eg -12345. Before deallocation, check if the pattern is still there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top