forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

array dimensions

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Mon Nov 29, 2004 12:09 pm    Post subject: array dimensions Reply with quote

I'm in the process of converting over some Fortran 77 code, with a minimum of changes. I have a number of arrays that are larger than 3 dimensions, and FTN95 seems to be coughing them up with StackOverflowExceptions. Is there a limit on array dimensions, and if so, what is it?

Sheila Silva
Back to top
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Mon Nov 29, 2004 5:15 pm    Post subject: array dimensions Reply with quote

Do you mean compile time exceptions? If so that is almost certainly a and you should submit it to ftn95@silverfrost.com (preferably with an example that fails)

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Anonymous
Guest





PostPosted: Tue Nov 30, 2004 3:58 am    Post subject: array dimensions Reply with quote

No, it's a runtime exception - I spent a couple hours yesterday messing with it, and it seems to definitely be a stack size issue (specifically, a lack thereof). We've got a number of multidimensional arrays defined as local variables within a subroutine - they're fairly large, although I wouldn't say exceptional (i.e. subpr1(5,50,20,6), subpr2(5,50,20,6), subpr3(5,50,20,6), subsic(5,1000,5,7)), all real*4. I'm actually OK at the declaration stage, which is probably why it compiles. However, the runtime halts at the do-continue loops that initialize these arrays. If I make one of the arrays smaller (for example, subsic(5,700,5,7) instead of subsic(5,1000,5,7), that array's do-continue loop runs fine, but then the initialization loops for the others fail with stack exceptions anyway.

I've tried splitting the arrays up - no dice. I've tried increasing the stack size to crazy large numbers in the linker - no dice. Here's the architecture, if it helps - I have a VB front end, which calls a VB dll, which calls this Fortran.NET dll. Everything's on the .NET platform. Is there some other place I can increase the stack size, or am I doing something else wrong?

Sheila Silva
Back to top
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Fri Dec 03, 2004 5:30 am    Post subject: array dimensions Reply with quote


As the code is running as a DLL from VB.net then it is VB.net that determines the stack size (the dll is effectively a slave). Is there any way you can declare the arrays as non stack?

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Anonymous
Guest





PostPosted: Fri Dec 03, 2004 5:45 am    Post subject: array dimensions Reply with quote

I realized the same thing a couple days ago - and found some posts on some other websites that pointed me to the solution. I declare the arrays as assumed size (essentially non-stack?) in the VB.net front end, and pass them in as parameters. It works great now - thanks for the help.

Sheila Silva
Back to top
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Fri Dec 03, 2004 6:30 am    Post subject: array dimensions Reply with quote

Excellent :)

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Anonymous
Guest





PostPosted: Mon Dec 06, 2004 2:19 pm    Post subject: array dimensions Reply with quote

I'm almost there - some of the arrays used are character arrays, which the compiler is telling me I can't pass in from VB.NET. How do I get around the stackexception issue for these?

Sheila Silva
Back to top
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group