Space-Systems / OPI

Orbital Propagation Interface
Other
20 stars 8 forks source link

Difficulty compiling on NVidia tegra #7

Open sjwaldman opened 5 years ago

sjwaldman commented 5 years ago

Goodmorning OPI Team -

I am hoping to use OPI for some basic work -- I have a generic interest in GPU based computation, as well as a specific interest in orbital propagation and radiation tolerant computing. OPI seems like a very promising framework, but I am unable to get the code compiled. Any help would be greatly appreciated, as I suspect I am doing something basic incorrectly.

System: NVidia TX1 running tegra-ubuntu aarch64 CUDA release 9.0 cmake version 3.5.1 g++ (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609


After mkdir build; cd build; cmake .. I receive the following error:

CMake Error at CMakeLists.txt:56 (if): if given arguments:

"3.5.1" "VERSION_GREATER_EQUAL" "3.12"

Unknown arguments specified

This is fixed by replacing with "NOT ${CMAKE_VERSION} VERSION_LESS "3.12 " based on the insight gleaned here: [https://github.com/Dav1dde/glad/issues/134]. This modification allows cmake to finish.

Make proceeds to the 64% level and crashes out when building propagator_properties_cpp.cpp with an error about "virtual functions are pure". This is something I tried to "fix" by changing the function definition so the virtual function is properly overridden, but this seems indicative of a compiler configuration error. As far as I can tell, the compiler is running with C++11 enabled based on CMAKE messages. However, the virtual message and later messages regarding "nullptr" definition suggest that a compiler configuration is wrong still.

Any help greatly appreciated.

Thanks!

sam

mmoeckel commented 5 years ago

Hi Sam, can you tell me which functions are throwing the "virtual functions are pure" error? Also, what version of the code did you check out? I have made some recent additions that require C++11 so the option to disable C++11 is obsolete now.

mmoeckel commented 5 years ago

The minor CMake issues you saw should be fixed with cb486dcbf145e1c2db9fbd941dd66f512f35ee94 5b2097e7634d87cc3aa8ee8667540d3a3a5b55a5 and 794a8f1103f84e3e8bd64918eb9154aac16ccc64.

sjwaldman commented 5 years ago

Thank you very much for the prompt reply! I am out of the office until Monday: I will try to get you a response before then, but I may be unable. I will definitely reply by then!

Sam

On Jul 3, 2019, at 5:25 PM, Marek Moeckel notifications@github.com wrote:

The minor CMake issues you saw should be fixed with cb486dc 5b2097e and 794a8f1.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

sjwaldman commented 5 years ago

Good news, Marek: the updated files from commit 05addaf build on the NVidia TX1 with Tegra Linux. I have not yet run the code, I can only report that they successfully build.

However, I did have to turn off the python and swig bindings, since the configuration there is still a bit off. I think the issue stems from the tegra-ubuntu's use of cmake 3.5.1. First, cmake couldn't find the python3 libraries (even though they are there) and then cmake had trouble with the swig_add_library command. Poking around, it appears "swig_add_library" was added in cmake 3.8, so I believe this has to do with the fact that I am running an old configuration.

I'll start working with the examples and see how it runs, then get back to you with more if I have any. Thanks!


Sam Waldman

On Wed, Jul 3, 2019 at 5:48 PM Sam Waldman waldman@neutralinospace.com wrote:

Thank you very much for the prompt reply! I am out of the office until Monday: I will try to get you a response before then, but I may be unable. I will definitely reply by then!

Sam

On Jul 3, 2019, at 5:25 PM, Marek Moeckel notifications@github.com wrote:

The minor CMake issues you saw should be fixed with cb486dc https://github.com/ILR/OPI/commit/cb486dcbf145e1c2db9fbd941dd66f512f35ee94 5b2097e https://github.com/ILR/OPI/commit/5b2097e7634d87cc3aa8ee8667540d3a3a5b55a5 and 794a8f1 https://github.com/ILR/OPI/commit/794a8f1103f84e3e8bd64918eb9154aac16ccc64 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ILR/OPI/issues/7?email_source=notifications&email_token=AMQUD2ANGXUNPXBS5ZPQ7F3P5U7QBA5CNFSM4H5L5H62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZF7VCQ#issuecomment-508295818, or mute the thread https://github.com/notifications/unsubscribe-auth/AMQUD2ELV323IPLXTKW54JTP5U7QBANCNFSM4H5L5H6Q .

mmoeckel commented 5 years ago

Hi Sam, thanks for reporting back! The package you need to install on Ubuntu for the python3 bindings is libpython3-dev. You can also choose to build against python2 if you prefer.

Re SWIG, the command swig_add_library was added to replace an older command. If you dig around in CMakeLists.txt's history (https://github.com/ILR/OPI/commit/1f7cc4bda9cf4a28d2a9ade61905a5bbe707b468#diff-af3b638bc2a3e6c650974192a53c7291) you'll find it. Maybe it should be added back in as an option for older versions of CMake.

mmoeckel commented 5 years ago

Re SWIG, the command swig_add_library was added to replace an older command. If you dig around in CMakeLists.txt's history (1f7cc4b#diff-af3b638bc2a3e6c650974192a53c7291) you'll find it. Maybe it should be added back in as an option for older versions of CMake.

Fixed in 080251063fa0570b3b0d573608af5222e1f52bd3.