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
Maximilian Nöthe
LSTOSA
Commits
8a0a892d
Commit
8a0a892d
authored
Jan 31, 2020
by
Lab Saha
Browse files
Merge branch 'master' into 'master'
Updating See merge request contrera/lstosa!14
parents
32055240
f4894c47
Changes
2
Hide whitespace changes
Inline
Side-by-side
osa/jobs/job.py
View file @
8a0a892d
...
...
@@ -335,9 +335,9 @@ def createjobtemplate(s):
commandargs
.
append
(
os
.
path
.
join
(
pedestaldir
,
nightdir
,
version
,
s
.
pedestal
))
commandargs
.
append
(
os
.
path
.
join
(
calibdir
,
nightdir
,
version
,
'time_'
+
s
.
calibration
))
commandargs
.
append
(
os
.
path
.
join
(
drivedir
,
s
.
drive
))
commandargs
.
append
(
str
(
s
.
run
).
zfill
(
5
))
if
s
.
type
!=
'STEREO'
:
commandargs
.
append
(
options
.
tel_id
)
#
commandargs.append(str(s.run).zfill(5))
#
if s.type != 'STEREO':
#
commandargs.append(options.tel_id)
content
=
"#!/bin/env python
\n
"
...
...
@@ -352,8 +352,23 @@ def createjobtemplate(s):
content
+=
"#SBATCH -e ./log/slurm.%j.%N.err
\n
"
#
content
+=
"import subprocess
\n
"
content
+=
"subprocess.call({0})
\n
"
.
format
(
commandargs
)
subruns
=
[]
dat
=
''
for
sub
in
s
.
subrun_list
:
dat
+=
formatrunsubrun
(
s
.
run
,
sub
.
subrun
)
+
' '
srun
=
str
(
sub
.
subrun
).
zfill
(
4
)
subruns
.
append
(
srun
)
content
+=
"subruns={0}
\n
"
.
format
(
subruns
)
content
+=
"for subrun in subruns:
\n
"
# content +="subprocess.call({0})\n".format(commandargs)
content
+=
" subprocess.call(["
for
i
in
commandargs
:
content
+=
" '{0}',
\n
"
.
format
(
i
)
content
+=
" '{0}"
.
format
(
str
(
s
.
run
).
zfill
(
5
))
+
".{0}'"
+
'.format(subrun)'
+
','
content
+=
" '{0}'"
.
format
(
options
.
tel_id
)
content
+=
" ])"
print
(
"S.script"
,
s
.
script
)
if
not
options
.
simulate
:
iofile
.
writetofile
(
s
.
script
,
content
)
...
...
register.py
View file @
8a0a892d
from
standardhandle
import
output
,
warning
,
verbose
,
error
,
gettag
import
options
,
cliopts
import
config
from
osa.utils.
standardhandle
import
output
,
warning
,
verbose
,
error
,
gettag
from
osa.utils
import
options
,
cliopts
from
osa.configs
import
config
##############################################################################
#
# register_files
...
...
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