-
Notifications
You must be signed in to change notification settings - Fork 13
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
Multi-threading with OMJulia #71
Comments
@JKRT can you please comment on that? |
Hello @Wardi0 thanks for raising the issue, could you provide a minimal example showcasing the issue, in principle, I believe it should work |
Hi JKRT, thank you for helping with this issue! This is my code:
Based on my print statements, OMJulia is indeed running in parallel. It is just that the multi-threading raises these TaskFailedExceptions (seemingly at random to me); all the simulations ran fine with no errors on a single thread. |
Perhaps you need to set a unique working directory for each OMCSession otherwise simulation will not work since it tries to delete and create files at the same location. |
@adeas31 OMJulia creates a new temp directory for each |
@Wardi0 What version of OMJulia, and what platform are you on? Furthermore, would it be possible to get model, or if that is not possible that you try the same example with some other model that can be shared? |
@JKRT Ah, I was not up-to-date. I was using OMJulia v0.1.0 on VSCode for Windows 10. I have created a repository with the code that produced the errors in that version if you are still interested (https://github.com/Wardi0/OMJulia_multithreading) Having updated to OMJulia v0.2.1 though, I can no longer start an OMCSession. OMJulia seems to have made 2 files in the current directory, stderr.log and stdout.log, that I cannot edit without admin priveleges (university laptop with admin restrictions....), so trying to create an OMCSession throws: IOError: open("stderr.log", 769, 420): permission denied (EACCES) Is there any way around this? |
@Wardi0 start your julia repl as administrator and it should work |
@arun3688 My university does not give us admin rights on laptops :( |
@Wardi0 One workaround to try what Arun suggested is to create a virtual machine and install everything you need in that image; in that way, you can be administrator. Still, of course, there are performance penalties if you do, but at least it can help to pinpoint the issue |
Hi @JKRT, just wanted to update this thread. I am now using a Linux machine and have got multi-threading working with OMJulia so I think this issue can be closed. I still cannot run it on Windows due to the As an aside, is there a way to suppress the printed terminal output from |
Hi there! I am using OMJulia in VSCode and am trying to optimise the parameters of dynamic Modelica models.
I was wondering if the multi-threading of simulations is possible with OMJulia? I have tried creating multiple OMCSession objects and running parallel simulations across them but I get a "TaskFailedException" as soon as multiple simulations try to run at once. I am quite new to both OMJulia and multi-threading so I'm not sure if this is a limitation of OMJulia or a mistake on my end.
The text was updated successfully, but these errors were encountered: