headmyshoulder / odeint-v2

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

Problem with lorenz example in CUDA #141

Open ksharathk opened 9 years ago

ksharathk commented 9 years ago

Hello,

I'm relatively inexperienced with CUDA and Eclipse (NSIGHT edition), and have been unable to run the lorenz example code given in the github files. Does anybody have any advice regarding the errors that I am recieving? Attached below is a screenshot containing the build errors.

screenshot from 2014-09-28 16 16 53

headmyshoulder commented 9 years ago

Can you paste the concrete error messages and what kind of compilers do you use? Do you compile in C++11 mode?

On 28.09.2014 23:20, ksharathk wrote:

Hello,

I'm relatively inexperienced with CUDA and Eclipse (NSIGHT edition), and have been unable to run the lorenz example code given in the github files. Does anybody have any advice regarding the errors that I am recieving? Attached below is a screenshot containing the build errors.

screenshot from 2014-09-28 16 16 53 https://cloud.githubusercontent.com/assets/8950816/4435735/d422cdaa-4754-11e4-9be5-22b394c8c7c6.png

— Reply to this email directly or view it on GitHub https://github.com/headmyshoulder/odeint-v2/issues/141.

ksharathk commented 9 years ago

I am using Nsight eclipse edition 6.5 on ubuntu 14.04. The example is compiled by the NVCC tools and the host assembler. There are 3 errors when I build the example.

The second error in the screen shot ( (name followed by "::" must be a class or namespace name) is in one of the boost include files. The file location is :

/usr/local/cuda-6.5/targets/x86_64-linux/include/boost/mpl/eval_if.hpp

The 3rd error (no instance of overloaded function "std::__distance" matches the argument list) is from a c++ include file

location: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h

The 1st error seems to be a make error.

As for C++11 mode, there is no mention of it in the project properties.

mariomulansky commented 9 years ago

Can you build basic CUDA examples (i.e. that dont use odeint)?

What version of odeint are you using? The latest from github or some that shipped with boost, which boost version?

Maybe you have to change

typedef runge_kutta_dopri5< state_type , value_type , state_type , value_type > stepper_type;

to

typedef runge_kutta_dopri5< state_type , value_type , state_type , value_type , thrust_algebra, thrust_operations > stepper_type;

We improved odeint at some point that makes the explicit definition of algebra and operations not necessary anymore, but maybe you are still working with an old version?

ksharathk commented 9 years ago

Yes, I can build the CUDA examples that do not use odeint. The odeint and boost are also latest versions which are available online.(odeint v2 and boost 1.56.0) I have tried changing the typedef but still the same 3 errors persist.

mariomulansky commented 9 years ago

Sorry for the delayed reply. I found some time today to look into this problem and it turned out a quite deep issue involving boost::range, std::distance and thrust iterators. I've added a fix that makes the lorenz_paramters example compile again with Cuda 6.5 and boost 1.56 on my installation. However, I could not run the example as I don't have CUDA hardware available at the moment. But maybe you can update odeint and give it try.

ksharathk commented 9 years ago

sorry for the late reply.I updated ODE and ran the code on my hardware. The errors are no more there but it does not display the proper output. There is a warning (member 'm_t_overall' not initialized in this constructor- (line 189)) that is diaplayed in the 'problems' window and in the console window CUDA driver version and runtime version are displayed along with values starting from 2 . (attached screenshot) I tried debugging with breakpoints but could not do it. ( I have a single GPU system and breakpoints do not work because the desktop GUI is running on the GPU) loopprob