#9087 closed Support Requests (fixed)
[boost math] error: no operator "=" matches these operands in roots.hpp (297)
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | Boost 1.55.0 | Component: | math |
Version: | Boost Development Trunk | Severity: | Showstopper |
Keywords: | Cc: |
Description
I have just installed the Intel 14 C++ compiler and are now unable to build with boost math (everything was fine with previous Intel updates). Wish I can be more helpful but I have only the following error log to share (notice that I am not using the default policies though) ... and this is so even with revision 85588 trunk:
--- included log ---
/usr/local/include/boost/math/tools/roots.hpp(297): error: no operator "=" matches these operands
operand types are: std::tuple<long double &, long double &, long double &> = std::tuple<long double, long double, long double>
boost::math::tie(f0, f1, f2) = f(result);
detected during:
instantiation of "T boost::math::tools::halley_iterate(F, T, T, T, int, uintmax_t={unsigned long} &) [with F=boost::math::detail::gamma_p_inverse_func<long double, boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>,
boost::math::policies::evaluation_error<boost::math::policies::ignore_error>, boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>>, T=long double]" at line 502 of "/usr/local/include/boost/math/special_functions/detail/igamma_inverse.hpp"
instantiation of "T boost::math::detail::gamma_q_inv_imp(T, T, const Policy &) [with T=long double, Policy=boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>, boost::math::policies::evaluation_error<boost::math::policies::ignore_error>,
boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]" at line 528 of "/usr/local/include/boost/math/special_functions/detail/igamma_inverse.hpp"
instantiation of "boost::math::tools::promote_args<T1, T2, float, float, float, float>::type boost::math::gamma_q_inv(T1, T2, const Policy &) [with T1=long double, T2=long double, Policy=boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>,
boost::math::policies::evaluation_error<boost::math::policies::ignore_error>, boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]" at line 325 of "/usr/local/include/boost/math/special_functions/detail/ibeta_inverse.hpp"
instantiation of "T boost::math::detail::temme_method_3_ibeta_inverse(T, T, T, T, const Policy &) [with T=long double, Policy=boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>, boost::math::policies::evaluation_error<boost::math::policies::ignore_error>,
boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]" at line 598 of "/usr/local/include/boost/math/special_functions/detail/ibeta_inverse.hpp"
instantiation of "T boost::math::detail::ibeta_inv_imp(T, T, T, T, const Policy &, T *) [with T=long double, Policy=boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>, boost::math::policies::evaluation_error<boost::math::policies::ignore_error>,
boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]" at line 852 of "/usr/local/include/boost/math/special_functions/detail/ibeta_inverse.hpp"
instantiation of "boost::math::tools::promote_args<T1, T2, T3, T4, float, float>::type boost::math::ibeta_inv(T1, T2, T3, T4 *, const Policy &) [with T1=double, T2=double, T3=double, T4=double, Policy=psu::dist::psu_boost_policy]" at line 487 of "/usr/local/include/boost/math/distributions/beta.hpp" instantiation of "RealType boost::math::quantile(const boost::math::beta_distribution<RealType, Policy> &, const RealType &) [with RealType=double, Policy=psu::dist::psu_boost_policy]" at line 114 of "../../../psu/boost/beta.cc"
/usr/local/include/boost/math/tools/roots.hpp(297): error: no operator "=" matches these operands
operand types are: std::tuple<long double &, long double &, long double &> = std::tuple<long double, long double, long double>
boost::math::tie(f0, f1, f2) = f(result);
detected during:
instantiation of "T boost::math::tools::halley_iterate(F, T, T, T, int, uintmax_t={unsigned long} &) [with F=boost::math::detail::ibeta_roots<long double, boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>, boost::math::policies::evaluation_error<boost::math::policies::ignore_error>,
boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>>, T=long double]" at line 803 of "/usr/local/include/boost/math/special_functions/detail/ibeta_inverse.hpp"
instantiation of "T boost::math::detail::ibeta_inv_imp(T, T, T, T, const Policy &, T *) [with T=long double, Policy=boost::math::policies::policy<boost::math::policies::domain_error<boost::math::policies::ignore_error>, boost::math::policies::pole_error<boost::math::policies::ignore_error>, boost::math::policies::overflow_error<boost::math::policies::ignore_error>, boost::math::policies::evaluation_error<boost::math::policies::ignore_error>,
boost::math::policies::rounding_error<boost::math::policies::ignore_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]" at line 852 of "/usr/local/include/boost/math/special_functions/detail/ibeta_inverse.hpp"
instantiation of "boost::math::tools::promote_args<T1, T2, T3, T4, float, float>::type boost::math::ibeta_inv(T1, T2, T3, T4 *, const Policy &) [with T1=double, T2=double, T3=double, T4=double, Policy=psu::dist::psu_boost_policy]" at line 487 of "/usr/local/include/boost/math/distributions/beta.hpp" instantiation of "RealType boost::math::quantile(const boost::math::beta_distribution<RealType, Policy> &, const RealType &) [with RealType=double, Policy=psu::dist::psu_boost_policy]" at line 114 of "../../../psu/boost/beta.cc"
--- end of included log ---
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Update: I managed to get Intel-14 on Linux installed and the above test case compiles OK, but fails if you increase the tuple to 3 arguments. Filed as Intel issue 6000026407.
A workaround is to define BOOST_NO_CXX11_HDR_TUPLE - that's the fix I've committed to Boost.Config.
comment:3 by , 9 years ago
Dear John,
Thank you very much for locating the problem and putting out a workaround! And I am sorry to have made you work over the weekend! Thank you!
With best regards, HS
comment:4 by , 9 years ago
I've heard back from Intel - the test case works when Intel C++ 14 is on top of gcc-4.7.2 but not 4.6.
HTH, John.
comment:5 by , 9 years ago
Dear John,
Thank you very much for the information. I actually have another issue (see code below) using -std=c++11 on the non_central_chi_squared:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::math::evaluation_error> >'
what(): Error in function boost::math::tools::bracket_and_solve_root<e>: Unable to bracket root, last nearest value was 1.65974387253907228676e-331 Abort (core dumped)
which I built with Intel 13 and GCC 4.6.3:
icpc --version icpc (ICC) 13.1.3 20130607 g++ --version g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
The current trunk (revision 85656) also fails ... 5.39163355658688321214e+330 was the last nearest value though.
So I decided to go ahead and upgrade to Intel 14 (again) and the GCC toolchain (to 4.7):
icpc --version icpc (ICC) 14.0.0 20130728 g++ --version g++ (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
I have no problem building my original case now. However, I am unable to link ... got this "undefined reference to `builtin_signbit'" message.
Interestingly, the example
#include <cstdio> #include <boost/math/distributions.hpp> int main() { boost::math::non_central_chi_squared_distribution<> _dist( 3.0, 1.0 ); std::printf( " \nquantile(non_central_chi_squared(3,1),0.1) = %f\n", boost::math::quantile( _dist, 0.1 ) ); return 0; }
which gave me that runtime exception above, also fails to build with the same message: undefined reference to `builtin_signbit'.
Do you have any insight here? Maybe this is a problem with the Intel compiler again. :(
With best regards, HS
comment:6 by , 9 years ago
As the error message indicates it means Intel haven't implemented that GCC builtin yet. If you have an Intel support account, I suggest you file a bug report. Otherwise I might get around to it eventually....
It looks to be OK with Intel 14 on Win32... this is in C++11 mode right? Can you try the reduced test case:
Thanks, John.