threaded compile error message
Added by David Stanford about 2 years ago
I'm getting the following error message when trying to do a multi-threaded compile:
%Warning-UNOPTTHREADS: AstRoot:1: Thread scheduler is unable to provide requested parallelism; consider asking for fewer threads.however, this is with --threads 2. Does this just mean we're out of luck trying to do a multi-threaded compile on this design?
Replies (7)
RE: threaded compile error message - Added by Wilson Snyder about 2 years ago
Roughly yes. It tries to look for many parallel tasks (many per thread). It can't find enough, but you may still if lucky get parallelism, even 2x if you have two perfect large mtasks.
If you run with --stats we'd be interested in the output.
RE: threaded compile error message - Added by David Stanford about 2 years ago
Well, yep looks like the parallelism factor is pretty low on this design.
Global Statistics: Assertions, PSL asserts 0 Assertions, SystemVerilog asserts 0 Assertions, cover statements 0 Assertions, full/parallel case 0 MTask graph, final, critical path cost 9203 MTask graph, final, edge count 30 MTask graph, final, mtask count 21 MTask graph, final, parallelism factor 1
RE: threaded compile error message - Added by Wilson Snyder about 2 years ago
What's the instruction count total last column? Guessing this is a fairly small design? Small designs are unlikely to parallelize well, sorry.
RE: threaded compile error message - Added by David Stanford about 2 years ago
I'm having problems disabling this warning. I've tried lint_off / lint_on as recommended in the warning message around the module, and then in a configuration file selecting a broader and broader range of files, and finally calling verilator with -Wno-UNOPTTHREADS all to no avail.
RE: threaded compile error message - Added by Wilson Snyder about 2 years ago
It isn't associated with an exact file so the inline pragma won't work. However we have several self tests that check -Wno-UNOPTTHREADS works, are you sure that flag is making it through to Verilator?
BTW -Wno-fatal might help in the meantime.
RE: threaded compile error message - Added by David Stanford about 2 years ago
Stage Statistics: Stat Link PreOrder Scoped Final Final_Fast -------- ------- ------- ------- ------- ------- Branch prediction, 2195 146 178 139 61 Branch prediction, VL_LIKELY 54 54 54 24 Branch prediction, VL_UNLIKELY 29 59 Instruction count, TOTAL 172196 238398 229845 239864 6588 Instruction count, fast critical 0 40792 38746 43692 4738
And my problem was like many designs, our build process is complicated, and the -WNO-UNOPTTHREADS was getting passed to the wrong stage of the process.
RE: threaded compile error message - Added by Wilson Snyder about 2 years ago
That's small, about 5K instructions in the main loop. This suggests you might be getting around 1M cycles/second (might be quite slower). Parallelism generally needs something about 10 times or more larger, for example one design that parallelizes well is 36 million instructions giving ~1700 cycles/second unthreaded, then ~10K cycles/second threaded.