Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stéphane Adjemian
dynare
Commits
0ad3f11c
Commit
0ad3f11c
authored
14 years ago
by
Marco Ratto
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/parallel/AnalyseComputationalEnvironment.m
+125
-126
125 additions, 126 deletions
matlab/parallel/AnalyseComputationalEnvironment.m
with
125 additions
and
126 deletions
matlab/parallel/AnalyseComputationalEnvironment.m
+
125
−
126
View file @
0ad3f11c
...
...
@@ -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 =
f
printf(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'.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment