Using named common blocks in target transfers

Comments on OpenMP Technical Reports 2 and 3 (November 2014) (Read Only)

Using named common blocks in target transfers

Postby nsmeds » Mon Feb 09, 2015 3:00 am

In the treatment of target constructs named common blocks are only explicitly mentioned in the context of DECLARE TARGET meaning that it is unclear if it is allowed to use a named common block in a MAP clause of a data transfer (TARGET, TARGET DATA and/or TARGET UPDATE)

I'd suggest the following changes to the OpenMP standard:

Change 1, include named common blocks as "mappable type"
OpenMP 4.0TR3 p 11
mappable type
A type that is valid for a mapped variable. If a type is composed from other types
(such as the type of an array or structure element) and any of the other types are not
mappable then the type is not mappable.

Change to:

mappable type
A type that is valid for a mapped variable. If a type is composed from other types
(such as the type of an array, structure element or member of a named common
block) and any of those sub-types are not mappable then the type is not mappable.

Also, is the correct numeral are or is??? "...any of those sub-types is not mappable..."

Change 2, move a section in the standard
Along the same lines in section 2.14.3 lines 19-27 common block are mentioned as list
members in conjunction to the threadprivate directive. I think this part should be moved
to a higher hierarchical level so that it will be clear that the same argument holds also for
other parts of the standard, in particular the various TARGET directives.

My suggestion is to move the section below into the description of lists and list items in
section 2.1 by just adding it into the Fortran section after line 21 on page 27.

Sec. 2.14.3, p 172
19 A named common block may be specified in a list by enclosing the name in slashes. When a named
20 common block appears in a list, it has the same meaning as if every explicit member of the common
21 block appeared in the list. An explicit member of a common block is a variable that is named in a
22 COMMON statement that specifies the common block name and is declared in the same scoping unit
23 in which the clause appears.
24 Although variables in common blocks can be accessed by use association or host association,
25 common block names cannot. As a result, a common block name specified in a data-sharing
26 attribute clause must be declared to be a common block in the same scoping unit in which the
27 data-sharing attribute clause appears
nsmeds
 
Posts: 3
Joined: Fri Jan 23, 2015 2:42 am

Re: Using named common blocks in target transfers

Postby kli » Mon Feb 23, 2015 2:59 pm

In [27:19-21], it states that

A list item is a variable, array section or common block name (enclosed in slashes), subject to the restrictions specified in Section 2.4 on page 43 and in each of sections describing clauses and directives for which a list appears.


The definition of the list item also applies to the map clause according to the syntax in [195:19]. And there is no restriction of specifying common block name in section 2.14.5.
kli
 
Posts: 7
Joined: Thu Jan 08, 2009 7:39 pm


Return to TR2 and TR3 Discussion

Who is online

Users browsing this forum: No registered users and 1 guest