Skip to content

Commit

Permalink
Modified stream to make returning results optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Govoni committed Mar 13, 2022
1 parent c9ae393 commit 2304268
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions blazer/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,17 @@ def run_cmd(cmd):
return result

if mpi:
count = 1
count = 0
with blazer.begin():
_results = stream(getjobs(), run_cmd, results=results)
if results:
for result in _results:
if not result:
continue
if results:
blazer.print("RESULT[{}]:".format(count),result)
count += 1
count += len(result)
blazer.print("Total computations: {}".format(count))
else:
blazer.print("Total computations: {}".format(list(_results)))
else:
Expand Down

0 comments on commit 2304268

Please sign in to comment.