Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/steamroller/engines/grid_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ def create_builder(self, env, builder, *argv, **argd):

commands = builder.action.presub_lines(env)
chdir = builder.action.chdir

m = re.match(r"^\s*((?:\S*[Pp]ython3?)|(?:accelerate launch))\s+(.*?\.py)\s+(.*)$", commands[0])

m = re.match(r"^\s*(\S*[Pp]ython3?)\s+(.*?\.py)\s+(.*)$", commands[0])
if not m:
raise Exception("Could not parse command: '{}'".format(commands[0]))

Expand Down
3 changes: 2 additions & 1 deletion src/steamroller/engines/local_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def create_builder(self, env, builder):
commands = builder.action.presub_lines(env)
chdir = builder.action.chdir

m = re.match(r"^\s*(\S*[Pp]ython3?)\s+(.*?\.py)\s+(.*)$", commands[0])
#m = re.match(r"^\s*(\S*[Pp]ython3?)\s+(.*?\.py)\s+(.*)$", commands[0])
m = re.match(r"^\s*((?:\S*[Pp]ython3?)|(?:accelerate launch))\s+(.*?\.py)\s+(.*)$", commands[0])
if not m:
raise Exception("Could not parse command: '{}'".format(commands[0]))

Expand Down
6 changes: 5 additions & 1 deletion src/steamroller/engines/univa_engine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import os
import subprocess
import logging
import shlex
from .grid_engine import GridEngine

#def univa(commands, name, std, dep_ids=[], grid_resources=[], working_dir=None, queue="all.q"):
Expand All @@ -10,7 +14,7 @@ def univa(commands, name, std, dep_ids=[], working_dir=None, gpu_count=0, time="
except:
pass
deps = "" if len(dep_ids) == 0 else "-hold_jid {}".format(",".join([str(x) for x in dep_ids]))
res = "" if len(grid_resources) == 0 else "-l {}".format(",".join([str(x) for x in grid_resources]))
#res = "" if len(grid_resources) == 0 else "-l {}".format(",".join([str(x) for x in grid_resources]))
wd = "-wd {}".format(working_dir) if working_dir else "-cwd"
qcommand = "qsub -terse -shell n -V -N {} -q {} -b n {} {} -j y -o {} -l h_rt={},mem_free={}".format(name, queue, wd, deps, std, time, memory)
logging.info("\n".join(commands))
Expand Down