NVlabs / timeloop

Timeloop performs modeling, mapping and code-generation for tensor algebra workloads on various accelerator architectures.
https://timeloop.csail.mit.edu/
BSD 3-Clause "New" or "Revised" License
340 stars 104 forks source link

Scons build error whith gcc 9.3/7.5 #34

Closed egiacomin closed 4 years ago

egiacomin commented 4 years ago

Hello,

When try to build accelergy and/or timeloop with gcc 9.3 (whether with scons --accelergy or scons -j4, I get an error:

scons: Reading SConscript files ... Using dynamic linking. scons: done reading SConscript files. scons: Building targets ... g++ -o build/mapspaces/mapspace-base.o -c -g -O3 -Werror -Wall -Wextra -fmax-errors=1 -std=c++14 -pthread -DBUILD_BASE_DIR=\"/home/egiacomi/timeloop-dev/timeloop\" -DUSE_ACCELERGY -Ibuild/src/include -Isrc/src/include -Ibuild -Isrc src/mapspaces/mapspace-base.cpp In file included from src/mapspaces/mapspace-base.cpp:28: src/mapspaces/mapspace-base.hpp:30:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 30 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. scons: *** [build/mapspaces/mapspace-base.o] Error 1 scons: building terminated because of errors.

When switching to gcc 7.5 (I did not tried other versions), scons --accelergy runs sucessfully. However, I am still having an error when running scons -j4:

g++ -o build/applications/model/main.o -c -g -O3 -Werror -Wall -Wextra -fmax-errors=1 -std=c++14 -pthread -DBUILD_BASE_DIR=\"/home/egiacomi/timeloop-dev/timeloop\" -Ibuild/src/include -Isrc/src/include -Ibuild -Isrc src/applications/model/main.cpp In file included from src/applications/metrics/main.cpp:32:0: src/applications/metrics/metrics.hpp: In constructor ‘Application::Application(config::CompoundConfig*)’: src/applications/metrics/metrics.hpp:63:32: error: ‘arch.config::CompoundConfigNode::cConfig’ may be used uninitialized in this function [-Werror=maybe-uninitialized] config::CompoundConfigNode arch; ^~~~ cc1plus: all warnings being treated as errors scons: *** [build/applications/metrics/main.o] Error 1 scons: building terminated because of errors.

The build runs sucessfully if I remove the "-Werror" flag in the SConscript file, but I just wanted to let you know. Maybe it requires on older gcc version (5?) to compile the code? If yes, it would be worth mentioning in the Readme.

angshuman-parashar commented 4 years ago

Acknowledged. We are looking into it.

angshuman-parashar commented 4 years ago
egiacomin commented 4 years ago

Hello,

Looks like I copied the wrong output in my first comment. The one I meant to copy was some errors I obtained when using the timeloop-infrastructure tutorial from ISCA2020 like: src/loop-analysis/point-set-aahr.hpp:117:12: error: implicitly-declared ‘Point& Point::operator=(const Point&)’ is deprecated [-Werror=deprecated-copy]

But indeed this has been corrected in your new commit. It compiles correctly with gcc9.3 (haven't tried 7.5 but should work as well) on my side. Thanks for the quick fix!