[Question] How to fix the order in which commands run? #4673
Replies: 5 comments 11 replies
-
|
Have you tried using |
Beta Was this translation helpful? Give feedback.
-
|
After further investigation I now believe that |
Beta Was this translation helpful? Give feedback.
-
|
@MikeBusuttil try adding the following to your SConstruct (at the top) |
Beta Was this translation helpful? Give feedback.
-
|
Yes, if you're going to be linking, you normally need a linker tool initialized. People are more commonly focused on rebuild time (and in the pathological case: how long does it take to rebuild if there's nothing at all to rebuild), so your interest is a little different. For rebuild time, things like eliminating rescanning for dependencies (by caching implicit deps) and avoiding computing hashes (using a different decider) can help. And a little more esoterically, you can use interactive mode - just for grins you could try that. Run I've temporarily reopened this topic since comments are still happening, will close when it settles back down. |
Beta Was this translation helpful? Give feedback.
-
|
guess it settled down |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a repo where running
sconsresults in 12 commands being run. For optimal performance, many commands can be run in parallel (see "Optimal Order of Commands" below). I believe oursconsconfiguration results in sub-optimal command running. Would anyone be able to help me figure out what the current command ordering is now and how to tellsconsto parallelize the offending commands?Scons configuration files
Optimal Order of Commands
graph TB; classDef bottleneck stroke:#f00 A[g++ -o common.os<br>.3 s<br>]; B[g++ -o dbc.os<br>1.0 s<br><br><br><br><br><br><br><br>]; C[g++ -o parser.os<br>.6 s<br><br><br><br>]; D[g++ -o packer.os<br>.5 s<br><br><br>]; E[g++ -o libdbc.so - .1 s]; F[cythonize packer_pyx.pyx<br>.5 s<br><br><br>]; G[g++ -o packer_pyx.o<br>.7 s<br><br><br><br><br>]; H[g++ -o packer_pyx.so - .1 s]; I[cythonize parser_pyx.pyx<br>.6 s<br><br><br><br>]:::bottleneck; J[g++ -o parser_pyx.o<br>1.1 s<br><br><br><br><br><br><br><br><br>]:::bottleneck; K[g++ -o parser_pyx.so - .1 s]:::bottleneck; L[python3 generator.py]; Scons[Scons overhead<br>.9 s<br><br><br><br><br><br><br>]:::bottleneck; A-->E; B-->E; B-->H; B-->K; C-->E; D-->E; F-->G; G-->H; I-->J; J-->K; Scons-->A; Scons-->B; Scons-->C; Scons-->D; Scons-->F; Scons-->I; Scons-->L; Start-->Scons;Commands resulting from
sconsg++ -o opendbc/can/common.os -c -std=c++1z -DDBC_FILE_PATH='"/root/opendbc/opendbc/dbc"' -g -fPIC -O0 -Wunused -Werror -Wshadow -Wno-vla-cxx-extension -Wno-unknown-warning-option -fPIC -I. -I/usr/lib/include -I/opt/homebrew/include -I/usr/include/python3.12 opendbc/can/common.ccg++ -o opendbc/can/dbc.os -c -std=c++1z -DDBC_FILE_PATH='"/root/opendbc/opendbc/dbc"' -g -fPIC -O0 -Wunused -Werror -Wshadow -Wno-vla-cxx-extension -Wno-unknown-warning-option -fPIC -I. -I/usr/lib/include -I/opt/homebrew/include -I/usr/include/python3.12 opendbc/can/dbc.ccg++ -o opendbc/can/parser.os -c -std=c++1z -DDBC_FILE_PATH='"/root/opendbc/opendbc/dbc"' -g -fPIC -O0 -Wunused -Werror -Wshadow -Wno-vla-cxx-extension -Wno-unknown-warning-option -fPIC -I. -I/usr/lib/include -I/opt/homebrew/include -I/usr/include/python3.12 opendbc/can/parser.ccg++ -o opendbc/can/packer.os -c -std=c++1z -DDBC_FILE_PATH='"/root/opendbc/opendbc/dbc"' -g -fPIC -O0 -Wunused -Werror -Wshadow -Wno-vla-cxx-extension -Wno-unknown-warning-option -fPIC -I. -I/usr/lib/include -I/opt/homebrew/include -I/usr/include/python3.12 opendbc/can/packer.cccythonize opendbc/can/packer_pyx.pyxcythonize opendbc/can/parser_pyx.pyxpython3 opendbc/dbc/generator/generator.pyg++ -o opendbc/can/packer_pyx.o -c -std=c++1z -g -fPIC -O0 -Wunused -Wshadow -Wno-vla-cxx-extension -Wno-unknown-warning-option -Wno-#warnings -Wno-shadow -Wno-deprecated-declarations -I. -I/usr/lib/include -I/opt/homebrew/include -I/usr/include/python3.12 -I.venv/lib/python3.12/site-packages/numpy/_core/include opendbc/can/packer_pyx.cppg++ -o opendbc/can/parser_pyx.o -c -std=c++1z -g -fPIC -O0 -Wunused -Wshadow -Wno-vla-cxx-extension -Wno-unknown-warning-option -Wno-#warnings -Wno-shadow -Wno-deprecated-declarations -I. -I/usr/lib/include -I/opt/homebrew/include -I/usr/include/python3.12 -I.venv/lib/python3.12/site-packages/numpy/_core/include opendbc/can/parser_pyx.cppg++ -o opendbc/can/libdbc.so -shared opendbc/can/dbc.os opendbc/can/parser.os opendbc/can/packer.os opendbc/can/common.os -Lopendbc/can -L/opt/homebrew/libg++ -o opendbc/can/packer_pyx.so -pthread -shared -Wl,-rpath=/root/opendbc/opendbc/can opendbc/can/packer_pyx.o -Lopendbc/can -L/opt/homebrew/lib -Lopendbc/can -ldbcg++ -o opendbc/can/parser_pyx.so -pthread -shared -Wl,-rpath=/root/opendbc/opendbc/can opendbc/can/parser_pyx.o -Lopendbc/can -L/opt/homebrew/lib -Lopendbc/can -ldbc -lre2Why I believe the command order is sub-optimal
Beta Was this translation helpful? Give feedback.
All reactions