!HPF$ ALIGN START(:) WITH A(*,:) !HPF$ ALIGN SWAP(:) WITH A(*,:) !HPF$ ALIGN Y(:) WITH A(:,*) !HPF$ ALIGN X(:) WITH A(*,:) !HPF$ PROCESSORS P(16,16) ! say !HPF$ DISTRIBUTE A(CYCLIC,CYCLIC) ONTO P
marks 18 (2 per line)
Assume here that scalars are replicated:
location_array = MAXLOC( ABS(A(i:n,i)) ) reduction
operation (therefore communication between rows to establish where the
largest element is)
and broadcast (to all processors) with MAXLOC, (assume location_array is
replicated),A(location,i:n) = A(i,i:n) communication in first dimension
of AA(i,i:n) = SWAP(i:n} no commsY(location) = Y(i) gives a one element communication,Y(i) = TEMP no comms as TEMP is replicated.