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

Fixed check of number of cpu's chen unix master calls windows slave

parent 3062617a
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,13 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for' ...@@ -109,7 +109,13 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
OScallerUnix=~ispc; OScallerUnix=~ispc;
OScallerWindows=ispc; OScallerWindows=ispc;
OStargetUnix=strcmpi('unix',DataInput(Node).OperatingSystem); OStargetUnix=strcmpi('unix',DataInput(Node).OperatingSystem);
if isempty(DataInput(Node).OperatingSystem),
OStargetUnix=OScallerUnix;
end
OStargetWindows=strcmpi('windows',DataInput(Node).OperatingSystem); OStargetWindows=strcmpi('windows',DataInput(Node).OperatingSystem);
if isempty(DataInput(Node).OperatingSystem),
OStargetWindows=OScallerWindows;
end
Environment= (OScallerUnix || OStargetUnix); Environment= (OScallerUnix || OStargetUnix);
...@@ -561,7 +567,11 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for' ...@@ -561,7 +567,11 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
end end
else else
if Environment, if Environment,
if OStargetUnix,
[si0 de0]=system(['ssh ',DataInput(Node).UserName,'@',DataInput(Node).ComputerName,' grep processor /proc/cpuinfo']); [si0 de0]=system(['ssh ',DataInput(Node).UserName,'@',DataInput(Node).ComputerName,' grep processor /proc/cpuinfo']);
else
[si0 de0]=system(['ssh ',DataInput(Node).UserName,'@',DataInput(Node).ComputerName,' psinfo']);
end
else else
[si0 de0]=system(['psinfo \\',DataInput(Node).ComputerName,' -u ',DataInput(Node).UserName,' -p ',DataInput(Node).Password]); [si0 de0]=system(['psinfo \\',DataInput(Node).ComputerName,' -u ',DataInput(Node).UserName,' -p ',DataInput(Node).Password]);
end end
...@@ -569,13 +579,14 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for' ...@@ -569,13 +579,14 @@ for Node=1:length(DataInput) % To obtain a recoursive function remove the 'for'
RealCPUnbr=''; RealCPUnbr='';
RealCPUnbr=GiveCPUnumber(de0); keyboard;
RealCPUnbr=GiveCPUnumber(de0,OStargetUnix);
% Questo controllo penso che si possa MIGLIORARE!!!!! % Questo controllo penso che si possa MIGLIORARE!!!!!
if isempty (RealCPUnbr) && Environment==0, if isempty (RealCPUnbr) && Environment==0,
[si0 de0]=system(['psinfo \\',DataInput(Node).ComputerName]); [si0 de0]=system(['psinfo \\',DataInput(Node).ComputerName]);
end end
RealCPUnbr=GiveCPUnumber(de0); RealCPUnbr=GiveCPUnumber(de0,OStargetUnix);
if isempty (RealCPUnbr) if isempty (RealCPUnbr)
% An error occurred when we try to know the Cpu/Cores % An error occurred when we try to know the Cpu/Cores
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment