Setting up parallel processing
Posted: Sat Apr 30, 2016 12:34 pm
Dear all
I'm trying to set up parallel processing running on my local quad core machine. I've tried to follow the steps on the dynare wiki and the reference documentation but I'm not sure I follow exatly what I need to do in order to make the MH-algorithm run in parallel mode. I should mention that I don't have any experience with multi-core processing previously so any help is appreciated. I'm currently using Matlab R2014a, dynare 4.4.3 and Windows 10. I've attached the config file. I should maybe mention that the .mod file runs without issues if I don't invoke the parallel commands.
What I've done so far is:
First of all I'm wondering if I'm missing some important step in the configuration procedure and also what could be causing this error. I also wasn't sure whether to include the options as well as the path to the config file or just one or the other, so I tested both and get the same error. The options I used in the mod file are the following:
The error I get once reaching the MH-stage is:
I'm trying to set up parallel processing running on my local quad core machine. I've tried to follow the steps on the dynare wiki and the reference documentation but I'm not sure I follow exatly what I need to do in order to make the MH-algorithm run in parallel mode. I should mention that I don't have any experience with multi-core processing previously so any help is appreciated. I'm currently using Matlab R2014a, dynare 4.4.3 and Windows 10. I've attached the config file. I should maybe mention that the .mod file runs without issues if I don't invoke the parallel commands.
What I've done so far is:
- 1. Downloaded PSTools and added it to the windows path
- 2. Ran all the executables in PSTools and accepted the license agreement
- 3. Created a config file based on the examples in the documentation
- 4. Added the default command line options in the .mod file
- 5. Get error once the program reaches the MH-stage
First of all I'm wondering if I'm missing some important step in the configuration procedure and also what could be causing this error. I also wasn't sure whether to include the options as well as the path to the config file or just one or the other, so I tested both and get the same error. The options I used in the mod file are the following:
- Code: Select all
conffile='C:\Users\BOB\Downloads\config.txt';
options_.parallel = struct('Local', 1, 'PcName','', 'NumCPU', [0:3], 'user','','passwd','', 'RemoteDrive', '', 'RemoteFolder','', 'MatlabOctavePath', '', 'DynarePath', '');
The error I get once reaching the MH-stage is:
- Code: Select all
Reference to non-existent field 'CPUnbr'.
Error in distributeJobs (line 52)
nCPU(j)=length(Parallel(j).CPUnbr);
Error in masterParallel (line 177)
[nCPU, totCPU, nBlockPerCPU, totSlaves] = distributeJobs(Parallel, fBlock, nBlock);
Error in random_walk_metropolis_hastings (line 138)
[fout, nBlockPerCPU, totCPU] = masterParallel(options_.parallel, fblck,
nblck,NamFileInput,'random_walk_metropolis_hastings_core', localVars, globalVars,
options_.parallel_info);
Error in dynare_estimation_1 (line 782)
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in testy (line 401)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;