Tudat / tudat

NOTE: This Tudat version is no longer supported. See https://docs.tudat.space/en/stable/ and https://github.com/tudat-team/tudat-bundle for the new version
BSD 3-Clause "New" or "Revised" License
87 stars 142 forks source link

Test failures using Clang (7.0.2) on Mac OS X El Capitan #13

Closed kartikkumar closed 7 years ago

kartikkumar commented 8 years ago

Managed to build the current version of Tudat on my Macbook Air but a number of tests are failing.

The following tests FAILED:
      2 - test_AerodynamicsNamespace (Failed)
      7 - test_OrbitalElementConversions (Failed)
     10 - test_MeanToEccentricAnomalyConversion (Failed)
     11 - test_MeanToHyperbolicEccentricAnomalyConversion (Failed)

Digging deeper, these are the individual problems:

test_AerodynamicsNamespace

Assertion failed: ((m_fraction_tolerance >= FPT(0))&&("tolerance must not be negative!")), function close_at_tolerance, file /usr/local/include/boost/test/tools/floating_point_comparison.hpp, line 217. unknown location:0: fatal error: in "test_aerodynamics_namespace/testAerodynamicNamespacePressureFunctions": signal: SIGABRT (application abort requested) tudat/Tudat/Astrodynamics/Aerodynamics/UnitTests/unitTestAerodynamicsNamespace.cpp:134: last checkpoint

test_OrbitalElementConversions

tudat/Tudat/Astrodynamics/BasicAstrodynamics/UnitTests/unitTestOrbitalElementConversions.cpp:774: error: in "test_orbital_element_conversions/testCartesianToKeplerianElementConversionBackAndForth": Element [0, 0] not within expected tolerance (delta 1.136868e-11): expected 158.589341, was 158.589341, tolerance 5.000000e-14 .

test_MeanToEccentricAnomalyConversion

Assertion failed: (min_arg < max_arg), function uniform_real_distribution, file /usr/local/include/boost/random/uniform_real_distribution.hpp, line 159. unknown location:0: fatal error: in "test_mean_to_eccentric_anomaly_conversion/test_convertMeanAnomalyToEccentricAnomaly_nearParabolic_random_double": signal: SIGABRT (application abort requested) tudat/Tudat/Astrodynamics/BasicAstrodynamics/UnitTests/unitTestConvertMeanAnomalyToEccentricAnomaly.cpp:416: last checkpoint: "test_convertMeanAnomalyToEccentricAnomaly_nearParabolic_random_double" entry.

test_MeanToHyperbolicEccentricAnomalyConversion

Assertion failed: (min_arg < max_arg), function uniform_real_distribution, file /usr/local/include/boost/random/uniform_real_distribution.hpp, line 159. unknown location:0: fatal error: in "test_mean_to_hyperbolic_eccentric_anomaly_conversion/test_convertMeanAnomalyToEccentricAnomaly_nearParabolic_random_double": signal: SIGABRT (application abort requested) tudat/Tudat/Astrodynamics/BasicAstrodynamics/UnitTests/unitTestConvertMeanAnomalyToHyperbolicEccentricAnomaly.cpp:367: last checkpoint: "test_convertMeanAnomalyToEccentricAnomaly_nearParabolic_random_double" entry.

DominicDirkx commented 8 years ago

Hi Kartik,

Thanks for running these tests! Three of the issues seem to come from boost, and I'm guessing that you're running a newer version of boost, which has some more stringent checks incorporated. We've tested the code with boost 1.57. Which version of boost are you using? We'll get to work on updating the code to make sure these issues don't pop up.

What is the difference between the expected and computed values in the test_OrbitalElementConversions failure?

Did you have any other issues getting the new setup to work on a Mac?

Dominic

kartikkumar commented 8 years ago

Hi Dominic,

Yea I'm using Boost 1.60. Looks like the Random library in Boost has breaking changes?

The code otherwise seems to compile fine on my Mac, which is great, because there were some issues compiling with Clang that I didn't have time to work out.

The orbital elements conversion test is really weird, as the tolerance is set to 10^-14 and the test is failing with delta 1.136868e-11. Not sure what's going on there.

DominicDirkx commented 8 years ago

Hi Kartik,

Thanks for the details, indeed a pretty weird and large failure of the tes. One more question, is it the test called from line 825 (double) of that called from line 826 (long double) that is failing? Looking at the tolerance I'm presuming it's the former?

DominicDirkx commented 8 years ago

Hi Kartik,

I've made some modifications that I hope should address 3 of the 4 points (not yet the test_OrbitalElementConversions). Could you check if the changes in this pull request: https://github.com/Tudat/tudat/pull/18 work?

kartikkumar commented 8 years ago

It addresses all 3 SIGABRT issues but now there's one more FP error:

test_AerodynamicsNamespace

Tudat/Astrodynamics/Aerodynamics/UnitTests/unitTestAerodynamicsNamespace.cpp:174: error: in "test_aerodynamics_namespace/testAerodynamicNamespacePressureFunctions": difference{1.7486e-16} between vacuumPressureCoefficient_{-0.0099206349206349201} and expectedVacuumPressureCoefficient_{-0.0099206349206349218} exceeds -1.0079999999999999e-11

Also kinda weird.

Investigated a bit and seems like the orbital element conversions failure comes from line 825:

convertNonCircularNonEquatorialOrbitBackAndForth< double >( 5.0E-15 );

DominicDirkx commented 8 years ago

Hi Kartik,

Thanks a lot for taking the time to run and test the code again. The first issue should be fixed now, I'm pretty sure it was a case of a negative tolerance.

I'll investigate the orbital element conversions error further in the coming week,

Dominic

DominicDirkx commented 7 years ago

This issue has since been addressed in a past update.