Interfacing with MATLAB*P
One of the biggest problems encountered during this
package's development was simply trying to figure out
and debug the scheme used to determine which portions
of a given node's local data corresponded specific
locations in the whole matrix. Initially, through
simple experimentation, it was thought that the data
layout was quite simple (which is indeed is for the
row and column-wise distributions). This is the case
for small matrix that is 2D block-cyclicly
distributed. It's quite difficult to hunt down data
layout problems for larger data sets (on the order of
1024x1024, for instance).
Despite this initially issues, a scheme was developed
(and the MatrixManager class extened) to provide any
node to determine both local data layout and this
local data layout's mapping on to the whole,
cluster-wide matrix.
This scheme, inplemented as a
member of the MatrixManager class
(getDistWindows(...))
returns a distribution layout data structure
(DistLayout). A DistLayout data
structure provides the caller with
- blocks -- the number of 'blocks' of data
allocated to a node.
- local columns and rows -- the number of
columns and rows (total) allocated for calling
node's local data buffer.
- block data -- an array associated with each
block. Each block's attributes are enumerated
here. These include the rows and columns delimiting
the data in the cluster-wide maxtrix (here, x
and y values) as well as the
offset into the node's local data buffer (i
and j) at which
actual the data is located.
Aside from obtaining this information and providing
the appropriate data to the rendering kernel, the
PPVisual class provides a convenient
interface to MATLAB. This code as the entry point for
the visualization routine, provides error checking,
translates some GUI requests into renderable requests
(like zoom request, for example) , as well as usable
return data (in this case, usually a
pixel buffer) for the MATLAB "m-files" and builtin
code that makeup the GUI components of the package.