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

Matt J
Matt J 2012년 12월 23일
편집: Matt J 2012년 12월 23일
It's hard to know what to advise, since we have no idea what you tried.
I'm not sure how the GPU could help with ODE solving, since there isn't any obvious parallel structure to the operations that that requires.
Shiv Tewari
Shiv Tewari 2012년 12월 30일
Thanks, Matt. When I said integrating odes on GPU I meant integrating several uncoupled odes. Ode integration doesn't have, obviously, a parallel structure as it a iterative procedure. Hope it makes sense. I am having problem integrating uncoupled odes on GPU? PS: I tried to integrate a single ode first using MATLAB ode solvers that didn't worked at the first place.
Matt J
Matt J 2012년 12월 30일
If you only have "several" ODEs, it sounds like a parallel CPU implementation, e.g., using parfor, may be more suitable than a gpu driven approach.
Carlos Ricagno
Carlos Ricagno 2015년 10월 29일
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 2017년 3월 8일
I am also in need of an ode in gpu and was wondering if any resources are available in MATLAB?

댓글을 달려면 로그인하십시오.

 채택된 답변

Geng
Geng 2012년 12월 27일

1 개 추천

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

Shiv Tewari
Shiv Tewari 2012년 12월 30일
Thanks Geng. I am also heading to the same solution. - Shiv

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

majid
majid 2019년 1월 6일

2 개 추천

Have you made any progress Shiv?! I could not find any material regarding CUDA and ODE for Matlab! Any help is appreciated.

댓글 수: 3

Vipul Singhal
Vipul Singhal 2020년 5월 18일
Just want to echo this question. Would love to see if someone has made progress in this direction. I think doing things like parameter estimation / sensitivity analysis would be greatly accelerated if we could figure out how to run an ODE on a GPU.
Hamid Osooli
Hamid Osooli 2020년 7월 26일
Try this one
https://github.com/astroHaoPeng/ode45gpu
Gonzalo Villegas Curulla
Gonzalo Villegas Curulla 2024년 1월 26일
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);
"

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2012년 12월 22일

댓글:

2024년 1월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by