Skip to content

Collected fixes for PPC64LE #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f16e15b
test script.
jzmaddock Feb 6, 2021
1f89e91
touch
jzmaddock Feb 6, 2021
dcac32d
Try installing g++ on host
jzmaddock Feb 6, 2021
5bcfb13
Make that gcc that's installed, add git as well.
jzmaddock Feb 6, 2021
9b910e8
Try again with build-essentials package.
jzmaddock Feb 6, 2021
1504ebd
Try with sudo.
jzmaddock Feb 6, 2021
bf337e0
Try install example from net.
jzmaddock Feb 6, 2021
6a3a701
probe apt.
jzmaddock Feb 6, 2021
d3126d2
Another try.
jzmaddock Feb 6, 2021
f85c319
Try installing more packages
jzmaddock Feb 6, 2021
070d8f8
Try and actually build something
jzmaddock Feb 6, 2021
8353db5
Correct script name, use dependency install script.
jzmaddock Feb 6, 2021
c60095e
Correct git submodule checkout.
jzmaddock Feb 6, 2021
561e892
More corrections, add first test case.
jzmaddock Feb 6, 2021
23ded03
Grrr, fix directort paths in script.
jzmaddock Feb 6, 2021
85e618d
switch to ppc64le
jzmaddock Feb 6, 2021
cb146bf
Disable long double support if it's a "double double".
jzmaddock Feb 7, 2021
d1b2c7e
Correct BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS selection logic.
jzmaddock Feb 7, 2021
f371e87
Fix up test programs to work with BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNC…
jzmaddock Feb 7, 2021
92cf7ec
Tidy up more failing tests.
jzmaddock Feb 8, 2021
13260b3
Update CI to use tentative multiprecision fix.
jzmaddock Feb 8, 2021
dd13562
Fix up more tests for PPC64.
jzmaddock Feb 8, 2021
3923b27
Merge https://github.com/jzmaddock/math into t
jzmaddock Feb 8, 2021
e7d1d5b
Merge collected PPC64LE fixes.
jzmaddock Feb 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/boost/math/tools/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
//
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
#if !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) && (LDBL_MANT_DIG == 106) && (LDBL_MIN_EXP > DBL_MIN_EXP)
//
// Generic catch all case for gcc's "double-double" long double type.
// We do not support this as it's not even remotely IEEE conforming:
//
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
//
// Intel compiler prior to version 10 has sporadic problems
Expand Down
4 changes: 4 additions & 0 deletions test/bivariate_statistics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ int main()
{
test_covariance<float>();
test_covariance<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_covariance<long double>();
#endif
test_covariance<cpp_bin_float_50>();

test_integer_covariance<int>();
Expand All @@ -620,7 +622,9 @@ int main()

test_correlation_coefficient<float>();
test_correlation_coefficient<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_correlation_coefficient<long double>();
#endif
test_correlation_coefficient<cpp_bin_float_50>();

test_integer_correlation_coefficient<int>();
Expand Down
13 changes: 12 additions & 1 deletion test/cardinal_b_spline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,33 @@ int main()
{
test_box<float>();
test_box<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_box<long double>();
#endif

test_hat<float>();
test_hat<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_hat<long double>();
#endif

test_quadratic<float>();
test_quadratic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quadratic<long double>();
#endif

test_cubic<float>();
test_cubic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_cubic<long double>();
#endif

test_quintic<float>();
test_quintic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quintic<long double>();
#endif

test_partition_of_unity<1, double>();
test_partition_of_unity<2, double>();
Expand All @@ -269,14 +279,15 @@ int main()
test_b_spline_derivatives<8, double>();
test_b_spline_derivatives<9, double>();

#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_b_spline_derivatives<3, long double>();
test_b_spline_derivatives<4, long double>();
test_b_spline_derivatives<5, long double>();
test_b_spline_derivatives<6, long double>();
test_b_spline_derivatives<7, long double>();
test_b_spline_derivatives<8, long double>();
test_b_spline_derivatives<9, long double>();

#endif

#ifdef BOOST_HAS_FLOAT128
test_box<float128>();
Expand Down
12 changes: 12 additions & 0 deletions test/cardinal_cubic_b_spline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,32 +318,44 @@ BOOST_AUTO_TEST_CASE(test_cubic_b_spline)
{
test_b3_spline<float>();
test_b3_spline<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_b3_spline<long double>();
#endif
test_b3_spline<cpp_bin_float_50>();

test_interpolation_condition<float>();
test_interpolation_condition<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_interpolation_condition<long double>();
#endif
test_interpolation_condition<cpp_bin_float_50>();

test_constant_function<float>();
test_constant_function<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_constant_function<long double>();
#endif
test_constant_function<cpp_bin_float_50>();

test_affine_function<float>();
test_affine_function<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_affine_function<long double>();
#endif
test_affine_function<cpp_bin_float_50>();

test_quadratic_function<float>();
test_quadratic_function<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quadratic_function<long double>();
#endif
test_affine_function<cpp_bin_float_50>();

test_trig_function<float>();
test_trig_function<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_trig_function<long double>();
#endif
test_trig_function<cpp_bin_float_50>();

test_copy_move<double>();
Expand Down
7 changes: 6 additions & 1 deletion test/cardinal_quadratic_b_spline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,19 @@ int main()
{
test_constant<float>();
test_constant<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_constant<long double>();
#endif

test_linear<float>();
test_linear<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_linear<long double>();
#endif

test_quadratic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quadratic<long double>();

#endif
return boost::math::test::report_errors();
}
13 changes: 12 additions & 1 deletion test/cardinal_quintic_b_spline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,24 +267,35 @@ void test_quadratic_estimate_derivatives()
int main()
{
test_constant<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_constant<long double>();
#endif

test_constant_estimate_derivatives<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_constant_estimate_derivatives<long double>();
#endif

test_linear<float>();
test_linear<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_linear<long double>();
#endif

test_linear_estimate_derivatives<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_linear_estimate_derivatives<long double>();
#endif

test_quadratic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quadratic<long double>();
#endif

test_quadratic_estimate_derivatives<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quadratic_estimate_derivatives<long double>();

#endif

#ifdef BOOST_HAS_FLOAT128
test_constant<float128>();
Expand Down
2 changes: 2 additions & 0 deletions test/catmull_rom_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ BOOST_AUTO_TEST_CASE(catmull_rom_test)
test_alpha_distance<double>();

test_linear<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_linear<long double>();
#endif

test_circle<float>();
test_circle<double>();
Expand Down
6 changes: 6 additions & 0 deletions test/chebyshev_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,23 @@ int main()
{
test_polynomials<float>();
test_polynomials<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_polynomials<long double>();
#endif
test_polynomials<cpp_bin_float_quad>();

test_derivatives<float>();
test_derivatives<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_derivatives<long double>();
#endif
test_derivatives<cpp_bin_float_quad>();

test_clenshaw_recurrence<float>();
test_clenshaw_recurrence<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_clenshaw_recurrence<long double>();
#endif

test_translated_clenshaw_recurrence<double>();
return boost::math::test::report_errors();
Expand Down
2 changes: 2 additions & 0 deletions test/compile_test/sf_bernoulli_incl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ void compile_and_link_test()
#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
constexpr float ce_f = boost::math::unchecked_bernoulli_b2n<float>(2);
constexpr float ce_d = boost::math::unchecked_bernoulli_b2n<double>(2);
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
constexpr float ce_l = boost::math::unchecked_bernoulli_b2n<long double>(2);
std::ostream cnull(0);
cnull << ce_f << ce_d << ce_l << std::endl;
#endif
#endif
}
6 changes: 6 additions & 0 deletions test/exp_sinh_quadrature_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,14 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#ifdef TEST3
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_left_limit_infinite<long double>();
test_right_limit_infinite<long double>();
test_nr_examples<long double>();
test_crc<long double>();
#endif
#endif
#endif
#ifdef TEST4
test_left_limit_infinite<cpp_bin_float_quad>();
test_right_limit_infinite<cpp_bin_float_quad>();
Expand Down Expand Up @@ -620,13 +622,17 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
#ifdef TEST8
test_complex_modified_bessel<std::complex<float>>();
test_complex_modified_bessel<std::complex<double>>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_complex_modified_bessel<std::complex<long double>>();
#endif
test_complex_modified_bessel<boost::multiprecision::cpp_complex_quad>();
#endif
#ifdef TEST9
test_complex_exponential_integral_E1<std::complex<float>>();
test_complex_exponential_integral_E1<std::complex<double>>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_complex_exponential_integral_E1<std::complex<long double>>();
#endif
test_complex_exponential_integral_E1<boost::multiprecision::cpp_complex_quad>();
#endif
#ifdef TEST10
Expand Down
8 changes: 8 additions & 0 deletions test/gegenbauer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,26 @@ int main()
{
test_parity<float>();
test_parity<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_parity<long double>();
#endif

test_quadratic<float>();
test_quadratic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_quadratic<long double>();
#endif

test_cubic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_cubic<long double>();
#endif

test_derivative<float>();
test_derivative<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_derivative<long double>();
#endif

#ifdef BOOST_HAS_FLOAT128
test_quadratic<boost::multiprecision::float128>();
Expand Down
6 changes: 6 additions & 0 deletions test/jacobi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,21 @@ void test_derivative()
int main()
{
test_to_quadratic<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_to_quadratic<long double>();
#endif

test_symmetry<float>();
test_symmetry<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_symmetry<long double>();
#endif

test_derivative<float>();
test_derivative<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_derivative<long double>();
#endif

#ifdef BOOST_HAS_FLOAT128
test_to_quadratic<boost::multiprecision::float128>();
Expand Down
2 changes: 2 additions & 0 deletions test/legendre_stieltjes_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ void test_legendre_stieltjes()
BOOST_AUTO_TEST_CASE(LegendreStieltjesZeros)
{
test_legendre_stieltjes<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_legendre_stieltjes<long double>();
#endif
test_legendre_stieltjes<cpp_bin_float_quad>();
//test_legendre_stieltjes<boost::multiprecision::cpp_bin_float_100>();
}
8 changes: 8 additions & 0 deletions test/linear_regression_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,26 +252,34 @@ int main()
{
test_line<float>();
test_line<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_line<long double>();
#endif
test_integer_line<int>();
test_integer_line<int32_t>();
test_integer_line<int64_t>();
test_integer_line<uint32_t>();

test_constant<float>();
test_constant<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_constant<long double>();
#endif
test_integer_constant<int>();
test_integer_constant<int32_t>();
test_integer_constant<int64_t>();
test_integer_constant<uint32_t>();

test_permutation_invariance<float>();
test_permutation_invariance<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_permutation_invariance<long double>();
#endif

test_scaling_relations<float>();
test_scaling_relations<double>();
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_scaling_relations<long double>();
#endif
return boost::math::test::report_errors();
}
4 changes: 3 additions & 1 deletion test/test_2F0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void expected_results()
largest_type = "(long\\s+)?double|cpp_bin_float_quad|dec_40";
#endif

#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
if (boost::math::policies::digits<double, boost::math::policies::policy<> >() != boost::math::policies::digits<long double, boost::math::policies::policy<> >())
{
add_expected_result(
Expand All @@ -45,7 +46,8 @@ void expected_results()
"a1 = a2 \\+ 0\\.5", // test data group
".*", 10, 5); // test function
}

#endif

add_expected_result(
".*", // compiler
".*", // stdlib
Expand Down
2 changes: 2 additions & 0 deletions test/test_bernoulli_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ void test(const char* name)

void test_real_concept_extra()
{
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
boost::math::concepts::real_concept tol = boost::math::tools::epsilon<boost::math::concepts::real_concept>() * 20;
for(unsigned i = 0; i <= boost::math::max_bernoulli_b2n<long double>::value; ++i)
{
Expand All @@ -219,6 +220,7 @@ void test_real_concept_extra()
BOOST_CHECK(r <= -boost::math::tools::max_value<boost::math::concepts::real_concept>());
}
}
#endif
}


Expand Down
Loading