Skip to main content
FluidEarth Portal Header version 3

FluidEarth Portal

Go Search
FluidEarth Portal > FluidEarth Discussions > Queue grow factor  

FluidEarth Discussions

Modify settings and columns
Discussions board for FluidEarth Users
Started: 19/04/2011 10:01
Picture Placeholder: MMansour
Queue grow factor
I am linking a wrapped C++ model to the csvWriter. The model is built as dll. I am calling the dll functions from the Comput function of the SDK. The models run successfully in pipistrelle and do several time steps but then pipistrelle fails and produce the following message
"Queue grow factor must be between 1 and 10"
"parameter name: growFactor"
I failed to spot the problem so can you help please?
Posted: 19/04/2011 10:33
Picture Placeholder: GGlasgow
Hi Majdi,
from your description, i would interpret your problem in the following way:
1. growFactor is a variable defined in your model, initialised to a value either within your omi file or a steering file read during model initialisation.
2. this variable can potentailly be adjusted every timestep that your model performs.
3. after a few timesteps the value of growFactor is going out of its permissable range (1 - 10).
if this is right, it suggests that while the initialisation has probably occured ok (because you are performing timesteps before getting the error) but that an illegal value for growFactor has been occured during the simulation.
without seeing your code, it's difficult to know where this might have happened, but two places to look would be:
1. the values of the variables used to calculate growFactor. possibly one of these has caused your model engine to blow-up - perhaps check that all the values passed into the model via steering file or omi file are correct and will run in a standalone simulation and that they are getting initialised correctly. to do this, worth checking the values at the end of initialisation?
2. the call being made to the dll (in compute) may not be quite right - how are you using the dll? are you shutting down the model engine at the end of every call and reinitialising it with the updated values? or are you keeping the engine running but returning without shutting down? depending on your approach, there are different things to look at.
hope this helps - if not, feel free to email me your model and i can take alook for you.
Posted: 19/04/2011 14:43
Picture Placeholder: MMansour

Thanks for the help. growFactor is not a variable in my model. After a bit fo googling it seems that this is something related to .NET and C#.
As for the way i include the DLL: I do several time steps without killing the model after each time step. So I initialise (and read from file), do several time steps and then End (produce output files).
The link to csvWriter works fine for several time step and then pipistrelle crashes.
I will try a bit more and if I do not succeed i will Email you my code.
Posted: 19/04/2011 15:16
Picture Placeholder: GGlasgow
sorry for the dead-end answer - you seem to be hitting a problem way outside my experience. Adrian is at a series of conferences in Europe for the rest of this week and part of next, but hopefully he will be able to take a look at your problem up when he returns. 
just out of interest, have you checked wether this problem exists when both your c# and cpp projects target .NET framework 2.0?