Skip to main content
FluidEarth Portal Header version 3

FluidEarth Portal

Go Search
  
FluidEarth Portal > FluidEarth Discussions > 'Index was outside the bounds of the array' error  

FluidEarth Discussions

Modify settings and columns
Discussions board for FluidEarth Users
  
View: 
Post
Started: 28/05/2010 09:39
Attachment
Picture: ZZhang
ZZhang
'Index was outside the bounds of the array' error
Hi, Gordon,
 
I have wrapped the DIVAST using the new SDK. However, I still got the same issue 'Index was outside the bounds of the array'.DIVAST_Hydro and DIVAST_Write can run successfully separately.

Attacheds are the Log file and wrapped DIVAST model.
So can you give some advice? Thanks.
Posted: 28/05/2010 15:27
Picture Placeholder: GGlasgow
GGlasgow
hi,
 
i don't have too much time this afternoon, but i'll have a look this weekend and let you know as soon as i find anything.
 
gordon
Posted: 28/05/2010 16:37
Attachment
Picture Placeholder: GGlasgow
GGlasgow
hi again,
 
had a quick look through your code and found one thing for you to look at - there's a reference to the old sdk in your two .xml files.
 
if you change this ref to the one for the new sdk (see the attached pdf or 'buildcollapse.xml' for an example of what this should be) and try again, it will tell us something. i changed only this and your composition ran fine on my machine. if you don't get the same result using the same model and code, i have another couple of suggestions we can try but they're a bit more involved. and if that doesn't work, we can ask Adrian Harper to help us figure out what's going on.
 
let me know how you get on,
 
gordon
Posted: 01/06/2010 15:45
Picture: ZZhang
ZZhang
Hi, Gordon,
 
I changed the .XML file and it can run successfully. However, it doesn't transfer data from DIVAST_Hydro to DIVAST_Write. You can check the file '\DIVAST_Write\bin\Data\Output.VEL'.
 
So, do I have to change other keys in .XML file? such as "Storage","Packing" .
Posted: 02/06/2010 14:13
Attachment
Picture Placeholder: GGlasgow
GGlasgow
hi,
 
sorry for the delay - that one took a little bit of thinking about.
 
i've had a closer look at your code and have changed a couple of things. the problem isn't in your xml (to answer your original question, the remaining entries like packing etc don't need to change) but it seems to be in your divast_writer solution.
 
the first thing i had to change was to force the fortran code to compile (see configuration_manager.jpg) - somehow, this has been turned off so this project wasn't getting rebuilt when i made any changes. to turn it back on by default, in the toolbar click build > configuration manager and make sure both projects are ticked.
 
the second thing is in your fortran_engine.f90 code - basically, get and set were being passed the wrong strings and never got any data that matched your specification. i've attached a revised version of this fortran file - replace your version with this one and it should then work. it is however well worth looking at the code around line 353 to see what i've changed - this is shown in fluidearth_engine.jpg.
 
to be honest, this is a problem with the earlier versions of the fortran wrapper code rather than something you have done yourself - i think i updated it, but you seem to still have the old version.
hopefully this will get you some data passed into divast_writer - but if not, just let me know.
 
gordon