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

TMP folders name convention #633

Open
suparat4 opened this issue Dec 12, 2024 · 3 comments · May be fixed by #634
Open

TMP folders name convention #633

suparat4 opened this issue Dec 12, 2024 · 3 comments · May be fixed by #634

Comments

@suparat4
Copy link

Hi ,

In our test infrastructure , we are running the tests in parallel using the pytest-xdist Python package. Currently, we have 4 workers on a Windows agent and 2 on Linux. When tests run in parallel, the fmusim process might start multiple times simultaneously.

fmusim creates a folder in the C:\Users\USERNAME\AppData\Local\Temp directory on Windows (and a similar location on Linux) and extracts the vECU.fmu to this folder. The folder name is defined by fmusim and includes just some number ( Ex: 123, 124 ,125 etc.) After the simulation completes successfully, fmusim deletes the folder.

Unfortunately, the folder naming convention used by fmusim leads to collisions during parallel execution. The folder name becomes a shared resource for multiple fmusim processes started simultaneously.

It is possible to have some more random naming convention for this TMP folder ? One proposal can be to use UUID on creating the name of tmp folder ( maybe cut to only a specific number of characters, like 6)

Version used : 0.0.36
Examples of TMP folder names while running tests in paralel mode , having 10 workers:
image

t-sommer added a commit to t-sommer/Reference-FMUs that referenced this issue Dec 12, 2024
to avoid clashes during parallel execution

fixes modelica#633
@t-sommer t-sommer linked a pull request Dec 12, 2024 that will close this issue
@t-sommer
Copy link
Collaborator

Can you give #634 a try?

@suparat4
Copy link
Author

Thank you for the fix . Looks good for us . Can we have an official release in order to integrate this in our tests? Thank you

@t-sommer
Copy link
Collaborator

Until the next release, you can download the distribution directly from https://github.com/modelica/Reference-FMUs/actions/runs/12296313654.

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

Successfully merging a pull request may close this issue.

2 participants