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 > 'Index was outside the bounds of the array' error  

FluidEarth Discussions: 'Index was outside the bounds of the array' error


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.

From: ZZhang
Posted: 01 June 2010 15:45
Subject: 'Index was outside the bounds of the array' error

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" .

From: GGlasgow
Posted: 28 May 2010 16:37
Subject: 'Index was outside the bounds of the array' error

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,

From: ZZhang
Posted: 28 May 2010 09:39
Subject: '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.
Content Type: Message
Created at 02/06/2010 14:13  by GGlasgow 
Last modified at 02/06/2010 14:13  by GGlasgow