Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMC-SOG
experiments
hybrid
Commits
14e6e8d5
Commit
14e6e8d5
authored
Feb 26, 2022
by
Jaime Arias
Browse files
update script
parent
fe680c00
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/sbatch_generator.py
View file @
14e6e8d5
...
...
@@ -3,6 +3,7 @@
import
os
import
stat
import
sys
import
pathlib
from
collections
import
ChainMap
from
functools
import
reduce
from
itertools
import
product
...
...
@@ -299,7 +300,7 @@ def generate_oar(
formulas_ids
,
timeout
,
paths
,
oar_timeout
=
"
2
:00:00"
,
oar_timeout
=
"
14
:00:00"
,
):
"""Generates a slurm batch of a experiment to be executed on the cluster
...
...
@@ -361,6 +362,12 @@ def generate_oar(
with
open
(
oar_file
,
"w"
)
as
f
:
f
.
write
(
header
)
# remove last output
latest_f
=
len
(
list
(
pathlib
.
Path
(
output_folder
).
glob
(
'*-f*.out'
)))
if
(
latest_f
):
f
.
write
(
f
"rm
{
output_folder
}
/
{
oar_job
}
-f
{
latest_f
}
.*;"
)
f
.
write
(
"
\n\n
"
)
for
formula
in
formulas_ids
:
command
=
tool_command
(
tool_dict
,
threads
,
model_name
,
model_instance
,
formula
,
paths
...
...
@@ -560,10 +567,9 @@ if __name__ == "__main__":
# }, {
"name"
:
"tring"
,
"instances"
:
[
"tring10"
]
# "tring5", "tring20"
# }, {
# "name":
# "robot",
# "instances": ["robot20"] #"robot20", "robot50", "robot2", "robot5", "robot10"]
},
{
"name"
:
"robot"
,
"instances"
:
[
"robot20"
]
#"robot20", "robot50", "robot2", "robot5", "robot10"]
# }, {
# "name": "spool",
# "instances": ["spool4", "spool5"] #, "spool1", "spool2", "spool3"]
...
...
Write
Preview
Markdown
is supported
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