Thank you!
Models 31, 32, 33, and 35 now work smoothly for me, and I will start studying them now. However, the errors for Model 34 and CGM2005 still persist.
Model 34
From what I have read, there seems to be a memory issue on my device.
Test ValueFnIter
Error using .*
Out of memory on device. To view more detail about available memory on the GPU, use ‘gpuDevice()’. If the problem persists, reset the
GPU by calling ‘gpuDevice(1)’.
Error in ValueFnIter_FHorz_RiskyAsset_EpsteinZin_noa1_raw (line 95)
becareful=logical(isfinite(ReturnMatrix).*(ReturnMatrix~=0)); % finite and not zero
Error in ValueFnIter_Case1_FHorz_EpsteinZin_RiskyAsset (line 165)
[VKron, PolicyKron]=ValueFnIter_FHorz_RiskyAsset_EpsteinZin_noa1_raw(n_d,n_a2,n_z,n_u, N_j, d_grid, a2_grid, z_gridvals_J, u_grid, pi_z_J, pi_u, ReturnFn, aprimeFn, Parameters, DiscountFactorParamNames, ReturnFnParamNames, aprimeFnParamNames, vfoptions, sj, warmglow, ezc1,ezc2,ezc3,ezc4,ezc5,ezc6,ezc7,ezc8);
Error in ValueFnIter_Case1_FHorz_RiskyAsset (line 54)
[V, Policy]=ValueFnIter_Case1_FHorz_EpsteinZin_RiskyAsset(n_d,n_a1,n_a2,n_z,n_u,N_j,d_grid,a1_grid, a2_grid, z_gridvals_J, u_grid, pi_z_J, pi_u, aprimeFn, ReturnFn, Parameters, DiscountFactorParamNames, ReturnFnParamNames, aprimeFnParamNames, vfoptions);
Error in ValueFnIter_Case1_FHorz (line 572)
[V,Policy]=ValueFnIter_Case1_FHorz_RiskyAsset(n_d,n_a1,n_a2,n_z,vfoptions.n_u, N_j, d_grid, a1_grid, a2_grid, z_gridvals_J, vfoptions.u_grid, pi_z_J, vfoptions.pi_u, ReturnFn, vfoptions.aprimeFn, Parameters, DiscountFactorParamNames, ReturnFnParamNames, vfoptions);
Error in LifeCycleModel34 (line 140)
[V, Policy]=ValueFnIter_Case1_FHorz(n_d,n_a,n_z,N_j,d_grid, a_grid, z_grid, pi_z, ReturnFn, Params, DiscountFactorParamNames, , vfoptions);
I am using an AWS g4dn.xlarge instance with the following specifications:
I do not know where is the problem. Should I use stronger instance?
Model CGM2005
It runs for a few minutes, and then I receive the following message:
CoccoGomesMaenhout2005
Warning: Colon operands must be real scalars. This warning will become an error in a future release.
In CoccoGomesMaenhout2005 (line 100)
Warning: Colon operands must be real scalars. This warning will become an error in a future release.
In CoccoGomesMaenhout2005 (line 103)
Warning: Colon operands must be real scalars. This warning will become an error in a future release.
In CoccoGomesMaenhout2005 (line 106)
discretizeLifeCycleAR1_Kirkby: 1 moment in 0.00 cases, 2 moments in 0.13 cases, 3 moments in 0.03 cases, 4 moments in 0.84 cases (target was 4 moments)
discretizeLifeCycleAR1_Kirkby: 1 moment in 0.00 cases, 2 moments in 0.12 cases, 3 moments in 0.03 cases, 4 moments in 0.85 cases (target was 4 moments)
discretizeLifeCycleAR1_Kirkby: 1 moment in 0.00 cases, 2 moments in 0.12 cases, 3 moments in 0.03 cases, 4 moments in 0.85 cases (target was 4 moments)
Permanent type: 1 of 3
Error using ValueFnIter_Case1_FHorz (line 165)
No longer use vfoptions.e_grid_J, instead just put the age-dependent grid in vfoptions.e_grid (functionality of VFI Toolkit has
changed to make it easier to use)
Error in ValueFnIter_Case1_FHorz_PType (line 145)
[V_ii, Policy_ii]=ValueFnIter_Case1_FHorz(n_d_temp,n_a_temp,n_z_temp,N_j_temp,d_grid_temp, a_grid_temp, z_grid_temp, pi_z_temp, ReturnFn_temp, Parameters_temp, DiscountFactorParamNames_temp, , vfoptions_temp);
Error in CoccoGomesMaenhout2005 (line 292)
[V, Policy]=ValueFnIter_Case1_FHorz_PType(n_d,n_a,n_z,N_j,Names_i, d_grid, a_grid, z_grid, pi_z, ReturnFn, Params, DiscountFactorParamNames,vfoptions);