-
Notifications
You must be signed in to change notification settings - Fork 3
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
LLVM issues on windows #159
Comments
I experience the same issue on Windows, both when calling |
We have a fix in progress in JuliaSimCompiler, I'll report back here once a new release is out. If you're really keen on getting it to work, you can try applying this patch. You might get some warnings while defining those since you're effectively redefining a bunch of methods in JuliaSimCompiler, but that's fine. The patch changes the import JuliaSimCompiler as JSC
function JSC.SymbolicIndexingInterface.observed(sys::JSC.ScheduledSystem, sym)
return JSC.build_explicit_observed_function(sys, sym; remap_params = true, target=JSC.JuliaTarget())
end
function JSC.SymbolicIndexingInterface.parameter_observed(sys::JSC.ScheduledSystem, sym)
return JSC.build_explicit_observed_function(
sys, sym; param_only = true, remap_params = true, target=JSC.JuliaTarget())
end
function (m::JSC.Memoized{HasIV})(vars) where {HasIV}
let H = Val(HasIV)
get!(m.obsdict, vars) do
JSC.build_explicit_observed_function(m.ss, vars, H; remap_params = true, target=JSC.JuliaTarget())
end
end
end |
A new version of JSCompiler has been released, v0.1.22. I hope this resolves your issues! |
I only see v0.1.21 on JuliaHub registry |
Could you try to do |
What's your output of |
Thanks, the above fixed the update issue. I already went through those steps to install the package the first time, but I think However, being on JuliaSimCompiler 0.1.22 I now experience crashes when calling |
What messages do you get? Does Julia terminate? |
Yes Julia terminates |
If you run this in a regular terminal (one that does not terminate upon segfault), do you get some message then? |
No, even from a terminal julia closes without error message.
|
even though julia terminates. the terminal might stay alive with the segfault error message on display? The terminal in vscode dies completely, so vscode is usually not good for reading such messages |
Since Multibody and dependency seem to be platform dependent, it seems to make sense to test on multiple platforms to avoid e.g. JuliaComputing#159
Interesting, it doesn't say anything :P I'm not quite sure how to go about debugging this, the windows CI job also terminated without saying anything. It looks like it's the call to julia> du = similar(prob.u0); prob.f(du, prob.u0, prob.p, 0); du If it does not, we know the problem is isolated to the runtime-generated function |
|
|
We have narrowed it down to a call to |
Version v0.1.23 of JuliaSimCompiler has now been released, I hope this resolves the issue (famous last words, but nevertheless 😅 ). |
Sadly it still crashes in the call to |
Are you sure that running |
yes, I can confirm that in my Manifest.toml I have:
|
It seems like one needs to run: using PkgAuthentication
PkgAuthentication.install("juliahub.com")
using Pkg; Pkg.Registry.add()
]registry update Before one can get any updates - would be nice to at least get an error on After that, I had to slightly update the example for the new Multibody version - and then it indeed crashes for me as well :( |
Also note that on JuliaSimCompiler 0.1.21 I can solve the problem but |
Interesting, does |
Could you apply the following patch before running the script? Please let me know if it fixes your segfault issue. using LinearAlgebra
using JuliaSimCompiler: Buffer, solve2x2!, solve3x3!, _lufact!, _jscluldiv!, _free
import JuliaSimCompiler: linsolve!
@inline function linsolve!(A::Buffer{NN, T}, b::Buffer{N, T},
bound = 10eps(T)) where {N, NN, T}
if N == 2
info = @inline solve2x2!(A, b)
elseif N == 3
info = @inline solve3x3!(A, b)
else
ipiv = Buffer{N, Int}()
info::Int = 0
GC.@preserve ipiv A b begin
pA = pointer(A)
pb = pointer(b)
pi = pointer(ipiv)
info′ = _lufact!(pA, pi, N)
_jscluldiv!(pA, pi, N, pb, info′)
info = info′
if iszero(info′) && bound > 0
for (j, i) in enumerate(diagind(N, N))
Ai = @inbounds A[i]
if abs(Ai) < bound
info = j
end
end
end
end
_free(ipiv)
end
return info
end |
Running with JuliaSimCompiler v0.1.21, on the terminal I have the error message below when calling
|
The patch yingbo posted is related to Debugging this appears very hard, it no longer fails on windows on our CI machine 🙃 |
One more release of JSCompiler has been made, v0.1.24, where a lot of performance optimization in |
I have the same crash if I run @YingboMa's script before the springmass example. Note that I only enter N==2 and N==3 cases (not the else).
Same crash as well (with and without running the script). Should I contact you on Slack when I have availability if it helps ? |
We have now released v0.1.26 of JSCompiler and this version passes all the CI tests on windows. I hope this has finally resolved the issue! |
I tested with JSCompiler v0.1.26 and all the examples solve and render correctly... except the quadrotor example. The quadrotor solves fine, but calling The FullCar and RobotArm examples - which to me seem more complex to render than the QuadRotor- systematically render fine. |
Thanks for testing! The quadrotor with load cable is significantly more complex than the robot example, each joint in the robot has a single degree of freedom, while each joint in the cable has 3 and the body of the aircraft has 6. I know that the quadrotor example is rather slow, it's slow to Could you potentially be running out of RAM when the computer freezes? |
@SimonDanisch is experiencing lots of issues running on windows
The robot example is failing during rendering with
and with
cache=false
he instead getsIt looks like the issue stems from calling a function generated by JSCompiler with the LLVM backend.
The text was updated successfully, but these errors were encountered: