Skip to content
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

Compile error #77

Closed
aleixpinardell opened this issue Nov 7, 2016 · 13 comments
Closed

Compile error #77

aleixpinardell opened this issue Nov 7, 2016 · 13 comments

Comments

@aleixpinardell
Copy link
Member

Error while compiling Tudat for the first time:

[ 95%] Building CXX object tudat/Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/CMakeFiles/test_SphericalHarmonicPartials.dir/UnitTests/unitTestSphericalHarmonicPartials.cpp.o
In file included from /Users/aleix/Documents/tudatBundle/tudat/Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/UnitTests/unitTestSphericalHarmonicPartials.cpp:15:
In file included from /Users/aleix/Documents/tudatBundle/tudat/Tudat/../Tudat/Basics/testMacros.h:42:
In file included from /Users/aleix/Documents/tudatBundle/eigen/Eigen/Core:348:
/Users/aleix/Documents/tudatBundle/eigen/Eigen/src/Core/Product.h:200:7: error: static_assert failed "THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS"
EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS);
^ ~~~~~~~~~~~
/Users/aleix/Documents/tudatBundle/eigen/Eigen/src/Core/util/StaticAssert.h:32:40: note: expanded from macro 'EIGEN_STATIC_ASSERT'
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^ ~
/Users/aleix/Documents/tudatBundle/tudat/Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/UnitTests/unitTestSphericalHarmonicPartials.cpp:379:5: note: in instantiation of member function 'Eigen::ProductImpl<Eigen::Product<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3>, 0>, Eigen::Transpose<Eigen::Matrix<double, 3, 3, 0, 3, 3> >, 0, Eigen::Dense>::coeff' requested here
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
^
/Users/aleix/Documents/tudatBundle/tudat/Tudat/../Tudat/Basics/testMacros.h:141:52: note: expanded from macro 'TUDAT_CHECK_MATRIX_CLOSE_FRACTION'
::boost::test_tools::check_is_close( L.coeff( row, col ), R.coeff( row, col ),
^
In file included from /Users/aleix/Documents/tudatBundle/tudat/Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/UnitTests/unitTestSphericalHarmonicPartials.cpp:33:
In file included from /Users/aleix/Documents/tudatBundle/tudat/Tudat/../Tudat/SimulationSetup/EstimationSetup/createAccelerationPartials.h:18:
In file included from /Users/aleix/Documents/tudatBundle/tudat/Tudat/../Tudat/SimulationSetup/EnvironmentSetup/body.h:36:
/Users/aleix/Documents/tudatBundle/tudat/Tudat/../Tudat/Astrodynamics/SystemModels/vehicleSystems.h:78:12: warning: private field 'dryMass_' is not used [-Wunused-private-field]
double dryMass_;
^
1 warning and 1 error generated.
make[2]: *** [tudat/Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/CMakeFiles/test_SphericalHarmonicPartials.dir/UnitTests/unitTestSphericalHarmonicPartials.cpp.o] Error 1
make[1]: *** [tudat/Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/CMakeFiles/test_SphericalHarmonicPartials.dir/all] Error 2
make: *** [all] Error 2
11:03:21: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"

@DominicDirkx
Copy link
Member

Hi Aleix,

I've done some digfing on this error and it seems that it may be due to a linking issue when using CLand and the version of Eigen you have. In unitTestSphericalHarmonicPartials.cpp (line379-381), try changing:

TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
            ( nominalGradientTransformationMatrix * cumulativeSphericalHessian * nominalGradientTransformationMatrix.transpose( ) ),
            numericalTotalSphericalGradient, 1.0E-6 );

To:

Eigen::Matrix3d nominalGradientTransformationMatrixTranspose = nominalGradientTransformationMatrix.transpose( );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
( nominalGradientTransformationMatrix * cumulativeSphericalHessian * nominalGradientTransformationMatrixTranspose ),
numericalTotalSphericalGradient, 1.0E-6 );

Please post here if this fixes your problem. If it doesn't, just comment out these lines and continue compiling for now while I investigate a more robust fix

@aleixpinardell
Copy link
Member Author

No, it didn't fix the error. I commented out those lines and now I am getting this error:

