Fixed -t arg

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3634 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
weisburd 2010-06-24 23:44:10 +00:00
parent 3cd0570c1e
commit 1cb8f51f8c
1 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,7 @@ running_processes = []
def execute(command, stdout_filename=None):
# Wait until a slot becomes open
while len( running_processes ) + 1 >= num_parallel_processes:
while len( running_processes ) >= num_parallel_processes:
# Check if any have ended
for process in running_processes:
if process.poll() != None:
@ -142,6 +142,7 @@ def execute(command, stdout_filename=None):
stdout = open(stdout_filename, "w+")
print("Executing: " + command)
p = subprocess.Popen(shlex.split(command), stdout=stdout, stderr=subprocess.STDOUT)
running_processes.append(p)
@ -163,10 +164,10 @@ for contig in contigs:
command = "bsub "+EXCLUSIVE+" -q " + queue + " -R \"rusage[mem="+str(MEMORY_USAGE)+"]\" -o " + os.path.join(logs_dir,contig+"_log.txt") + " " + command
if run:
print("Executing: " + command)
if run_locally and num_parallel_processes > 1:
execute(command, os.path.join(logs_dir,contig+"_log.txt"))
else:
print("Executing: " + command)
os.system(command)
else:
print(command)