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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
8cd68dc0
Commit
8cd68dc0
authored
12 years ago
by
Marco Ratto
Browse files
Options
Downloads
Patches
Plain Diff
1) Fix compatibility problems with the Port field in unix nodes of the cluster;
2) bug fix in security checks;
parent
0a2f7f3e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!344
Parallel debug and several fixes of GSA toolbox
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/parallel/dynareParallelRmDir.m
+13
-8
13 additions, 8 deletions
matlab/parallel/dynareParallelRmDir.m
with
13 additions
and
8 deletions
matlab/parallel/dynareParallelRmDir.m
+
13
−
8
View file @
8cd68dc0
...
...
@@ -36,13 +36,13 @@ if nargin ==0,
end
% security check of remote folder delete
ok
(
1
)
=
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'..'
));
tmp1
=
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'2'
);
ok
(
1
)
=
isempty
(
strfind
(
P
RCDi
r
,
'..'
));
tmp1
=
strfind
(
P
RCDi
r
,
'2'
);
ok
(
2
)
=
tmp1
(
1
)
==
1
;
ok
(
3
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'-'
));
ok
(
4
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'h'
));
ok
(
5
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'm'
));
ok
(
6
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
's'
));
ok
(
3
)
=~
isempty
(
strfind
(
P
RCDi
r
,
'-'
));
ok
(
4
)
=~
isempty
(
strfind
(
P
RCDi
r
,
'h'
));
ok
(
5
)
=~
isempty
(
strfind
(
P
RCDi
r
,
'm'
));
ok
(
6
)
=~
isempty
(
strfind
(
P
RCDi
r
,
's'
));
ok
(
7
)
=~
isempty
(
PRCDir
);
if
sum
(
ok
)
<
7
,
...
...
@@ -55,8 +55,13 @@ for indPC=1:length(Parallel),
error
(
'The remote folder path structure does not comply the security standards!'
),
end
while
(
1
)
if
~
ispc
||
strcmpi
(
'unix'
,
Parallel
(
indPC
)
.
OperatingSystem
)
[
stat
NonServe
]
=
system
([
'ssh '
,
Parallel
(
indPC
)
.
UserName
,
'@'
,
Parallel
(
indPC
)
.
ComputerName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'/'
,
PRCDir
,]);
if
~
ispc
||
strcmpi
(
'unix'
,
Parallel
(
indPC
)
.
OperatingSystem
),
if
~
isempty
(
Parallel
(
indPC
)
.
Port
),
ssh_token
=
[
'-p '
,
Parallel
(
indPC
)
.
Port
];
else
ssh_token
=
''
;
end
[
stat
NonServe
]
=
system
([
'ssh '
,
ssh_token
,
' '
,
Parallel
(
indPC
)
.
UserName
,
'@'
,
Parallel
(
indPC
)
.
ComputerName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'/'
,
PRCDir
,]);
break
;
else
if
exist
(
'OCTAVE_VERSION'
),
% Patch for peculiar behaviour of rmdir under Windows.
...
...
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