Skip to content

Commit

Permalink
Merge pull request #637 from ged-lab/fix/do-partition-threading
Browse files Browse the repository at this point in the history
Fix type of threading arg in do-paritioning
  • Loading branch information
mr-c committed Oct 24, 2014
2 parents c5dee21 + 3997ebf commit 9fa2650
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014-10-24 Camille Scott <camille.scott.w@gmail.com>

* do-partition.py: Add type=int to n_threads arg and assert to check
number of active threads

2014-10-06 Michael R. Crusoe <mcrusoe@msu.edu>

* Doxyfile.in: add links to the stdc++ docs
Expand Down
4 changes: 3 additions & 1 deletion scripts/do-partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_parser():
parser.add_argument('--no-big-traverse', dest='no_big_traverse',
action='store_true', default=False,
help='Truncate graph joins at big traversals')
parser.add_argument('--threads', '-T', dest='n_threads',
parser.add_argument('--threads', '-T', dest='n_threads', type=int,
default=DEFAULT_N_THREADS,
help='Number of simultaneous threads to execute')
parser.add_argument('--keep-subsets', dest='remove_subsets',
Expand Down Expand Up @@ -186,6 +186,8 @@ def main(): # pylint: disable=too-many-locals,too-many-statements
threads.append(cur_thread)
cur_thread.start()

assert threading.active_count() == args.n_threads+1

print 'done starting threads'

# wait for threads
Expand Down

0 comments on commit 9fa2650

Please sign in to comment.