spmd, composites and hidden overheads
4 views (last 30 days)
Show older comments
I have a few questions regarding the inner workings of the spmd block that I wish PCT engineers would give some pointers on.
1) Is there any way to access codistributor information from the local master client without doing spmd, getCodistributor(x), end? I need to do this many times throughout my code and I was wondering if calling the spmd block in codistributor incurs unnecessary performance penalties.
2) My application requires data to be distributed in a highly specific way but since I am using mostly overloaded object methods I have little use for the functionalities of the codistributed data type save for calling getLocalPart(x) after the data has been redistributed according to the correct sizes. Thus I have been experimenting with composites as an alternative means of data storage but I am unsure of what the hidden overheads are, since i have to store them as object properties and copy them around a lot. Can you provide an explicit documentation on the overheads and communications that goes under the hood when using composites?
3) I need to overload the spmd block to work with my custom object classes, if that is possible can you provide detailed documentation with the functionality and specifications of the method?
0 Comments
Answers (1)
Jill Reese
on 8 Jun 2012
Thomas,
(1) The getCodistributor() function operates only on codistributed arrays; therefore, it must be called from within an spmd block. There is also no equivalent function for distributed arrays, which is what a codistributed array is outside of an spmd block. getCodistributor() is a simple query function that requires no communication, so you won't take a performance hit by calling it.
As for (2) and (3), could you provide some more details on what you are trying to do in your code and where you find the available codistributors lacking? In particular, a simple MATLAB code sample would be helpful. There may be some advanced maneuvers you could use early on that will allow you to simplify the remaining code.
Best,
Jill
See Also
Categories
Find more on Distributed Arrays in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!