headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
340 stars 101 forks source link

odeint-v2 compile error-message #163

Closed Ashur59 closed 8 years ago

Ashur59 commented 9 years ago

I want to use odeint-v2 to solve arbitrary systems of differential equations. However, as I am reading through the documentations, I am trying to compile and run a test source code namely thrust/lorenz_parameters.cu. However, I am receiving the following error message when typing g++ -Wall -I /home/aashoormaram/Numerical_Methods/ -c example1.cpp

Error Message: In file included from /home/aashoormaram/Numerical_Methods/thrust/system/cuda/detail/malloc_and_free.h:22:0, from /home/aashoormaram/Numerical_Methods/thrust/system/detail/adl/malloc_and_free.h:32, from /home/aashoormaram/Numerical_Methods/thrust/system/detail/generic/memory.inl:21, from /home/aashoormaram/Numerical_Methods/thrust/system/detail/generic/memory.h:71, from /home/aashoormaram/Numerical_Methods/thrust/detail/reference.inl:22, from /home/aashoormaram/Numerical_Methods/thrust/detail/reference.h:166, from /home/aashoormaram/Numerical_Methods/thrust/memory.h:25, from /home/aashoormaram/Numerical_Methods/thrust/device_ptr.h:25, from /home/aashoormaram/Numerical_Methods/thrust/device_malloc_allocator.h:25, from /home/aashoormaram/Numerical_Methods/thrust/device_vector.h:25, from example1.cpp:13: /home/aashoormaram/Numerical_Methods/thrust/system/cuda/detail/guarded_cuda_runtime_api.h:38:30: fatal error: cuda_runtime_api.h: No such file or directory

include

                          ^

compilation terminated. _____- This is after I installed Thrust software. Before, the error message was example1.cpp:13:34: fatal error: thrust/device_vector.h: No such file or directory

include <thrust/device_vector.h>

                              ^
pranavcode commented 9 years ago

@Ashur59, have you installed NVIDIA CUDA Toolkit?

Ashur59 commented 9 years ago

Hi, yes I had installed it but my Fedora linux had become unstable and the screen was going to black at startup. That's why I had to remove it from my system. I don't know how else I can manage the inssue.

pranavcode commented 9 years ago

@Ashur59, I don't use Fedora myself, someone in the community can help you solve that issue. CUDA installation and using nvcc (NVIDIA CUDA Compiler Driver) for building your sources should solve your problem.

As far as the issue is concerned I need to put forth few things, just for the sake of clarification of yours and mine. The example you are trying is CUDA backend for Boost.odeint, which uses Thrust. If you are not worried about parallelizing your code or using GPU, you may want to look at CPU examples. Which should work without much hustle. Otherwise, if you intentionally tried Thrust example, Thrust needs CUDA installed. If you install CUDA 4.0+, you will get Thrust installed on your system (Thrust Quick Start Guide).

Ashur59 commented 9 years ago

Hi thanks for your advice, Where can I find CPU examples instead?

pranavcode commented 9 years ago

@Ashur59, odeint-v2/examples has several CPU-only examples. lorenz.cpp is one of them. Directories under examples denote the specialization of given examples. examples/thrust uses Thrust backend for Boost.odeint, for instance.

I would also suggest referring documentation.

mariomulansky commented 8 years ago

Thanks for the input. I think the issue was addressed satisfactory.