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

Multiprocess access to the same file or folder #44

Open
hosseinfani opened this issue Mar 10, 2023 · 2 comments
Open

Multiprocess access to the same file or folder #44

hosseinfani opened this issue Mar 10, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hosseinfani
Copy link
Member

@Hamedloghmani
When running Adila in parallel for multiple *.pred files, we rely on file locking system of os. However, there will be some issues like

One process may be true in condition check, but when creating see the folder exists due to other process!

if not os.path.isdir(output): os.makedirs(output)

Or when logging the time at:

with open(f'{output}/rerank.time', 'a') as file: file.write(f'{elapsed_time} {new_output} {algorithm} {k_max}\n')

Temporary solution is to run sequentially for one pred file. Then, run in parallel for all files.

@hosseinfani hosseinfani added the bug Something isn't working label Mar 10, 2023
@Hamedloghmani
Copy link
Member

@hosseinfani
Thank you for pointing that out. That was a really solid point. I think this was the reason that on unix processes became zombies and running would not finish in some cases, although Windows handled that.
I will look for a permanent solution.

@hosseinfani
Copy link
Member Author

@Hamedloghmani
put it in the lowest priority, pls. Not important at all for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants