NervanaSystems / ngraph

nGraph has moved to OpenVINO
https://www.ngraph.ai/
Apache License 2.0
1.35k stars 221 forks source link

Mismatch template compile error #1124

Closed DavidBrayford closed 6 years ago

DavidBrayford commented 6 years ago

When trying to build ngraph with gcc version 7 and icc version 18 I get the following template mismatch error.

cd /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/build/src/ngraph && /lrz/sys/compilers/gcc/7.3.0/bin/g++ -DLIBRARY_VERSION=\"0.3.0+9441ea0\" -DSHARED_LIB_EXT=\".so\" -Dngraph_EXPORTS -I/home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph -I/home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src -isystem /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/build/json/src/ext_json/include -DEIGEN_MPL2_ONLY -std=c++11 -march=native -O2 -fPIE -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fstack-protector-strong -DNGRAPH_CPU_ENABLE -DIN_NGRAPH_LIBRARY -DGRAPHVIZ_FOUND -fPIC -o CMakeFiles/ngraph.dir/autodiff/adjoints.cpp.o -c /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/autodiff/adjoints.cpp In file included from /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/op/constant.hpp:25:0, from /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/autodiff/adjoints.cpp:29: /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/util.hpp:232:9: error: template-id ‘check_fp_values<double, std::isinf>’ for ‘void ngraph::check_fp_values(const char, const double, size_t)’ does not match any template declaration check_fp_values<double, std::isinf>(const char name, const double array, size_t n); ^~~~~~~~~~~ /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/util.hpp:213:10: note: candidate is: template<class T, bool ( func)(T)> void ngraph::check_fp_values(const char, const T, size_t) void check_fp_values(const char name, const T array, size_t n) ^~~~~~~ /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/util.hpp:234:9: error: template-id ‘check_fp_values<double, std::isnan>’ for ‘void ngraph::check_fp_values(const char, const double, size_t)’ does not match any template declaration check_fp_values<double, std::isnan>(const char name, const double array, size_t n); ^~~~~~~~~~~ /home/hpc/pr28fa/di72giz/NGRAPH/ngraph/src/ngraph/util.hpp:213:10: note: candidate is: template<class T, bool ( func)(T)> void ngraph::check_fp_values(const char, const T, size_t) void check_fp_values(const char name, const T array, size_t n)

David

diyessi commented 6 years ago

Thanks for the report.

WilliamTambellini commented 6 years ago

Hi, I got the same compilation error with gcc 6.1 : [ 3%] Building CXX object src/ngraph/CMakeFiles/ngraph.dir/autodiff/adjoints.cpp.o cd /home/wtambellini/repos/ngraph/build/src/ngraph && /usr/lib64/ccache/c++ -DNGRAPH_VERSION=\"0.5.0+ad12723\" -DSHARED_LIB_EXT=\".so\" -Dngraph_EXPORTS -I/home/wtambellini/repos/ngraph/src/ngraph -I/home/wtambellini/repos/ngraph/src -isystem /home/wtambellini/repos/ngraph/build/json/src/ext_json/include -DEIGEN_MPL2_ONLY -std=c++11 -march=native -O2 -fPIE -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fstack-protector-strong -DNGRAPH_CPU_ENABLE -DIN_NGRAPH_LIBRARY -DGRAPHVIZ_FOUND -fPIC -o CMakeFiles/ngraph.dir/autodiff/adjoints.cpp.o -c /home/wtambellini/repos/ngraph/src/ngraph/autodiff/adjoints.cpp In file included from /home/wtambellini/repos/ngraph/src/ngraph/op/constant.hpp:25:0, from /home/wtambellini/repos/ngraph/src/ngraph/autodiff/adjoints.cpp:29: /home/wtambellini/repos/ngraph/src/ngraph/util.hpp:235:9: error: template-id ‘check_fp_values<double, std::isinf>’ for ‘void ngraph::check_fp_values(const char, const double, size_t)’ does not match any template declaration check_fp_values<double, std::isinf>(const char name, const double array, size_t n); ^~~~~~~~~~~ /home/wtambellini/repos/ngraph/src/ngraph/util.hpp:216:10: note: candidate is: template<class T, bool ( func)(T)> void ngraph::check_fp_values(const char, const T, size_t) void check_fp_values(const char name, const T array, size_t n) ^~~~~~~ /home/wtambellini/repos/ngraph/src/ngraph/util.hpp:237:9: error: template-id ‘check_fp_values<double, std::isnan>’ for ‘void ngraph::check_fp_values(const char, const double, size_t)’ does not match any template declaration check_fp_values<double, std::isnan>(const char name, const double array, size_t n); ^~~~~~~~~~~ /home/wtambellini/repos/ngraph/src/ngraph/util.hpp:216:10: note: candidate is: template<class T, bool ( func)(T)> void ngraph::check_fp_values(const char, const T, size_t) void check_fp_values(const char name, const T array, size_t n) ^~~~~~~

WilliamTambellini commented 6 years ago

Seems to pass with gcc 5.3.0.

DavidBrayford commented 6 years ago

I still get the same error with the Intel compilers.

diyessi commented 6 years ago

We don't support icc at this time.

rkimballn1 commented 6 years ago

I was able to successfully build with gcc 7.3.0 (Ubuntu 7.3.0-16ubuntu3) on Ubuntu 18.04 against the tip of master, hash 5927bbe4df3a27254afd4ae7a9e1f11996dd901c. @DavidBrayford what linux distro are you using?

DavidBrayford commented 6 years ago

I am using SLES12.

rkimballn1 commented 6 years ago

I am now able to reproduce using openSUSE Leap 42.3 and gcc 7.3.0 on Windows Subsystem for Linux. Gotta love that WSL.

rkimballn1 commented 6 years ago

@DavidBrayford I have a fix on branch bob/suse. Can you give it a go and let me know if it is working for you? I have opened a PR #1284 for this issue.

rkimballn1 commented 6 years ago

This issues is fixed in PR #1284