Skip to content
Snippets Groups Projects
Commit 0ad3f11c authored by Marco Ratto's avatar Marco Ratto
Browse files

Extensions for testing under octave

(cherry picked from commit f3a40a81)
parent e9cf8211
No related branches found
No related tags found
No related merge requests found
......@@ -99,8 +99,8 @@ dynareParallelMkDir(RemoteTmpFolder,DataInput);
ErrorCode=0;
% Determine the operating system or software version when necessary
% for different command types
Environment=~ispc; %isunix || (~matlab_ver_less_than('7.4') && ismac);
% for different command types.
Environment=~ispc;
for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
......@@ -368,12 +368,13 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
s52=' fclose(fT);\n';
send='exit';
StrCommand=([s1,s2,s3,s4,s41,s42,s5,s51,s52,send]);
% Mettere controllo su NbW ...
if exist('OCTAVE_VERSION')
NbW = printf(fid,StrCommand, '%s');
else
% if exist('OCTAVE_VERSION')
% NbW = fprintf(fid,StrCommand, '%s');
% else
NbW = fprintf(fid,StrCommand, '%s');
end
% end
fclose(fid);
dynareParallelSendFiles('Tracing.m', RemoteTmpFolder,DataInput(Node));
......@@ -401,12 +402,18 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
% the path is MatlabOctavePath.
if Environment
% Controllare ... in Linux!
if exist('OCTAVE_VERSION')
system(['ssh ',DataInput(Node).UserName,'@',DataInput(Node).ComputerName,' "cd ',DataInput(Node).RemoteDirectory,'/',RemoteTmpFolder, '; ', DataInput(Node).MatlabOctavePath, ' Tracing.m;" &']);
else
system(['ssh ',DataInput(Node).UserName,'@',DataInput(Node).ComputerName,' "cd ',DataInput(Node).RemoteDirectory,'/',RemoteTmpFolder, '; ', DataInput(Node).MatlabOctavePath, ' -nosplash -nodesktop -minimize -r Tracing;" &']);
end
else
if exist('OCTAVE_VERSION')
[NonServeS NenServeD]=system(['start /B psexec \\',DataInput(Node).ComputerName,' -e -u ',DataInput(Node).UserName,' -p ',DataInput(Node).Password,' -W ',DataInput(Node).RemoteDrive,':\',DataInput(Node).RemoteDirectory,'\',RemoteTmpFolder ' -low ',DataInput(Node).MatlabOctavePath,' Tracing.m']);
else
[NonServeS NenServeD]=system(['start /B psexec \\',DataInput(Node).ComputerName,' -e -u ',DataInput(Node).UserName,' -p ',DataInput(Node).Password,' -W ',DataInput(Node).RemoteDrive,':\',DataInput(Node).RemoteDirectory,'\',RemoteTmpFolder ' -low ',DataInput(Node).MatlabOctavePath,' -nosplash -nodesktop -minimize -r Tracing']);
end
end
% Timer da fissare, nei valori di attesa!
......@@ -421,7 +428,7 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
while (1);
if Flag==0
disp('Try to run matlab on remote machine ... ');
disp('Try to run matlab/octave on remote machine ... ');
disp(' ');
disp('please wait ... ');
disp(' ');
......@@ -490,16 +497,10 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
dynareParallelRmDir(RemoteTmpFolder,DataInput(Node));
si3=[];
de3=[];
if Environment
[si3 de3]=system(['ssh ',DataInput(Node).UserName,'@',DataInput(Node).ComputerName,' ls ',DataInput(Node).RemoteDirectory,'/',RemoteTmpFolder]);
else
[si3 de3]=system(['dir \\',DataInput(Node).ComputerName,'\',DataInput(Node).RemoteDrive,'$\',DataInput(Node).RemoteDirectory,'\',RemoteTmpFolder]);
end
si3=dynareParallelDir('Tracing.m', RemoteTmpFolder,DataInput(Node));
if (si3)
if (isempty(si3))
disp ('Check on Delete Remote Computational Traces ..... Ok!');
disp(' ');
disp(' ');
......@@ -514,8 +515,6 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
end
end
% Now we check the variable 'CPUnbr'.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment