-
Notifications
You must be signed in to change notification settings - Fork 207
Description
Describe the bug
Hello - thanks again for the great work on Parsl! I noticed recently when attempting to use multiple Parsl executors within the same Python process that the 2nd executor configured after clearing the first appears to reference the 1st executor's run_dir
information. This causes an exception preventing multiple executors from being leveraged. This appears to occur when using customized run_dir
settings and HTEX. The result is that Parsl hangs without exception (an error message appears in the run_dir
logs about a missing file).
To Reproduce
See this notebook (or gist backup) as a reference.
import shutil
from parsl.app.app import python_app
import parsl
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
@python_app
def add(x, y):
return x + y
# HTEX run 1
config = Config(executors=[HighThroughputExecutor()])
config.run_dir = "./runinfo_1"
parsl.load(config)
futs = [add(i, i) for i in range(5)]
results = [f.result() for f in futs]
print(results)
parsl.dfk().cleanup()
parsl.clear()
shutil.rmtree("./runinfo_1")
# HTEX run 2
config = Config(executors=[HighThroughputExecutor()])
config.run_dir = "./runinfo_2"
parsl.load(config)
futs = [add(i, i) for i in range(5)]
results = [f.result() for f in futs]
print(results)
parsl.dfk().cleanup()
parsl.clear()
shutil.rmtree("./runinfo_2")
Expected behavior
I'd expect that after performing a dkf().cleanup()
and parsl.clear()
that the executors and their workers would be fully cleaned up and not reference previous configurations.
Environment
- OS: MacOS, Linux
- Python version: >= 3.9
- Parsl version: 2025.6.2
Distributed Environment
- Where are you running the Parsl script from ? Laptop, Google Colab
- Where do you need the workers to run ? Same as Parsl script