⇤ ← Revision 1 as of 2009-06-03 07:31:40
3777
Comment:
|
3777
|
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:
- a standard windows network;
PsTools are in the path of the WIndows machine
- 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:
- matlab is in the path of the machine, e.g. in the etc/environment file the matlab bin folder is in the PATH variable;
- ssh is properly installed and working;
- use ssh-keygen to allow remote machines to be connected to the master machine, for grid computation;
- 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):
no passwd and RemoteDrive needed!
PcName: full IP address or address
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');