


PARALLEL CONTEXT In parallel context, this function is launched on slave machines, and acts as a message passing device for the master machine.


0001 function fMessageStatus(prtfrc, njob, waitbarString, waitbarTitle, Parallel) 0002 % PARALLEL CONTEXT 0003 % In parallel context, this function is launched on slave 0004 % machines, and acts as a message passing device for the master machine. 0005 0006 % INPUTS 0007 % o prtfrc [double] fraction of iteration performed 0008 % o njob [int] index number of this CPU among all CPUs in the 0009 % cluster 0010 % o waitbarString [char] running message string to be displayed in the monitor window on master machine 0011 % o waitbarTitle [char] title to be displayed in the monitor window on master machine 0012 % o Parallel [struct] options_.parallel(ThisMatlab), i.e. the parallel settings for this slave machine in the cluster. 0013 % 0014 % OUTPUTS 0015 % o None 0016 0017 % Copyright (C) 2006-2011 Dynare Team 0018 % 0019 % This file is part of Dynare. 0020 % 0021 % Dynare is free software: you can redistribute it and/or modify 0022 % it under the terms of the GNU General Public License as published by 0023 % the Free Software Foundation, either version 3 of the License, or 0024 % (at your option) any later version. 0025 % 0026 % Dynare is distributed in the hope that it will be useful, 0027 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0028 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0029 % GNU General Public License for more details. 0030 % 0031 % You should have received a copy of the GNU General Public License 0032 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0033 0034 global funcName 0035 0036 if nargin<5, 0037 Parallel.Local=1; 0038 end 0039 0040 try 0041 save(['comp_status_',funcName,int2str(njob),'.mat'],'prtfrc','njob','waitbarString','waitbarTitle'); 0042 catch 0043 end 0044 0045 fslave = dir( ['slaveParallel_input',int2str(njob),'.mat']); 0046 fbreak = dir( ['slaveParallel_break.mat']); 0047 if isempty(fslave) || ~isempty(fbreak), 0048 error('Master asked to break the job'); 0049 end 0050