spmd, composites and hidden overheads
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Jill Reese
2012-6-8
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Distributed Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!