Integrating ODES on GPU?

21 Ansichten (letzte 30 Tage)
Shiv Tewari
Shiv Tewari am 22 Dez. 2012
Hi there: I am having a tough time integrating odes on my GPU in MATLAB. I have tried MATLAB ode solvers which, of course, didn't work. I tried a simple Euler solver to execute through 'arrayfun' which didn't worked either. It looks like a lot of functionality is not yet supported for computation on GPUs. Please help me out if I am not aware of something or if there is an easy way out. I am running MATLAB R2011b on Windows 8. Thanks, Shiv
  5 Kommentare
Carlos Ricagno
Carlos Ricagno am 29 Okt. 2015
I have the same problem, parfor is a good option, but i need more power, If somebody knows how to implement ode in gpu would be great,
Tuan  Pham
Tuan Pham am 8 Mär. 2017
I am also in need of an ode in gpu and was wondering if any resources are available in MATLAB?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Geng
Geng am 27 Dez. 2012
Higher matlab versions includes more functions, but still too few to solve an ODE or a PDE. Arrayfun is a good tool with unexpected flaws. The best way to implement an ODE solver on GPU with matlab is matlab-with-CUDA. First you write the parallel parts in CUDA (.cu file) and compell out a '.ptx' file using whatever method. Then with the .cu and .ptx file, you can obtain a matlab parallel function. You will get more from the Parallel Computing Toolbox introduction document of matlab.
  1 Kommentar
Shiv Tewari
Shiv Tewari am 30 Dez. 2012
Thanks Geng. I am also heading to the same solution. - Shiv

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

majid
majid am 6 Jan. 2019
Have you made any progress Shiv?! I could not find any material regarding CUDA and ODE for Matlab! Any help is appreciated.
  3 Kommentare
Hamid Osooli
Hamid Osooli am 26 Jul. 2020
Try this one
https://github.com/astroHaoPeng/ode45gpu
Gonzalo Villegas Curulla
Gonzalo Villegas Curulla am 26 Jan. 2024
Dear Hamid,
Please inspect the error message below when running Test_02_RTBP.m in your github repo:
"
Error using gpuArray/arrayfun
Unable to resolve the function handle.
Error in Test_02_RTBP (line 36)
[TGPU,YGPU1,YGPU2,YGPU3,YGPU4,YGPU5,YGPU6,FLAG] =
arrayfun(@ode45GPU_simple,tspan(1),tspan(end),y0GPU(:,1),y0GPU(:,2),y0GPU(:,3),y0GPU(:,4),y0GPU(:,5),y0GPU(:,6),AbsTol,RelTol,0.001,mu,e);
"

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by