I am trying to run the basic OLG models from the IntroToOLG files without access to a GPU (I know that this is not recommended, but I have no other option at the moment). I hoped that this would work at longer running times, but I receive the error message pasted below. For context, the Life Cycle models worked with my set-up. I tried to make sense of this but could not - any help would be appreciated!
Index in position 3 exceeds array bounds. Index must not exceed 1.
Error in ValueFnIter_Case1_FHorz_noz_Par1_raw (line 95)
VKronNext_j=V(:,:,jj+1);
I am on holiday at the moment so cannot actually look at what the issue is, but based on the error message it is probably actually a mistake in “ValueFnIter_Case1_FHorz_noz_Par1_raw.m” (should probably just say …=V(:,j+1); ). I will fix it when I get back (not until mid-July I’m afraid). [Because I never really use the codes without GPU they are not always the cleanest.]
If you want to run some things without GPU it might be better to start from the Huggett (1996) example (which is an OLG model), just because this is specifically something that is known to work on cpu.
Side comment: the reason for requiring a GPU is not that these models cannot be solve without, just that the main algorithms used by VFI Toolkit are very much built around what GPUs are good at but which is a terrible approach for CPUs.