The Intel® Fortran Compiler 15.0 now generates multi-threaded code for select instances of the OpenMP WORKSHARE and PARALLEL WORKSHARE constructs involving array assignments. Previously, these were implemented with the OpenMP SINGLE construct, meaning that only single-threaded code was generated.
Multithreaded code is not always generated for the statements inside the block of an OMP WORKSHARE construct. Some statements parallelize; others do not parallelize and instead execute sequentially inside an OMP SINGLE construct to preserve the correct semantics of WORKSHARE.
Simple array assignments such as A = B + C parallelize.
Simple array assignments with overlap such as A = A + B + C parallelize.
Array assignments with user-defined function calls parallelize such as A = A + F (B). F must be ELEMENTAL.
Array assignments with array slices on the right hand side of the assignment such as A = A + B(1:4) + C(1:4) parallelize. If the lower bound of the left hand side or the array slice lower bound or the array slice stride on the right hand side is not 1, then the statement does not parallelize.
Assigning into array slices does not parallelize.
Scalar assignments do not parallelize – there is no work that needs to be done in parallel.
FORALL and WHERE constructs do not parallelize.