-
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
ZMQ error when starting second omc session #64
Comments
Okay, this has nothing to do with the second run. The only way I can get it to work for me is to un-coment the There has to be a way to check if the process spawned in the pipeline is already up and running and that we wait for that to happen. this.omcprocess = open(pipeline(`omc $args2 $args3$args4`)) I tried |
@AnHeuermann What happens if you run Julia with Just curious because I remember I did some kind of hack to avoid having the Julia compiler remove code in one of the loops. We could add the sleep again, the issue is that it is not guaranteed to work either (Flaky, in the sense it might still fail once every full moon or so). Maybe it would be good anyway to add: |
I added tries = 0
while tries < 100 && !isfile(joinpath("/tmp", portfile))
@info "Sleep"
sleep(0.02)
tries += 1
end and this works. Not great but better than nothing. I would remove the |
Using |
@AnHeuermann the main issue, the process is spawned, but the ZMQFile generated is not available by the time, when we want to read, sleep should do the trick, but this code should also do the trick
|
Description
When I create an OMCSession, close it with
quit
and open a new one ZMQ throws an error.Strangely this works perfectly fine on all of my machines but one.
This also works fine in the virtual machines of the GitHub actions CI of a package I'm developing.
How to reproduce
Versions 'n stuff
OMJulia.jl: v0.2.0 https://github.com/OpenModelica/OMJulia.jl#master (should be d705d58)
ZMQ.jl: v1.2.1
OS: Ubuntu 20.04.4 LTS
OpenModelica: v1.20.0-dev-211-g882357bebd
Julia Version 1.7.2 (Commit bf53498635 (2022-02-06 15:21 UTC))
CPU: Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cascadelake)
The text was updated successfully, but these errors were encountered: