Template:OneDimPartitionCommunication
There are a number of different default communication rules associated with the horizontal partition, based on the assignment assigned variable:=assigning variable which are detailed below.
Assigned Variable | Assigning Variable | Semantics |
---|---|---|
single | partition | Gather |
partition | single | Scatter |
partition | partition | Local copy |
As in the last row of the table , if the two partitions are the same type then a simple copy is performed. However, if they are different then an error will be generated as Mesham disallows differently typed partitions to be assigned to each other.
The programmer can also read and write to each element in the partitioned data directly. Either the global coordinates or the block ID its local coordinates can be supplied. This will deduce whether or not the block is on another process, issue any communication as required and complete in that single assignment or access. Because this completes in that expression rather than waiting for a synchronisation, non local data movement is potentially an expensive operation.