Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive Parallel Task pool not destroyed after use. #24

Open
cianciosa opened this issue Jul 14, 2023 · 0 comments
Open

Massive Parallel Task pool not destroyed after use. #24

cianciosa opened this issue Jul 14, 2023 · 0 comments

Comments

@cianciosa
Copy link
Contributor

Issue

When running the massive parallel as a sub workflow, the intent is that this would flow would be called multiple times in a loop. However when trying to do that, I get an error on the second iteration.

2023-07-13 12:58:43,221 fastran__ips_massive_parallel_10 ERROR    Uncaught Exception in component method.
Traceback (most recent call last):
  File "/global/common/software/atom/perlmutter/adaptive/conda/lib/python3.8/site-packages/ipsframework/component.py", line 139, in __run__
    retval = method(*self.args, **keywords)
  File "/global/common/software/atom/perlmutter/adaptive/conda/lib/python3.8/site-packages/fastran/driver/ips_massive_parallel.py", line 100, in step
    pool = services.create_task_pool('pool')
  File "/global/common/software/atom/perlmutter/adaptive/conda/lib/python3.8/site-packages/ipsframework/services.py", line 1871, in create_task_pool
    raise Exception('Error: Duplicate task pool name %s' % (task_pool_name))
Exception: Error: Duplicate task pool name pool
2023-07-13 12:58:43,257 workers__massive_parallel_runner_8 ERROR    Uncaught Exception in component method.

The cause of this is that the task pool is never destroyed after use.

Suggested fix

The code here

exit_status = services.get_finished_tasks('pool')

should be changed from

print('ret_val = ', ret_val)
exit_status = services.get_finished_tasks('pool')
print(exit_status)

to

print('ret_val = ', ret_val)
exit_status = services.get_finished_tasks('pool')
services. remove_task_pool('pool')
print(exit_status)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant