Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Tsurata, Aki
CTDAS
Commits
483c4f1a
Commit
483c4f1a
authored
14 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
restrict moving of output to jobfile to non-interactive jobs only
parent
c835f48d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/tools/initexit.py
+7
-7
7 additions, 7 deletions
da/tools/initexit.py
with
7 additions
and
7 deletions
da/tools/initexit.py
+
7
−
7
View file @
483c4f1a
...
...
@@ -53,7 +53,6 @@ class CycleControl(object):
# Add some useful variables to the rc-file dictionary
self
.
da_settings
[
'
jobrcfilename
'
]
=
self
.
RcFileName
self
.
da_settings
[
'
log
'
]
=
logging
.
root
.
handlers
[
0
].
baseFilename
self
.
da_settings
[
'
dir.da_submit
'
]
=
os
.
getcwd
()
self
.
da_settings
[
'
da.crash.recover
'
]
=
'
-r
'
in
opts
self
.
da_settings
[
'
verbose
'
]
=
'
-v
'
in
opts
...
...
@@ -67,7 +66,6 @@ class CycleControl(object):
msg
=
"
===============================================================
"
;
print
msg
msg
=
"
DA Cycle rc-file is %s
"
%
self
.
RcFileName
;
print
msg
msg
=
"
DA Cycle log file is %s
"
%
self
.
da_settings
[
'
log
'
]
;
print
msg
msg
=
"
DA Cycle run directory is %s
"
%
self
.
da_settings
[
'
dir.da_run
'
]
;
print
msg
msg
=
"
DA Cycle inverse system is %s
"
%
self
.
da_settings
[
'
da.system
'
]
;
print
msg
msg
=
"
DA Cycle forecast model is %s
"
%
self
.
da_settings
[
'
forecast.model
'
]
;
print
msg
...
...
@@ -616,12 +614,14 @@ def CleanUpCycle(DaCycle):
# move log file to rundir/jobs
jobdir
=
os
.
path
.
join
(
DaCycle
.
da_settings
[
'
dir.da_run
'
],
"
jobs
"
)
logfile
=
DaCycle
.
da_settings
[
'
log
'
]
joblogfile
=
os
.
path
.
join
(
jobdir
,
'
cycle.%s.log
'
%
DaCycle
.
da_settings
[
'
time.start
'
])
dummy
=
shutil
.
move
(
logfile
,
joblogfile
)
msg
=
"
....Moved %s to %s
"
%
(
logfile
,
joblogfile
)
;
logging
.
debug
(
msg
)
logfile
=
'
das.o%s
'
%
DaCycle
.
DaPlatForm
.
GetMyID
()
msg
=
"
The complete log file is now at: %s
"
%
(
joblogfile
)
;
logging
.
info
(
msg
)
if
os
.
path
.
exists
(
logfile
):
joblogfile
=
os
.
path
.
join
(
jobdir
,
'
cycle.%s.log
'
%
DaCycle
.
da_settings
[
'
time.start
'
].
strftime
(
'
%Y%m%d
'
))
dummy
=
shutil
.
move
(
logfile
,
joblogfile
)
msg
=
"
....Moved %s to %s
"
%
(
logfile
,
joblogfile
)
;
logging
.
debug
(
msg
)
msg
=
"
The complete log file is now at: %s
"
%
(
joblogfile
)
;
logging
.
info
(
msg
)
if
__name__
==
"
__main__
"
:
...
...
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