Open giordano opened 1 year ago
oh yeah that's better, same logic as https://github.com/niklas-heer/speed-comparison/pull/51/files#diff-85e0272e1f01d03ce8049536a346d2628b17d12e4e60a1fa6d79fad740478605R3
Static compilation will probably not like this one, ooops :sweat_smile:
For me this is not as quick locally, but maybe just a quirk of my CPU?
Edit: fixed now.
It seems to have broken then compiled Julia version. https://github.com/niklas-heer/speed-comparison/actions/runs/3275378446/jobs/5390146368#step:6:1598
Yes, I know :slightly_smiling_face: Someone else is looking into whether StaticCompiler.jl can handle this. It's all very experimental :sweat_smile:
Note also that these behave differently at small n
:
julia> g(i) = 4 / i;
julia> f_1st(rounds) = sum(g, (-2 * rounds + 1):4:(2 * rounds));
julia> f_2nd(n) = sum(i -> 4/(4i-2n-3), 1:n);
julia> hcat(f_orig.(1:10), f_1st.(1:10), f_2nd.(1:10))
10×3 Matrix{Float64}:
3.46667 -4.0 -4.0
2.89524 2.66667 2.66667
3.33968 -3.46667 -3.46667
2.97605 2.89524 2.89524
3.28374 -3.33968 -3.33968
3.01707 2.97605 2.97605
3.25237 -3.28374 -3.28374
3.04184 3.01707 3.01707
3.23232 -3.25237 -3.25237
3.0584 3.04184 3.04184
@giordano ah okay, that is what you meant by that. Got it 👍
@giordano I had to update it due to #66
The compiled version still seems broken.
+julia-compiled *failed* | ERROR Earthfile line 205:2
+julia-compiled *failed* | The command
+julia-compiled *failed* | RUN julia -e 'using Pkg; Pkg.add(name="StaticTools", version="0.8"); Pkg.add(name="StaticCompiler", version="0.4"); include("./leibniz_compiled.jl"); compile_executable(mainjl, (), "./")'
+julia-compiled *failed* | did not complete successfully. Exit code 1
Share your logs with an Earthly account (experimental)! Register for one at https://ci.earthly.dev.
Error: build target: build main: failed to solve: process "/bin/sh -c EARTHLY_LOCALLY=false JULIA_GPG=3673DF529D9049477F76B37566E3C7DC03D6E495 JULIA_PATH=/usr/local/julia JULIA_VERSION=1.8.2 PATH=/usr/local/julia/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin iterations=3 timeas=second warmups=2 /usr/bin/earth_debugger /bin/sh -c 'julia -e '\"'\"'using Pkg; Pkg.add(name=\"StaticTools\", version=\"0.8\"); Pkg.add(name=\"StaticCompiler\", version=\"0.4\"); include(\"./leibniz_compiled.jl\"); compile_executable(mainjl, (), \"./\")'\"'\"''" did not complete successfully: exit code: 1
Error: Process completed with exit code 1.
Yeah, we're hoping https://github.com/tshort/StaticCompiler.jl/pull/85 will help with that
I guess we are still waiting for https://github.com/tshort/StaticCompiler.jl/pull/89?
Yes, which in the meantime became https://github.com/tshort/StaticCompiler.jl/pull/90 (they're having some git-induced troubles over there)
As it turns out. Git is hard :smile_cat:
Got it 👍 Just let me know when I should test it again through the CI @giordano
As it turns out. Git is hard 😸
Hahaha. Yes, that is very true 😄
Follow up to #52. CC @mcabbott