The get_task_results method only removes tasks from self.task_list if they are 'exec_done' or 'failed'.
Parsl defines a lot of other task states.
Those other ones won't get deleted from self.task_list, leaking both the Future objects and any associated resources.
|
for taski,task in reversed(list(enumerate(self.task_list))): |
|
task_status = task.task_status() |
|
if task_status == 'exec_done' and task.done: |
|
results_list.append(task.result()) |
|
del self.task_list[taski] |
|
elif task_status == 'failed': |
|
failed_number += failed_number |
|
del self.task_list[taski] |
This will also throw off the count in get_queued_number.
While we're at it, we can log the result when task_status == 'failed'.
The
get_task_resultsmethod only removes tasks fromself.task_listif they are 'exec_done' or 'failed'.Parsl defines a lot of other task states.
Those other ones won't get deleted from self.task_list, leaking both the Future objects and any associated resources.
ALF/alframework/tools/tools.py
Lines 257 to 264 in f7532fd
This will also throw off the count in
get_queued_number.While we're at it, we can log the result when
task_status == 'failed'.