You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BruteforceSearch in algorithms/Bruteforce_search.py does not work when parallel=True is set.
Error message:
"""
Traceback (most recent call last):
File "/home/local/MENDEL/d.capocefalo/miniconda3/envs/pyntacle/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/local/MENDEL/d.capocefalo/Programming/pyntacle/algorithms/bruteforce_search.py", line 202, in crunch_fragmentation_combinations
kppset_score_pairs[allS] = type_func(temp_graph)
TypeError: func_wrapper() got multiple values for argument 'graph'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/local/MENDEL/d.capocefalo/Programming/pyntacle/pyntacle_tests.py", line 46, in
bf = BruteforceSearch.fragmentation(mat, kpp_size=2, kpp_type=KPNEGchoices.dF, parallel=True, ncores=2)
File "/home/local/MENDEL/d.capocefalo/Programming/pyntacle/tools/misc/graph_routines.py", line 80, in func_wrapper
return func(graph, *args, **kwargs)
File "/home/local/MENDEL/d.capocefalo/Programming/pyntacle/tools/misc/kpsearch_utils.py", line 97, in func_wrapper
return func(graph, kpp_size, kpp_type,max_distances, *args, **kwargs)
File "/home/local/MENDEL/d.capocefalo/Programming/pyntacle/algorithms/bruteforce_search.py", line 106, in fragmentation
final_set = BruteforceSearch.__bruteforce_fragmentation_parallel(graph=graph, kpp_size=kpp_size, kpp_type=kpp_type, ncores=ncores, max_distances=max_distances, implementation=implementation) #this is equivalent to the kppset_score_pairs
File "/home/local/MENDEL/d.capocefalo/Programming/pyntacle/algorithms/bruteforce_search.py", line 233, in __bruteforce_fragmentation_parallel
for partial_result in pool.imap_unordered(partial(BruteforceSearch.crunch_fragmentation_combinations, graph=graph, kpp_type=kpp_type, implementation=implementation, max_distances=max_distances), allS):
File "/home/local/MENDEL/d.capocefalo/miniconda3/envs/pyntacle/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
TypeError: func_wrapper() got multiple values for argument 'graph'
"""
This is possibly c aused by the fact that the_pool.imap_unordered_ multiprocessing function (line 236) spawn several KeyPlayer functions and that the decorator of these functions interfere with the pooling.
Any idea on how to fix this?
The text was updated successfully, but these errors were encountered:
BruteforceSearch in algorithms/Bruteforce_search.py does not work when parallel=True is set.
Error message:
This is possibly c aused by the fact that the_pool.imap_unordered_ multiprocessing function (line 236) spawn several KeyPlayer functions and that the decorator of these functions interfere with the pooling.
Any idea on how to fix this?
The text was updated successfully, but these errors were encountered: