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

Create unique temporary directories #45

Open
braza2 opened this issue Nov 17, 2024 · 1 comment
Open

Create unique temporary directories #45

braza2 opened this issue Nov 17, 2024 · 1 comment

Comments

@braza2
Copy link

braza2 commented Nov 17, 2024

issue: Running parallel sessions leads to race conditions where each session tries to access or write to f"/tmp/DSSAT{VERSION}".

Replace line 50 in run.py

TMP = tempfile.gettempdir()

which creates the folder /tmp/ with

with tempfile.TemporaryDirectory() as TMP:
    print('created temporary directory', TMP)

each session now creates a unique temporary folder, thus solving the issue.

@braza2
Copy link
Author

braza2 commented Nov 17, 2024

Note: parallel session defined as running array jobs on a cluster with slurm.

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