\pagebreak \chapter{Fortran \code{ASSOCIATE} Construct} \fortranspecificstart \label{chap:associate} The following is an invalid example of specifying an associate name on a data-sharing attribute clause. The constraint in the Data Sharing Attribute Rules section in the OpenMP 4.0 API Specifications states that an associate name preserves the association with the selector established at the \code{ASSOCIATE} statement. The associate name \plc{b} is associated with the shared variable \plc{a}. With the predetermined data-sharing attribute rule, the associate name \plc{b} is not allowed to be specified on the \code{private} clause. \fnexample{associate}{1f} In next example, within the \code{parallel} construct, the association name \plc{thread\_id} is associated with the private copy of \plc{i}. The print statement should output the unique thread number. \fnexample{associate}{2f} The following example illustrates the effect of specifying a selector name on a data-sharing attribute clause. The associate name \plc{u} is associated with \plc{v} and the variable \plc{v} is specified on the \code{private} clause of the \code{parallel} construct. The construct association is established prior to the \code{parallel} region. The association between \plc{u} and the original \plc{v} is retained (see the Data Sharing Attribute Rules section in the OpenMP 4.0 API Specifications). Inside the \code{parallel} region, \plc{v} has the value of -1 and \plc{u} has the value of the original \plc{v}. \fnexample{associate}{3f} \fortranspecificend