- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I receive a message from the guided autoparallizer that I should insert "!dir$ attributes concurrency_safe : profitable" to enable the autoparallizer to parallelize the loop. I have declared the subroutine as Pure which I understood to declare it as being safe to use in a parallel loop as it decalres that the only items changed within the subroutine are dummy variables declared with intent(out) or intent(inout).
Are there otherthings I should be looking out for?
Are there otherthings I should be looking out for?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Show us a code snip of your loop .and. the declarations of the variables used in the loop, plus the subroutine(s) that are giving you problems.
Many things can affect parallelization. When there is uncertainty, the compiler will remove vectorization. If your problematic subroutines are being passed scalars (and for functions returning scalar) it may be a candidate to flag as elemental as well as pure.
BTW
The Intel Developer's Forum (conference) is starting tomorrow. Many of the respondants to this forum message may be preparing to go and/or may not reply to your message(s) until next weekend. Be patient.
Jim Dempsey
Many things can affect parallelization. When there is uncertainty, the compiler will remove vectorization. If your problematic subroutines are being passed scalars (and for functions returning scalar) it may be a candidate to flag as elemental as well as pure.
BTW
The Intel Developer's Forum (conference) is starting tomorrow. Many of the respondants to this forum message may be preparing to go and/or may not reply to your message(s) until next weekend. Be patient.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting martin.upsdellagresearch.co.nz
I receive a message from the guided autoparallizer that I should insert "!dir$ attributes concurrency_safe : profitable" to enable the autoparallizer to parallelize the loop. I have declared the subroutine as Pure which I understood to declare it as being safe to use in a parallel loop as it decalres that the only items changed within the subroutine are dummy variables declared with intent(out) or intent(inout).
Are there otherthings I should be looking out for?
Are there otherthings I should be looking out for?
You should be looking out for the usual questions; would there be good thread locality of data, are the loops sufficiently long, can parallelization be performed without removing vectorization, ...... ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Giving a procedure the PURE attribute specifies that it does not have side-effects, but this does not make it concurrency-safe. For example, a PURE procedure may still use static storage for local variables, though if you have enabled /Qparallel, it will use the stack instead. More to the point, PURE does not safeguard against unsynchronized reads of memory elsewhere in the program, which CONCURRENCY_SAFE specifies.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page