Repository navigation
Recent Nim makes Weave crash #171
Description
Activity
- changed the title
[-]Recent Nim make Weave crash[/-][+]Recent Nim makes Weave crash[/+]on Mar 14, 2021 It seems the other way round. Weave uncovers a bug in the recent Nim compiler.
I've tried a bit to isolate the problem.
I've found that state_machine/decline_thief.nim
triggers the error and only in the very last to linessynthesize(declineReqFSA): proc decline*(req: sink StealRequest) {.gcsafe, raises: [].}
I hope this helps a bit. Unfortunately, I haven't understood synthesis yet, so it's hard for me to
isolate the code which provokes the compiler error further.Reacted by Mamy Ratsimbazafy and Regis CaillaudI think this issue should be fixed by nim-lang/Nim#17657
It would be great if someone can think of a reproducible issue without weave. Anyway
weaveshould be added to important packages.
nim-lang/Nim#17665Thanks!
BTW CI failed(nim-lang/Nim#17665)
https://github.com/nim-lang/Nim/pull/17665/checks?check_run_id=2286001568/home/runner/work/Nim/Nim/pkgstemp/weave/weave/parallel_for.nim(417, 19) template/generic instantiation of `parallelFor` from here /home/runner/work/Nim/Nim/pkgstemp/weave/weave/parallel_for.nim(172, 16) Error: redefinition of 'CapturedTy'; previous declaration here: /home/runner/work/Nim/Nim/pkgstemp/weave/weave/parallel_for.nim(172, 16) stack trace: (most recent call last)
I can reproduce this error iff I try to compile
weave/parallel_for.nimitself.
But, when I compile a nim source file which usesparallelForthere are no problems at all ( checked with several source files)
Unfortunately, I don't understand the logic ofWeavebut I think it must compileweave/parallel_for.nimon the fly when
I useimport weavewhich in turn importsweave/[ parallel_tasks, parallel_for, parallel_for_staged, runtime], weave/state_machines/[sync_root, sync, sync_scope], weave/datatypes/flowvars, weave/cross_thread_com/flow_events, weave/contexts, weave/[executor, parallel_jobs]Reacted by ringaboutThis bug is a bit of a shame since I just built a general high level interface for embarassingly parallel problems based on Weave and it effectively kept all of my components that will make use of it on nim <= 1.4.4.
As a side note, on 1.4.4 the interface (and therefore Weave) works like a charm and the performance beats the pants off things like Numba. Color me impressed! :)
The bug has been fixed in the current developing version of Nim.
Reacted by Primate Kidlatest error messages:
======================================================================================== 2022-01-08T04:23:39.3361153Z In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:55, 2022-01-08T04:23:39.3362046Z from /usr/lib/gcc/x86_64-linux-gnu/9/include/x86intrin.h:32, 2022-01-08T04:23:39.3362802Z from /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:21: 2022-01-08T04:23:39.3365163Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c: In function ‘gebb_ukernel_float64_x86_AVX512__gemm95weave95nestable_1817’: 2022-01-08T04:23:39.3367566Z /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h:325:1: error: inlining failed in call to always_inline ‘_mm512_setzero_pd’: target specific option mismatch 2022-01-08T04:23:39.3368640Z 325 | _mm512_setzero_pd (void) 2022-01-08T04:23:39.3369040Z | ^~~~~~~~~~~~~~~~~ 2022-01-08T04:23:39.3370382Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:7599:11: note: called from here 2022-01-08T04:23:39.3371252Z 7599 | AB13_1 = _mm512_setzero_pd(); 2022-01-08T04:23:39.3372125Z | ^~~~~~~~~~~~~~~~~~~ 2022-01-08T04:23:39.3372924Z In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:55, 2022-01-08T04:23:39.3373789Z from /usr/lib/gcc/x86_64-linux-gnu/9/include/x86intrin.h:32, 2022-01-08T04:23:39.3374535Z from /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:21: 2022-01-08T04:23:39.3375973Z /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h:325:1: error: inlining failed in call to always_inline ‘_mm512_setzero_pd’: target specific option mismatch 2022-01-08T04:23:39.3376742Z 325 | _mm512_setzero_pd (void) 2022-01-08T04:23:39.3377097Z | ^~~~~~~~~~~~~~~~~ 2022-01-08T04:23:39.3377834Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:7596:11: note: called from here 2022-01-08T04:23:39.3378487Z 7596 | AB13_0 = _mm512_setzero_pd(); 2022-01-08T04:23:39.3378862Z | ^~~~~~~~~~~~~~~~~~~ 2022-01-08T04:23:39.3379800Z In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:55, 2022-01-08T04:23:39.3380675Z from /usr/lib/gcc/x86_64-linux-gnu/9/include/x86intrin.h:32, 2022-01-08T04:23:39.3381429Z from /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:21: 2022-01-08T04:23:39.3383222Z /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h:325:1: error: inlining failed in call to always_inline ‘_mm512_setzero_pd’: target specific option mismatch 2022-01-08T04:23:39.3384051Z 325 | _mm512_setzero_pd (void) 2022-01-08T04:23:39.3384391Z | ^~~~~~~~~~~~~~~~~ 2022-01-08T04:23:39.3386232Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:7593:11: note: called from here 2022-01-08T04:23:39.3387109Z 7593 | AB12_1 = _mm512_setzero_pd(); 2022-01-08T04:23:39.3387575Z | ^~~~~~~~~~~~~~~~~~~ 2022-01-08T04:23:39.3388882Z compilation terminated due to -fmax-errors=3. 2022-01-08T04:23:39.3395635Z Error: execution of an external compiler program 'gcc -c -w -fmax-errors=3 -pthread -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/Nim/Nim/lib -I/home/runner/work/Nim/Nim/pkgstemp/weave/benchmarks/matmul_gemm_blas/gemm_pure_nim -o /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c.o /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c' failed with exit code: 1
This is with Nim devel from today