Code covered by the BSD License  

Highlights from
A CUDA accelerated Beam Propagation Method [BPM] Solver using the Parallel Computing Toolbox

4.5

4.5 | 2 ratings Rate this file 32 Downloads (last 30 days) File Size: 5.89 KB File ID: #29114
image thumbnail

A CUDA accelerated Beam Propagation Method [BPM] Solver using the Parallel Computing Toolbox

by

 

21 Oct 2010 (Updated )

A beam propagation method solver using the CUDA capabilities in the parallel computing toolbox.

| Watch this File

File Information
Description

The parallel computing toolbox version 5.0 for MATLAB 2010b includes an initial capability for NVIDIA CUDA use. This entry provides a simple paraxial beam propagation method [BPM] solver that utilizes the added GPU capability. A script is also provided that runs the BPM with standard MATLAB Fourier transforms and the GPU implemented transforms. For smaller matrices, the standard MATLAB approach appears to be faster, while at larger matrices above 512x512 elements, the CUDA approach is more than twice as fast.

An effort has been made to make the program so that it will run on a computer without the parallel computing toolbox or an NVIDIA GPU. However, a comparison with standard MATLAB is only possible with those two components.

Files:

The script ScrTimeBPM.m
contains an example of how one may run the main function CUDAparaxbpm.m.
The additional files
FunPlotSim.m
FunEfieldinit.m
FunRefractIdx.m
initialize the field, update the refractive index profile, and create plots.

References:
1) www.mathworks.com/discovery/matlab-gpu.html
2) A. Weideman, Linear Dispersive Wave Equations, http://dip.sun.ac.za/~weideman/research/waves.html
3) Okamoto, K. Fundamentals of optical waveguides, Academic Press, 2000.

Required Products Parallel Computing Toolbox
MATLAB release MATLAB 7.11 (R2010b)
Other requirements An NVIDIA CUDA enabled graphics card with compute capability of at least 1.3.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
05 Nov 2010 John Melonakos

Thanks for posting this code, very cool algorithm. We've enabled it to run with Jacket and posted the results and modified code here: http://blog.accelereyes.com/blog/2010/11/05/beam_propagation_methods/

Enjoy!

23 Oct 2010 Patrick Kano

Hello David,
Thank you for your comments. My coworkers and I are interested in GPU acceleration. I was intrigued by the inclusion of CUDA capability into the MATLAB 2010b parallel computing toolbox.
The motivation for using MATLAB+CUDA was primarily my own curiosity. The choice of the beam propagation equation was based simply on my past experience with it.

From on the MathWorks website,
www.mathworks.de/help/toolbox/distcomp/rn/bsloyak-1.html
I do not believe that the 2009b version is adequate to run the CUDA additions.

A list of functions, like fft2, that support the GPU capability use can be found here:
www.mathworks.cn/help/toolbox/distcomp/bsic4fr-1.html

Finally, a related example from the company website of fft2 being used is at:
www.mathworks.com/products/parallel-computing/demos.html?file=/products/demos/shipping/distcomp/paralleldemo_gpu_fft2.html

I am glad to hear of our common interest.
Patrick

22 Oct 2010 David Romero-Antequera

Hello, Patrick. It is quite a coincidence that I am working in this same subject (kind of). I do not have, however, the latest Parallel Computing Toolbox (PCTB) and I would like to do some questions. Do you choose to use CUDA over standard parallel computing (multicore) by any particular reason? Is the FFT2 parallelized in the new version of PCTB (as far as I know, I'm my version it is only parallelized 1D FFT)? I am using 2009b, by the way. Thanks!

Updates
23 Oct 2010

We slightly modified the description to explain more about the functions.

Contact us