DavidBrainard / RenderToolbox3

Matlab toolbox for managing graphics rendering for psychophysics
MIT License
11 stars 4 forks source link

Would Matlab's distributed computing speed up BatchRender()? #5

Closed benjamin-heasly closed 11 years ago

benjamin-heasly commented 11 years ago

Users might want to run RenderToolbox3 on a distributed Matlab cluster, using Matlab's distributed computing environment. The straightforward way would be to add some syntax for managing Matlab pools, and using a "parfor" loop during BatchRender().

Render Tooblox 2 has some code for this kind of thing.

Mitsuba and PBRT already exploit multiple processor cores to chop up the rendering process. So it's possible a parfor loop in BatchRender() would have little effect on speed, at least for a single multi-core machine.

In the parfor case, it might be worth telling the renderers to use 1 core. What happens if Matlab and renderers both request multiple cores?

benjamin-heasly commented 11 years ago

A random tip from Mark Howison about XSEDE. The Lone star system might be good for RenderToolbox3. https://www.xsede.org/web/guest/tacc-lonestar

benjamin-heasly commented 11 years ago

We've been trying to render using a Linux cluster called Rhino. We found that configuration of cluster nodes is a key concern. It will be useful to be able to perform scene file conversion and rendering on separate machines. See Issue #26.

benjamin-heasly commented 11 years ago

6eafe857d83b671158c88ea5556ead4a3881f1b9 was able to render all of the example scenes using the Linux cluster called Rhino. It relies on separate of scene file conversion from scene rendering, as in Issue #26. It uses the top-level scripts GenerateAllExampleSceneFiles and RenderAllExampleSceneFiles.

It uses Matlab's distributed computing "parfor" functionality to send jobs to cluster worker nodes. "parfor" functionality can be toggled with the RenderToolbox3 option hints.isParallel.

So on systems like Rhino, with separate worker nodes, there is a real possibility for faster, parallel rendering. On systems that use "parfor" functionality locally, on a single machine, I noticed no speed advantage. This is probably because PBRT and Mitsuba already know how to exploit multiple local CPU cores.