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
1fc0fbc2
Commit
1fc0fbc2
authored
Apr 14, 2010
by
Marco Ratto
Browse files
Options
Downloads
Patches
Plain Diff
Extended remote delete, to clean everything after completion of jobs on remote machines.
parent
0e98d426
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/closeSlave.m
+23
-8
23 additions, 8 deletions
matlab/closeSlave.m
with
23 additions
and
8 deletions
matlab/closeSlave.m
+
23
−
8
View file @
1fc0fbc2
...
...
@@ -19,13 +19,28 @@ function closeSlave(Parallel),
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
try
delete
(
'slaveParallel_input*.mat'
);
for
indPC
=
1
:
length
(
Parallel
),
if
Parallel
(
indPC
)
.
Local
==
0
,
if
(
Parallel
(
indPC
)
.
Local
==
0
)
,
if
isunix
||
(
~
matlab_ver_less_than
(
'7.4'
)
&&
ismac
),
system
([
'ssh '
,
Parallel
(
indPC
)
.
user
,
'@'
,
Parallel
(
indPC
)
.
PcName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteFolder
,
'/slaveParallel_input*.mat'
]);
system
([
'ssh '
,
Parallel
(
indPC
)
.
user
,
'@'
,
Parallel
(
indPC
)
.
PcName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteFolder
,
'/*'
]);
else
mydelete
(
'slaveParallel_input*.mat'
,[
'\\'
,
Parallel
(
indPC
)
.
PcName
,
'\'
,
Parallel
(
indPC
)
.
RemoteDrive
,
'$\'
,
Parallel
(
indPC
)
.
RemoteFolder
,
'\'
]);
mydelete
(
'*.*'
,[
'\\'
,
Parallel
(
indPC
)
.
PcName
,
'\'
,
Parallel
(
indPC
)
.
RemoteDrive
,
'$\'
,
Parallel
(
indPC
)
.
RemoteFolder
,
'\'
]);
adir
=
dir
([
'\\'
,
Parallel
(
indPC
)
.
PcName
,
'\'
,
Parallel
(
indPC
)
.
RemoteDrive
,
'$\'
,
Parallel
(
indPC
)
.
RemoteFolder
,
'\'
]);
for
jdir
=
3
:
length
(
adir
)
STATUS
=
rmdir
([
'\\'
,
Parallel
(
indPC
)
.
PcName
,
'\'
,
Parallel
(
indPC
)
.
RemoteDrive
,
'$\'
,
Parallel
(
indPC
)
.
RemoteFolder
,
'\'
,
adir
(
jdir
)
.
name
],
's'
);
if
STATUS
==
0
,
disp
([
'Warning!: Directory '
,
adir
(
jdir
)
.
name
,
' could not be removed from '
,
Parallel
(
indPC
)
.
PcName
,
'.'
])
end
end
end
end
end
catch
E1
=
fopen
(
'Errore1-closeSlave.txt'
,
'w+'
);
fclose
(
E1
);
end
\ No newline at end of file
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