Closed ds283 closed 9 years ago
The error with runge_kutta_fehlberg78
says that OpenCL/CUDA limit on total size of kernel parameters has been exceeded. A limit of 4352 bytes means that a kernel may have no more than 544 double
or pointer parameters. I am not sure if this is a universal or hardware-dependent limit (because I remember hardware where this limit used to be 256 bytes). ddemidov/vexcl@7bfcbb50dcbcc64cfbbe16d37f6757a984fdfc92 allows user to ask VexCL to split multivector kernel into components by defining the VEXCL_SPLIT_MULTIEXPRESSIONS
macro. Could you please try and see if this solves the issue with runge_kutta_fehlberg78
?
Regarding the error with runge_kutta_dopri5
, I've made a pull request (#111) that provides an implementation of same_instance_impl
for VexCL containers. @ds283, could you please check if this solves the problem?
Thanks very much for your speedy response.
For fehlberg78: Yes, defining VEXCL_SPLIT_MULTIEXPRESSIONS allows the kernel to build.
For dopri5: Yes, if I apply de0da9c together with the existing patches for adaptive steppers then it will compile with runge_kutta_dopri5. There seems to be a tiny typo in de0da9c, however: it introduces a new header 'boost/numeric/odeint/external/vexcl/vexcl_same_insatnce.hpp', but I think this should be 'vexcl_same_instance.hpp'.
Thanks, I've fixed the typo in the pull request.
This may be related to issue #107, although it does not look exactly the same.
I am trying to solve a system of ODEs using VexCL. I encountered the problem described in #107 and am therefore using using the branches 'vexcl-adaptive-steppers' and 'vexcl-mvec-copy' from http://github.com/ddemidov/odeint-v2. I am using the up-to-date master branch of VexCL.
-- My implementation works OK with plain runge_kutta4 or runge_kutta_dopri5 (no adaptive error control) and integrate_times, but fails if I try to use runge_kutta_fehlberg78 because the resulting OpenCL kernel does not build:
The kernel it generates is quite long, but I can reproduce it if that would be helpful.
-- When I try to wrap runge_kutta_dopri5 or runge_kutta_fehlberg78 with make_controlled<>, nothing works. The fehlberg78 stepper compiles, but fails to build the kernel on execution in the same way as above. The dopri5 stepper does not even compile, with the error
I have tried to extract a minimal example which reproduces this compilation failure. For a reason that I have been unable to understand, when I take the ODE component from my code and compile it on its own, I reproduce the same pattern of errors (ie., fehlberg78 compiles but won't build the kernel; dopri5 works without error control, but fails with make_controlled<>), but not precisely the same compiler error. This time, for dopri5, the compiler reports
I am using Xcode 5 and the default Apple-provided clang.
My example is
It doesn't matter what I put in the () operator of the functor (although I can reproduce it if needed) - these kernels seem to build correctly, and in the cases where I see a compiler error the contents of this function don't seem to affect it.