Differences between revisions 1 and 2
Revision 1 as of 2009-06-03 07:31:40
Size: 3777
Editor: MarcoRatto
Comment:
Revision 2 as of 2009-06-03 07:45:22
Size: 3777
Editor: MarcoRatto
Comment:
Deletions are marked like this. Additions are marked like this.
Line 35: Line 35:
 * PcName is the name of the computed in the windows network, i.e. the output of hostname, or the full IP adress  * PcName is the name of the computer in the windows network, i.e. the output of hostname, or the full IP adress

1. MATLAB Parallel computation utilities for Dynare.

Parallelized routines:

  • Random_walkMetropolis_hastings.m;
  • mcmcdiagnostics.m.

1.1. For windows we assume:

  1. a standard windows network;
  2. PsTools are in the path of the WIndows machine

  3. the user on the PC of the master thread has to be user of any other PC in the cluster.

1.2. For linux we assume:

  1. matlab is in the path of the machine, e.g. in the etc/environment file the matlab bin folder is in the PATH variable;
  2. ssh is properly installed and working;
  3. use ssh-keygen to allow remote machines to be connected to the master machine, for grid computation;
  4. for a grid of unix machines, sshfs also needs to be installed and working;

So far, mixed platform grids (linux and win) are not working: only homogeneous grids (unix or win) are tested.

2. Usage

A substructure of options_ named "parallel" defines the charactieristics of the grid:

2.0.1. Common syntax for win and unix, for local parallel runs (assuming quad-core)

All empty fields, except Local and NumCPU

options_.parallel = struct('Local', 1, 'PcName','', 'NumCPU', [1:3], 'user','','passwd','',
'RemoteDrive', '', 'RemoteFolder',''); 

2.0.2. Windows syntax for remote runs (Local=0)

  • win passwd has to be typed explicitly!
  • RemoteDrive has to be typed explicitly!

  • for user, ALSO the group has to be specified, like DEPT\JohnSmith, i.e. user JohnSmith in windows group DEPT

  • PcName is the name of the computer in the windows network, i.e. the output of hostname, or the full IP adress

options_.parallel = struct('Local', 0, 'PcName','RemotePCName','NumCPU', [4:6], 'user',
'DEPT\JohnSmith','passwd','****', 'RemoteDrive', 'C', 'RemoteFolder','dynare_calcs\Remote');

2.0.2.1. Example to use several remote PC's to build a grid on windows:

A vector of parallel structures has to be built:

options_.parallel = struct('Local', 0, 'PcName','RemotePCName1','NumCPU', [0:3], 
'user', 'DEPT\JohnSmith', 'passwd','****', 'RemoteDrive', 'C', 'RemoteFolder','dynare_calcs\Remote');

options_.parallel(2) = struct('Local', 0, 'PcName','RemotePCName2','NumCPU', [0:3], 
'user', 'DEPT\JohnSmith','passwd','****', 'RemoteDrive', 'D', 'RemoteFolder','dynare_calcs\Remote');

options_.parallel(3) = struct('Local', 0, 'PcName','RemotePCName3','NumCPU', [0:1], 
'user','DEPT\JohnSmith','passwd','****', 'RemoteDrive', 'C', 'RemoteFolder','dynare_calcs\Remote');

options_.parallel(4) = struct('Local', 0, 'PcName','RemotePCName4','NumCPU', [0:3], 
'user','DEPT\JohnSmith','passwd','****', 'RemoteDrive', 'C', 'RemoteFolder','dynare_calcs\Remote');

2.0.2.2. Example of combining local and remote runs (on win):

options_.parallel=struct('Local', 1, 'PcName','','NumCPU', [0:3],
 'user','','passwd','','RemoteDrive', '', 'RemoteFolder','');

options_.parallel(2)=struct('Local', 0, 'PcName','RemotePCName','NumCPU', [0:1], 
'user','DEPT\JohnSmith','passwd','****', 'RemoteDrive', 'C', 'RemoteFolder','dynare_calcs\Remote');

2.0.3. Unix syntax for remote runs (Local=0):

options_.parallel=struct('Local', 0, 'PcName','name.domain.org','NumCPU', [0:3], 
'user','JohnSmith','passwd','', 'RemoteDrive', '', 'RemoteFolder','/home/rattoma/Remote');

2.0.3.1. Example of combining local and remote runs (on unix):

options_.parallel=struct('Local', 1, 'PcName','','NumCPU', [0:3], 
'user','','passwd','','RemoteDrive', '', 'RemoteFolder','');

options_.parallel(2)=struct('Local', 0, 'PcName','name.domain.org','NumCPU', [0:3], 'user','JohnSmith','passwd','', 'RemoteDrive', '', 'RemoteFolder','/home/rattoma/Remote');

DynareWiki: ParallelDynare (last edited 2012-05-09 10:05:10 by HoutanBastani)