[Question] How to fix the order in which commands run? #4673
Replies: 4 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.
-
I'm working on a repo where running
scons
results in 12 commands being run. For optimal performance, many commands can be run in parallel (see "Optimal Order of Commands" below). I believe ourscons
configuration 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 tellscons
to parallelize the offending commands?Scons configuration files
Optimal Order of Commands
Commands resulting from
scons
g++ -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.cc
g++ -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.cc
g++ -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.cc
g++ -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.cc
cythonize opendbc/can/packer_pyx.pyx
cythonize opendbc/can/parser_pyx.pyx
python3 opendbc/dbc/generator/generator.py
g++ -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.cpp
g++ -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.cpp
g++ -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/lib
g++ -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 -ldbc
g++ -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 -lre2
Why I believe the command order is sub-optimal
Beta Was this translation helpful? Give feedback.
All reactions