[ 95%] Building CXX object tudat/Tudat/Astrodynamics/Propagators/CMakeFiles/test_EnckeStateDerivative.dir/UnitTests/unitTestEnckeStateDerivative.cpp.o
/Users/aleix/Documents/tudatBundle/tudat/Tudat/Astrodynamics/Propagators/UnitTests/unitTestEnckeStateDerivative.cpp:16:10: fatal error: 'omp.h' file not found
#include <omp.h>
^
1 error generated.
make[2]: *** [tudat/Tudat/Astrodynamics/Propagators/CMakeFiles/test_EnckeStateDerivative.dir/UnitTests/unitTestEnckeStateDerivative.cpp.o] Error 1
make[1]: *** [tudat/Tudat/Astrodynamics/Propagators/CMakeFiles/test_EnckeStateDerivative.dir/all] Error 2
make: *** [all] Error 2
11:55:47: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"

@DominicDirkx
Copy link
Member

Hi Aleix,

Ok, thanks for the quick update. I've made some small changes to the code that should fix this omp include error.

Dominic

@aleixpinardell
Copy link
Member Author

What should I compile? application_AsterixAndObelixPropagator for instance? That one is giving me the error:

[100%] Linking CXX executable /Users/aleix/Documents/tudatBundle/tudatExampleApplications/satellitePropagatorExamples/bin/applications/application_GalileoConstellationSimulator
ld: can't open output file for writing: /Users/aleix/Documents/tudatBundle/tudatExampleApplications/satellitePropagatorExamples/bin/applications/application_GalileoConstellationSimulator, errno=2 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/aleix/Documents/tudatBundle/tudatExampleApplications/satellitePropagatorExamples/bin/applications/application_GalileoConstellationSimulator] Error 1
make[1]: *** [tudatExampleApplications/satellitePropagatorExamples/SatellitePropagatorExamples/CMakeFiles/application_GalileoConstellationSimulator.dir/all] Error 2
make: *** [all] Error 2
12:16:23: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"

@DominicDirkx
Copy link
Member

Hi Aleix,

Hmmm, I think this is related to the thing we changed in your CMakeCache.txt. In this file, is 'USE_GNU:BOOL' set to OFF or ON? If it is ON, change to OFF and try recompiling.

It seems as though your Tudat folder is compiling perfectly well, and it is only the applications that are giving problems. Could you show the full Compiler output so I can verify?).

If changing the CMakeCache doesn't work, try deleting the entire build folder (and your CMakeLists.txt.user file in the tudatBundle) and try again. Make sure to keep backups of everything you delete, just in case. To expedite matters a bit, you can go to the 'Projects' tab on the side, build steps -> Details and select only the application_GalileoConstellationSimulator to compile.

This will make it a but faster to test if the changes work. Don't forget to reset it to compile everything afterwards (so you can run all tests etc.).

@DominicDirkx
Copy link
Member

Hi Aleix,

Someone else just came by with the same issue as you in unitTestSphericalHarmonicPartials. Let me know if this solves your problem as well. Also, don't hesitate to post something here in case your application still does not compile

@DominicDirkx
Copy link
Member

What I meant to say: I have committed a fix to the repo for the error in unitTestSphericalHarmonicPartials

@aleixpinardell
Copy link
Member Author

I am getting an error because it is trying to compile the old spaceProjectLro.cpp, but I don't know how to tell it not to...

How do I remove this?
screen shot 2016-11-07 at 15 00 55

@aleixpinardell
Copy link
Member Author

If I check only application_GalileoConstellationSimulator it compiles successfully but I get this runtime error:

Starting /Users/aleix/Documents/tudatBundle/tudatExampleApplications/satellitePropagatorExamples/bin/applications/application_SinglePerturbedSatellitePropagator...
Warning, position of Mars taken as barycenter of that body's planetary system.
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error when making flight conditions, no atmosphere is found
The program has unexpectedly finished.
/Users/aleix/Documents/tudatBundle/tudatExampleApplications/satellitePropagatorExamples/bin/applications/application_SinglePerturbedSatellitePropagator crashed

@DominicDirkx
Copy link
Member

Hi Aleix,

It seems that you are running the application_SinglePerturbedSatellitePropagator, not the application_GalileoConstellationSimulator. However, this is a but odd, since neither should crash. Could you compile both, and run both and see what happens?

@DominicDirkx
Copy link
Member

Concerning the space project question, depending on where you put it (TemplateApplication?), just comment out the relevant part of the CMakeLists. For instance, if it's the space project code is in the TemplateApplication folder, you can just comment out the last row of the top-level CMakeLists.

If this doesn't clear it up, just let me know by posting here.

@aleixpinardell
Copy link
Member Author

I am still getting the same runtime error when I check both application_SinglePerturbedSatellitePropagator and application_GalileoConstellationSimulator

@DominicDirkx
Copy link
Member

Just as a note, we found the error, originating in the FlightConditions. A patch for the error will be uploaded today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants