|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Mon Nov 29, 2004 12:09 pm Post subject: array dimensions |
|
|
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
|
Posted: Mon Nov 29, 2004 5:15 pm Post subject: array dimensions |
|
|
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 |
|
|
Anonymous Guest
|
Posted: Tue Nov 30, 2004 3:58 am Post subject: array dimensions |
|
|
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
|
Posted: Fri Dec 03, 2004 5:30 am Post subject: array dimensions |
|
|
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 |
|
|
Anonymous Guest
|
Posted: Fri Dec 03, 2004 5:45 am Post subject: array dimensions |
|
|
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
|
Posted: Fri Dec 03, 2004 6:30 am Post subject: array dimensions |
|
|
Excellent :)
------------
Administrator
Silverfrost Forums |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Mon Dec 06, 2004 2:19 pm Post subject: array dimensions |
|
|
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 |
|
|
|
|
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
|