Page 1 of 1

problems running model "Based on" history run

Posted: Mon Nov 15, 2021 10:29 am
by kleemax
I would like to run a (large) model using the "Based on" feature of vensim.
I have created a history run, that goes up to a specific year and specified that file under Sim set up "based on".
When I try to run it like that I get an error:
"Fatal error from Vensim Insufficient memory for block allocation to be made".
I am running in complied mode.
I have tried Vensim versions 8.2.1 and 9.0.0
Since this error is mentioning insufficient memory, I guess this is due to the size of the model somehow?

Re: problems running model "Based on" history run

Posted: Mon Nov 15, 2021 10:33 am
by Administrator
Can you upload the model?

Re: problems running model "Based on" history run

Posted: Mon Nov 15, 2021 12:26 pm
by kleemax
No, unfortunately I can't, because the company I work for is seeing this as intellectual capital... Is there anything we can do in terms of trouble-shooting without the model? It is in .mdl format by the way, which I had forgotten to mention.

Re: problems running model "Based on" history run

Posted: Mon Nov 15, 2021 12:30 pm
by Administrator
I'd need the model to run it through the debugger to see why it's not running.

If you can reproduce the problem in a smaller model, could you upload that (or email it to us)?

Re: problems running model "Based on" history run

Posted: Mon Nov 15, 2021 3:22 pm
by tomfid
I assume you tried a 64-bit version?

In that case, there's probably an undiscovered size limitation bug, because it's pretty hard to actually fill 64 bit memory.

Re: problems running model "Based on" history run

Posted: Tue Nov 23, 2021 9:17 am
by kleemax
I have created a very simple model for test purposes (attached). I am not getting the error described above any more, but it seems it works only in uncomplied model (setting "interpret"), but not in compiled mode. Is it generally the case that the based-on feature does not work in compiled mode?

Re: problems running model "Based on" history run

Posted: Tue Nov 23, 2021 3:26 pm
by Administrator
What format are you saving your model in (VMFX or MDL)?

If MDL, try changing to VMFX. MDL files are parsed each time they are loaded which marks them as "changed". This causes the model match with the existing VDFX to fail. With a binary format model (VMFX), it should work.

Re: problems running model "Based on" history run

Posted: Thu Nov 25, 2021 8:02 am
by kleemax
Yes I am running the 64bit version. Would an undiscovered size limitation bug mean I'd have to wait for an update to get this fixed?
Please also note that there seem to be problems with using based-on in compiled mode.
tomfid wrote: Mon Nov 15, 2021 3:22 pm I assume you tried a 64-bit version?

In that case, there's probably an undiscovered size limitation bug, because it's pretty hard to actually fill 64 bit memory.

Re: problems running model "Based on" history run

Posted: Tue Nov 30, 2021 8:33 pm
by tomfid
kleemax wrote: Thu Nov 25, 2021 8:02 am Would an undiscovered size limitation bug mean I'd have to wait for an update to get this fixed?
It would, but I think the vmfx vs. mdl issue is by far the best candidate here. Try that first.

Re: problems running model "Based on" history run

Posted: Mon Dec 13, 2021 10:35 am
by kleemax
I have tried to save the model as vmfx and then created a history run, and then tried to run a scenario of the future using based-on. Error: "Insufficient membory for block allocation to be made". Sometimes Vensim even crashed (Vensim 9.0.0 only, but not always).

Re: problems running model "Based on" history run

Posted: Mon Dec 13, 2021 10:39 am
by Administrator
We would need the model here to test with to see what the problem is.

Re: problems running model "Based on" history run

Posted: Mon Dec 13, 2021 7:01 pm
by tomfid
It might be worth updating to the latest 9.1.1 first - lots of improvements and bug fixes from 9.0, though I'm not aware of anything specifically relevant to simulation or compile-time memory.

Re: problems running model "Based on" history run

Posted: Mon Dec 20, 2021 6:08 am
by kleemax
The issue remains under 9.1.1, plus I found a bug in 9.1.1 in the Table tool, will report that in a separate thread though.

Re: problems running model "Based on" history run

Posted: Mon Dec 20, 2021 7:07 pm
by tomfid
I assume this is now with the base model in vmfx format?

This will be pretty tough to debug without a copy of the model - we're basically guessing.

Does the model contain some of the more exotic DELAY or QUEUE functions? Those don't work with BASED. There's normally a run-time check, but if that's missed for one instance, it could cause a crash.

What's the total size, as reported by Model>Settings>Model Information?