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

Error while building all tests after enabling the use of Pagmo #616

Closed zabibbo closed 4 years ago

zabibbo commented 4 years ago

Dear professor,

I tried to enable the use of Pagmo in Tudat and I encountered the following issues. After having added Pagmo, I run "all" without the "test" argument in the compiler and it worked correctly. Then, I tried compiling "all" with "test" and I obtained the following error:

The following tests FAILED: 2 - ackley (Not Run) 3 - algorithm (Not Run) 4 - algorithm_type_traits (Not Run) 5 - archipelago (Not Run) 6 - archipelago_torture_test (Not Run) 7 - base_bgl_topology (Not Run) 8 - base_sr_policy (Not Run) 9 - bee_colony (Not Run) 10 - cec2006 (Not Run) 11 - cec2009 (Not Run) 12 - compass_search (Not Run) 13 - constrained (Not Run) 14 - custom_comparisons (Not Run) 15 - cstrs_self_adaptive (Not Run) 16 - de (Not Run) 17 - de1220 (Not Run) 18 - decompose (Not Run) 19 - discrepancy (Not Run) 20 - dtlz (Not Run) 21 - fair_replace (Not Run) 22 - fully_connected (Not Run) 23 - gwo (Not Run) 24 - gaco (Not Run) 25 - generic (Not Run) 26 - golomb_ruler (Not Run) 27 - gradients_and_hessians (Not Run) 28 - griewank (Not Run) 29 - hypervolume (Not Run) 30 - hock_schittkowsky_71 (Not Run) 31 - inventory (Not Run) 32 - lennard_jones (Not Run) 33 - migration_torture_test (Not Run) 34 - minlp_rastrigin (Not Run) 35 - ihs (Not Run) 36 - io (Not Run) 37 - island (Not Run) 38 - island_torture (Not Run) 39 - luksan_vlcek1 (Not Run) 40 - mbh (Not Run) 41 - moead (Not Run) 42 - multi_objective (Not Run) 43 - nsga2 (Not Run) 44 - nspso (Not Run) 45 - population (Not Run) 46 - problem (Not Run) 47 - problem_type_traits (Not Run) 48 - pso (Not Run) 49 - pso_gen (Not Run) 50 - r_policy (Not Run) 51 - rastrigin (Not Run) 52 - ring (Not Run) 53 - rng (Not Run) 54 - rng_serialization (Not Run) 55 - rosenbrock (Not Run) 56 - s_policy (Not Run) 57 - sade (Not Run) 58 - simulated_annealing (Not Run) 59 - sga (Not Run) 60 - schwefel (Not Run) 61 - sea (Not Run) 62 - select_best (Not Run) 63 - threading (Not Run) 64 - thread_island (Not Run) 65 - topology (Not Run) 66 - translate (Not Run) 67 - type_traits (Not Run) 68 - unconnected (Not Run) 69 - unconstrain (Not Run) 70 - wfg (Not Run) 71 - zdt (Not Run) 72 - cmaes (Not Run) 73 - eigen3_serialization (Not Run) 74 - xnes (Not Run) 75 - getting_started (Not Run) 76 - nsga2_example (Not Run) 77 - problem_basic (Not Run) 78 - problem_basic_gh (Not Run) 79 - problem_basic_s (Not Run) 232 - test_SimsFlanagan (Not Run)

Errors while running CTest mingw32-make.exe: *** [Makefile:72: test] Error 8 16:30:21: The process "C:\Program Files\CMake\bin\cmake.exe" exited with code 2. Error while building/deploying project TudatBundle (kit: Desktop) When executing step "CMake Build"

These are my log files: LastTest.log LastTestsFailed.log

Then, I also tried running only the "Current executable" tests and I obtained a different error.

The following tests FAILED: 2 - ackley (Not Run) 3 - algorithm (Not Run) 4 - algorithm_type_traits (Not Run) 5 - archipelago (Not Run) 6 - archipelago_torture_test (Not Run) 7 - base_bgl_topology (Not Run) 8 - base_sr_policy (Not Run) 9 - bee_colony (Not Run) 10 - cec2006 (Not Run) 11 - cec2009 (Not Run) 12 - compass_search (Not Run) 13 - constrained (Not Run) 14 - custom_comparisons (Not Run) 15 - cstrs_self_adaptive (Not Run) 16 - de (Not Run) 17 - de1220 (Not Run) 18 - decompose (Not Run) 19 - discrepancy (Not Run) 20 - dtlz (Not Run) 21 - fair_replace (Not Run) 22 - fully_connected (Not Run) 23 - gwo (Not Run) 24 - gaco (Not Run) 25 - generic (Not Run) 26 - golomb_ruler (Not Run) 27 - gradients_and_hessians (Not Run) 28 - griewank (Not Run) 29 - hypervolume (Not Run) 30 - hock_schittkowsky_71 (Not Run) 31 - inventory (Not Run) 32 - lennard_jones (Not Run) 33 - migration_torture_test (Not Run) 34 - minlp_rastrigin (Not Run) 35 - ihs (Not Run) 36 - io (Not Run) 37 - island (Not Run) 38 - island_torture (Not Run) 39 - luksan_vlcek1 (Not Run) 40 - mbh (Not Run) 41 - moead (Not Run) 42 - multi_objective (Not Run) 43 - nsga2 (Not Run) 44 - nspso (Not Run) 45 - population (Not Run) 46 - problem (Not Run) 47 - problem_type_traits (Not Run) 48 - pso (Not Run) 49 - pso_gen (Not Run) 50 - r_policy (Not Run) 51 - rastrigin (Not Run) 52 - ring (Not Run) 53 - rng (Not Run) 54 - rng_serialization (Not Run) 55 - rosenbrock (Not Run) 56 - s_policy (Not Run) 57 - sade (Not Run) 58 - simulated_annealing (Not Run) 59 - sga (Not Run) 60 - schwefel (Not Run) 61 - sea (Not Run) 62 - select_best (Not Run) 63 - threading (Not Run) 64 - thread_island (Not Run) 65 - topology (Not Run) 66 - translate (Not Run) 67 - type_traits (Not Run) 68 - unconnected (Not Run) 69 - unconstrain (Not Run) 70 - wfg (Not Run) 71 - zdt (Not Run) 72 - cmaes (Not Run) 73 - eigen3_serialization (Not Run) 74 - xnes (Not Run) 75 - getting_started (Not Run) 76 - nsga2_example (Not Run) 77 - problem_basic (Not Run) 78 - problem_basic_gh (Not Run) 79 - problem_basic_s (Not Run) 232 - test_SimsFlanagan (Not Run) Errors while running CTest mingw32-make.exe: *** [Makefile:72: test] Error 8 16:47:01: The process "C:\Program Files\CMake\bin\cmake.exe" exited with code 2. Error while building/deploying project TudatBundle (kit: Desktop) When executing step "CMake Build"

These are the corresponding log files LastTest.log LastTestsFailed.log

Operating system: Windows 10 Qt version: Qt 5.13.2

Kind regards, Benedetta

DominicDirkx commented 4 years ago

Hi Benedetta,

From the looks of it, the pagmo tests have not been compiled properly. Please post the compile output when compiling 'all' (no test argument) and I'll have a look,

Best,

Dominic

zabibbo commented 4 years ago

I tried to recompile it now and indeed you are right, there is an error message. I attach the output.

LastTestsFailed.log LastTest.log

Kind regards, Benedetta

DominicDirkx commented 4 years ago

Hi Benedetta,

Please, attach the output you get in Qt under 'Compile Output'.

Dominic

zabibbo commented 4 years ago

There it is. CompileOutput.txt

Kind regards, Benedetta

DominicDirkx commented 4 years ago

Hi Benedetta,

It looks like the path may be too long. Can you confirm that you have Tudat located in C:/tudatBundle (or D:/..., E:/..., etc.)?

Best,

Dominic

zabibbo commented 4 years ago

Yes, I confirm.

Kind regards, Benedetta

DominicDirkx commented 4 years ago

Hi Benedetta,

