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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

F95 Unexpected Allocate Error

Status
Not open for further replies.

toog

Structural
Joined
Mar 12, 2002
Messages
12
Location
NZ
I'm using Lahey F95 v5.6. I have an allocate statement:

ALLOCATE (xyzo (nface, 4, 3, 2))

which has never given a problem except when the value of nface is 43656. When it is this value, the program terminates. Changing the final dimension from 2 to 3 fixes the problem, a clumsy fix.

Anyone else had problems like this? Anything magic about this number?
 
You need to post more of your code. There's not enough information here to make a guess. You are probably mangling memory somehow though. Thus... the problem "appears" to be caused by the size you try to allocate. However... the real problem is probably elsewhere.

Also... make sure you have the "debug" switch set when you compile the code. You're much more likely to get a meaningful error message back when things go South.

Dan :-)
 
Thanks for the response, DanTex.

I don't want to spend time on a very infrequent occurrence. I just recalled the memory models on old compilers required that words started on a segment boundary and wondered whether something similar, but undocumented, occurred with F95. The fact it allocates okay with either a larger or smaller value suggested that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top