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

Does not work with Julia 1.4 #36

Closed
sjoelund opened this issue Mar 30, 2020 · 10 comments
Closed

Does not work with Julia 1.4 #36

sjoelund opened this issue Mar 30, 2020 · 10 comments
Assignees

Comments

@sjoelund
Copy link
Member

The following works fine in Julia 1.1, but 1.4 refuses to start:

import OMJulia
om=OMJulia.OMCSession()
OMJulia.sendExpression(om, "1+1")
@arun3688
Copy link
Contributor

arun3688 commented Jun 29, 2020

@sjoelund I tested with julia 1.4.2 , it is working, should i check for version julia 1.4 ?

@sjoelund
Copy link
Member Author

1.4.2 hangs for me as well. I get:

WARNING: Compat.Sys is deprecated, use Base.Sys instead.
  likely near REPL[2]:1
OMJulia.OMCSession(...)

And

martin   15722  0.0  0.0 319768 20252 pts/5    Sl+  14:56   0:00 omc --interactive=zmq +z=julia.5Q6UlM8rg7

But then nothing happens. The log-file just says:

tcp://127.0.0.1:43427

So I guess there is something not working with ZeroMQ

@arun3688
Copy link
Contributor

@sjoelund I am not even getting such warnings in windows.

image

i updated all the packages and tested it.

@sjoelund
Copy link
Member Author

I also updated my packages and tested with 1.4.2 again :)

@sjoelund
Copy link
Member Author

If I update to OMJulia#master I also don't get that warning. But it still hangs...

@arun3688
Copy link
Contributor

@sjoelund , I was able to reproduce the problem in linux, i found the problem related to hanging, It is the "Parser" module which takes too long for the first time compilation, and not the ZMQ, the ZMQ is working fine . I did some trials in the dev server and found the following

Without disabling Parser module:

>> using OMJulia
>> omc= OMJulia.OMCSession()
>> sendExpression(omc, "1+1")  // waited for 10 minutes approximately, got the results back , Sometimes it takes longer than 10 minutes for the first time compliation

After disabling Parser module:

#return Parser.parseOM(unsafe_string(message))

>> using OMJulia
>> omc= OMJulia.OMCSession()
>> sendExpression(omc, "1+1")  //  not hanging, got the results immediately 

For some reasons this is not happening in windows, You can try this and see, It is the parser module which causes the hanging

@sjoelund
Copy link
Member Author

https://gist.github.com/sjoelund/af90649890dec720cb9d7aab58c3a196

[martin@mega src]$ time julia-1.4.2 -O0 test.jl 
Any[2]

real    0m1,148s
user    0m1,155s
sys     0m0,367s
[martin@mega src]$ time julia-1.4.2 -O1 test.jl 
Any[2]

real    0m37,918s
user    0m37,624s
sys     0m0,475s

$ time julia-1.4.2 test.jl  
Any[2]

real    12m6,189s
user    11m53,341s
sys     0m1,267s

What are the times on that file in Windows? (Running from command-line)
If it's very different from Linux I guess we should make a bug report to Julia.

@arun3688
Copy link
Contributor

I got the following measurements

arupa54@win00085 MINGW64 /c/OPENMODELICAGIT/OpenModelica/OMJulia.jl/src (master)
$ time julia lexertest.jl
Any[2]
  0.000088 seconds (21 allocations: 130.945 KiB)

real    0m3.958s
user    0m0.000s
sys     0m0.015s

arupa54@win00085 MINGW64 /c/OPENMODELICAGIT/OpenModelica/OMJulia.jl/src (master)
$ time julia lexertest.jl
Any[2]
  0.000092 seconds (21 allocations: 130.945 KiB)

real    0m3.851s
user    0m0.015s
sys     0m0.000s

arupa54@win00085 MINGW64 /c/OPENMODELICAGIT/OpenModelica/OMJulia.jl/src (master)
$ time julia lexertest.jl
Any[2]
  0.000125 seconds (21 allocations: 130.945 KiB)

real    0m4.055s
user    0m0.000s
sys     0m0.015s

@sjoelund
Copy link
Member Author

From Slack

arupa54@win00085 MINGW64 /c/OPENMODELICAGIT/OpenModelica/OMJulia.jl/src (master)
$ time julia -O0 lexertest.jl
Any[2]
  0.000160 seconds (21 allocations: 130.945 KiB)
real    0m1.093s
user    0m0.015s
sys     0m0.015s
arupa54@win00085 MINGW64 /c/OPENMODELICAGIT/OpenModelica/OMJulia.jl/src (master)
$ time julia -O1 lexertest.jl
Any[2]
  0.000114 seconds (21 allocations: 130.945 KiB)
real    0m3.868s
user    0m0.000s
sys     0m0.015s
arupa54@win00085 MINGW64 /c/OPENMODELICAGIT/OpenModelica/OMJulia.jl/src (master)
$ time julia lexertest.jl
Any[2]
  0.000145 seconds (21 allocations: 130.945 KiB)
real    0m3.976s
user    0m0.015s
sys     0m0.015s

@sjoelund
Copy link
Member Author

sjoelund commented Jul 1, 2020

Should be fixed by #38

@sjoelund sjoelund closed this as completed Jul 1, 2020
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

3 participants