Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
NearRealTimeCTDAS
CTDAS
Commits
c2bd646f
Commit
c2bd646f
authored
May 16, 2014
by
Ingrid Luijkx
Browse files
Fixed option to read same random seed init file at start of run
parent
56581284
Changes
1
Hide whitespace changes
Inline
Side-by-side
da/tools/initexit.py
View file @
c2bd646f
...
...
@@ -253,7 +253,7 @@ class CycleControl(dict):
def
read_random_seed
(
self
,
first
=
False
):
if
first
:
filename
=
self
[
'random.seed.init'
]
filename
=
self
.
dasystem
[
'random.seed.init'
]
logging
.
info
(
"Initialised random seed from: %s"
%
filename
)
else
:
filename
=
os
.
path
.
join
(
self
[
'dir.restart'
],
'randomseed_%s.pickle'
%
self
[
'da.restart.tstamp'
].
strftime
(
'%Y%m%d'
))
...
...
@@ -334,7 +334,7 @@ class CycleControl(dict):
for
filename
in
glob
.
glob
(
os
.
path
.
join
(
self
[
'dir.exec'
],
'*.pickle'
)):
logging
.
info
(
'Deleting pickle file %s to make sure the correct regions are used'
%
os
.
path
.
split
(
filename
)[
1
])
os
.
remove
(
filename
)
if
self
.
has_key
(
'random.seed.init'
):
if
self
.
dasystem
.
has_key
(
'random.seed.init'
):
self
.
read_random_seed
(
True
)
self
.
parse_times
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment