Definition | Back to Top |
Syntax of the ALIGN Directive:
!HPF$ ALIGN array WITH target
* is used to indicate a row or column of one array mapping to a single element of another array. This can be accomplished as collapsing or replicating.
:: is used to combine attributes such as ALIGN and DISTRIBUTE in one directive, as in
attribute list :: target
General Examples | Back to Top |
!HPF$ ALIGN A WITH B or !HPF$ ALIGN A(:,:) WITH B(:,:)
!HPF$ ALIGN B(I,J) WITH A(I+1,J+1)
!HPF$ ALIGN X(J,K) WITH D2(K,J)
!HPF$ ALIGN X(J,K) WITH D1(J) or !HPF$ ALIGN X(:,*) WITH D1(:)
!HPF$ ALIGN X(J,K) WITH D3(J,*,K)
Tariff Program Examples | Back to Top |
!HPF$ ALIGN (:) WITH apatho(*,:) :: demand,demp
Move the program display to this line
!HPF$ ALIGN (i,j) WITH apatho(i,j) :: apathn
Move the program display to this line
dhxlin, thxlin, tar, dslope, and ind2 are not aligned or distributed, but instead are read in to each processor. This was done to resolve a bottleneck caused when all data were read in through node 0 and then redistributed. It is a good solution in this case, because there is enough space on each SP2 node to hold all of the input arrays, and the arrays are never updated. In this case, the data will be available on any node that requires it, and will not cause communication problems.
Note that any array aligned with apatho, which is distributed, will be distributed in the same way.
Exercise (short) | Back to Top |
Back to Top |