To: J3 J3/20-161 From: Bill Long Subject: OpenMP Liaison Report Date: 2020-October-13 OpenMP Report for Meeting 222 ----------------------------- The OpenMP 5.1 specification will be released next month. A comment draft for OpenMP 5.1 was released this past August. Since February, there were three virtual "F2F" meetings, in May, July, and another a week ago. Here is a summary of the major changes from 5.0 to 5.1 (I'm also highlighting the ones that are Fortran-specific): - Deprecated the master construct. A new construct, masked, was added. It has identical semantics to the master construct, but it also accepts a "filter" clause that can selects a particular thread to execute the structured block of the construct. We also replaced references to the "master thread" in the specification and the Examples document with "primary thread". - [Fortran] Clarified how use_device_ptr, use_device_addr, and is_device_ptr clauses are supposed to work for Fortran. The use_device_ptr and is_device_ptr clauses should permit C_PTR variables, and specifying other types of variables is deprecated for those clauses. - [Fortran] Clarified how data-sharing attributes apply to associate names. - [Fortran] Added restrictions for certain uses of coarrays and related-features in OpenMP regions. In sum: - If a program is running with multiple images, explicit OpenMP regions cannot contain image control statements, ERROR STOP statement, FAIL IMAGE statement, collective subroutine calls, or references to coindexed coarrays. - If a coarray is privatized, the private copy cannot be coindexed or passed to a procedure with a coarray dummy argument. - Coarrays cannot be threadprivate. - List items in clauses cannot be coindexed coarrays. - [Fortran] Clarified that OpenMP directives are not permitted inside a DO CONCURRENT construct. Have not yet addressed usage of LOCALITY clauses in Fortran 2018. - Added more flexibility to the declare variant and metadirective features, allowing dynamic selection of function variants and directive variants. - Added an error directive for issuing compile-time or run-time errors or warnings under a specified condition. - Added a tile and unroll construct. More loop transformation constructs are expected in future releases. - Added support for making indirect calls in an offload region through function/procedure pointer. - Added interoperability support with other non-OpenMP device runtimes through a new interop construct. This construct is available for all base languages. As an example, one can use this feature to obtain a CUDA stream and synchronize work on the stream with OpenMP constructs. However, the APIs for obtaining implementation-specific properties (like a CUDA stream) from a "foreign" device runtime are only available for C/C++. - Added support for compare-and-swap atomics with the new "compare" atomic type for atomic constructs. This atomic type can also be used to support min/max atomic operations in C/C++ (min/max atomics are already available for Fortran, as they are intrinsic procedures that can be used in a standard atomic construct). - Allowed default(private) and default(firstprivate) clauses in C/C++ (these were already available in Fortran). - Added the omp_display_env() routine for displaying environment variables. A motivation for this was to allow one to only have 1 MPI rank display the environment variables values. - Added asynchronous memcpy routines for devices (omp_target_memcpy_async and omp_target_memcpy_rect_async), for all base languages. As with other device memory routines, for Fortran these routines use the C interoperability types. Also, the plan is to release a 5.2 version of the specification sometime next year. The purpose of that release will not be to add new features, but to implement improvements to the format of the specification itself.