Then, try commenting out the associated unit tests in the CMakeLists.txt files as these compilation errors occur. There should not be many (about 5) Let me know if it works,

Dominic

zabibbo commented 4 years ago

Dear Dominic,

I am extremely sorry, I have been going through the CMakeLists.txt file for the last hour and I still do not understand what I should comment out. I also tried opening the CmakeLists.txt files of the subdirectories included in the "main" CMakeLists.txt file, but still could not find the lines where the single tests are called. Could you please give me a more specific hint on what I should change?

In tha case that this could help, this is my tudatBundle CmakeLists file: CMakeLists.txt

Kind regards, Benedetta

zabibbo commented 4 years ago

For anyone interested in this issue, it seems that I managed to solve the problem thanks to Dominic's help by changing the "build directory", which for unknown reasons was set to be a wrong one. The correct one to build is "C:\build-tudatBundle-Desktop-Release\". Now it compiles correctly, with some warnings, but no errors.

I attach an image for clarity. buildDirectory

stanspee commented 4 years ago

Dear @DominicDirkx ,

Unfortunately, I think I have kind of the same problem as the issue mentioned above. After enabling the USE_PAGMO and building with 'all' enabled I get the following compile output: CompileOutput.txt and thus the following error: " No rule to make target 'C:/tudatBundle/nlopt/src/api/../../lib/libnlopt.a', needed by 'pagmo2/tests/bee_colony.exe'. Stop. "

!!Important to mention is that this is after already commented 8 other ADD_PAGMO_TESTCASE( ) lines of the CMakeLists.txt file in C:\tudatBundle\pagmo2\tests as you suggested..

Although Benedetta(thankyou for that) mentioned that this could be caused by a wrong building directory, this seems not to be the case for me. My building directory is in line with the directory I find in my C:/.

I hope this is enough information to be able to help me, otherwise let me know. Thank you in advance.

Kind Regards, Stan

DominicDirkx commented 4 years ago

Hi Stan,

The comment to Benedetta was to comment out unit tests n Tudat, I think your issue is a but different from hers. Can you revert Pagmo to its original state, the recompile, and post the compile output here? Also, please check that 'USE_PYGMO' and 'USE_NLOPT' are both set to 'OFF' under Projects -> CMake,

Best,

Dominic

stanspee commented 4 years ago

Dominic,

After doing this, I got the following compile output: CompileOutput.txt

Regards, Stan

DominicDirkx commented 4 years ago

Please see my other question as well.

stanspee commented 4 years ago

Excuse me! Yes, USE_PYGMO and USE_NLOPT are both set 'OFF'. The last CompileOutput.txt was after checking whether these boxes were set ON or OFF in Qt Projects-->Cmake. Nevertheless, I tried again after adding -j2 as building argument. Now I get a completely different error: CompileOutput.txt

The error: No rule to make target 'C:/tudatBundle/nlopt/src/api/../../lib/libnlopt.a', needed by 'C:/tudatBundle/tudatExampleApplications/libraryExamples/bin/applications/application_PagmoHodographicShapingTrajectoryExample.exe'. Stop.

I also can't find a github issue with a similar kind of problem.

Regards, Stan

DominicDirkx commented 4 years ago

Thanks for the update. The error you get is different, but seems to boil down to essentially the same thing. Could you:

For some reason, it seems that the code is trying to link to the NLOPT library, but if that is set it OFF, I don't yet understand why... Hopefully this output will give us some idea,

Dominic

stanspee commented 4 years ago

Dominic,

Apparently, the checkbox PAGMO_WITH_NLOPT (see image below) was still ON even though I set the USE_NLOPT to OFF. I assume this should also be set to OFF? Now I manually have set it to OFF, the building succeeded! image Assuming this was the right thing to do, I expect this issue can be closed. To be sure, I included the output: CompileOutput.txt testOutput.txt GeneralMessages.txt

Thankyou for your help, Stan

DominicDirkx commented 4 years ago

Well spotted! This should be turned to OFF when USE_PAGMO is set to OFF, but apparently is not always the case.