release 5.2.1

This commit is contained in:
Henry Jin 2022-11-04 09:35:42 -07:00
parent a5e3d8b3f2
commit 03b9a00df9
606 changed files with 3921 additions and 2942 deletions

View File

@ -2,7 +2,7 @@
\label{chap:openmp_affinity}
OpenMP Affinity consists of a \code{proc\_bind} policy (thread affinity policy) and a specification of
places (\texttt{"}location units\texttt{"} or \plc{processors} that may be cores, hardware
places (``location units'' or \plc{processors} that may be cores, hardware
threads, sockets, etc.).
OpenMP Affinity enables users to bind computations on specific places.
The placement will hold for the duration of the parallel region.
@ -26,7 +26,7 @@ SMT is enabled, a processor is a hardware thread (HW-thread). (This is the
usual case; but actually, the execution unit is implementation defined.) Processor
numbers are numbered sequentially from 0 to the number of cores less one (without SMT), or
0 to the number HW-threads less one (with SMT). OpenMP places use the processor number to designate
binding locations (unless an \texttt{"}abstract name\texttt{"} is used.)
binding locations (unless an ``abstract name'' is used.)
The processors available to a process may be a subset of the system's

View File

@ -21,7 +21,7 @@ a data region around \code{target} constructs, and is
convenient for providing persistent data throughout multiple
\code{target} regions. The \code{target} \code{enter} \code{data} and
\code{target} \code{exit} \code{data} constructs are unstructured, because
they can occur anywhere and do not support a "structure"
they can occur anywhere and do not support a ``structure''
(a region) for enclosing \code{target} constructs, as does the
\code{target} \code{data} construct.

View File

@ -41,13 +41,17 @@ and some directives also accept parenthesized arguments that follow the directiv
A clause may just be a keyword (e.g., \scode{untied}) or it may also accept argument lists
(e.g., \scode{shared(x,y,z)}) and/or optional modifiers (e.g., \scode{tofrom} in
\scode{map(tofrom:}~\scode{x,y,z)}).
Clause modifiers may be "simple" or "complex" -- a complex modifier consists of a
Clause modifiers may be ``simple'' or ``complex'' -- a complex modifier consists of a
keyword followed by one or more parameters, bracketed by parentheses, while a simple
modifier does not. An example of a complex modifier is the \scode{iterator} modifier,
as in \scode{map(iterator(i=0:n),}~\scode{tofrom:}~\scode{p[i])}, or the \scode{step} modifier, as in
\scode{linear(x:}~\scode{ref,}~\scode{step(4))}.
In the preceding examples, \scode{tofrom} and \scode{ref} are simple modifiers.
For Fortran, a declarative directive (such as \code{declare}~\code{reduction})
must appear after any \code{USE}, \code{IMPORT}, and \code{IMPLICIT} statements
in the specification part.
%===== Examples Sections =====
\input{directives/pragmas}

View File

@ -57,8 +57,8 @@ allows interpretation of all OpenMP directives.
The documents and source codes for OpenMP Examples can be downloaded from
\href{https://github.com/OpenMP/Examples}{https://github.com/OpenMP/Examples}.
Each directory holds the contents of a chapter and has a \splc{sources} subdirectory of its codes.
The codes for this OpenMP \VER{} Examples document have the tag
\href{https://github.com/OpenMP/Examples/tree/v\VER}{\plc{v\PVER}}.
This OpenMP Examples \VER{} document and its codes are tagged as
\href{https://github.com/OpenMP/Examples/tree/v\VER}{\plc{v\VER}}.
Complete information about the OpenMP API and a list of the compilers that support
the OpenMP API can be found at the OpenMP.org web site

View File

@ -49,8 +49,10 @@ WORKSHARING CONSTRUCTS
A worksharing construct distributes the execution of the associated region
among the members of the team that encounter it. There is an
implied barrier at the end of the worksharing region
(there is no barrier at the beginning). The worksharing
constructs are:
(there is no barrier at the beginning).
\newpage
The worksharing constructs are:
\begin{compactitem}
@ -66,10 +68,10 @@ consisting of a loop. A loop controlled by a loop construct is called
an \plc{associated} loop. Nested loops can form a single region when the
\code{collapse} clause (with an integer argument) designates the number of
\plc{associated} loops to be executed in parallel, by forming a
"single iteration space" for the specified number of nested loops.
``single iteration space'' for the specified number of nested loops.
The \code{ordered} clause can also control multiple associated loops.
An associated loop must adhere to a "canonical form" (specified in the
An associated loop must adhere to a ``canonical form'' (specified in the
\plc{Canonical Loop Form} of the OpenMP Specifications document) which allows the
iteration count (of all associated loops) to be computed before the
(outermost) loop is executed. %[58:27-29].

View File

@ -36,7 +36,7 @@ continues execution at the end of the named region.
The \code{cancel} construct is also a cancellation point for any other thread of the team
to also continue execution at the end of the named region.
Also, once the specified region has been activated for cancellation any thread that encounnters
Also, once the specified region has been activated for cancellation any thread that encounters
a \code{cancellation}~\code{point} construct with the same named region (\plc{construct-type-clause}),
continues execution at the end of the region.
@ -80,7 +80,7 @@ modified or restricted meaning, relative to when the constructs are uncombined.
%construct with one of the loops constructs \code{do} or \code{for}. The
%\code{parallel do SIMD} and \code{parallel for SIMD} constructs are composite constructs (composed from
%the parallel loop constructs and the \code{SIMD} construct), because the \code{collapse} clause must
%explicitly address the ordering of loop chunking \plc{and} SIMD "combined" execution.
%explicitly address the ordering of loop chunking \plc{and} SIMD ``combined'' execution.
Certain nestings are forbidden, and often the reasoning is obvious. For example, worksharing constructs cannot be nested, and
the \code{barrier} construct cannot be nested inside a worksharing construct, or a \code{critical} construct.
@ -108,6 +108,7 @@ chapter in the OpenMP Specifications document.
\input{program_control/nested_loop}
\input{program_control/nesting_restrict}
\input{program_control/target_offload}
\input{program_control/pause_resource}
\input{program_control/reproducible}
\input{program_control/interop}
\input{program_control/utilities}

View File

@ -85,6 +85,7 @@ in the OpenMP Specifications document. %(DO REF. RIGHT.)
\input{synchronization/worksharing_critical}
\input{synchronization/barrier_regions}
\input{synchronization/atomic}
\input{synchronization/atomic_cas}
\input{synchronization/atomic_restrict}
\input{synchronization/flush_nolist}
\input{synchronization/acquire_release}

View File

@ -7,8 +7,8 @@ Worksharing constructs do this, too (e.g. \code{for}, \code{do},
but the work units are tightly controlled by an iteration limit and limited
scheduling, or a limited number of \code{sections} or \code{single} regions.
Worksharing was designed
with \texttt{"}data parallel\texttt{"} computing in mind. Tasking was designed for
\texttt{"}task parallel\texttt{"} computing and often involves non-locality or irregularity
with ``data parallel'' computing in mind. Tasking was designed for
``task parallel'' computing and often involves non-locality or irregularity
in memory access.
The \code{task} construct can be used to execute work chunks: in a while loop;

View File

@ -26,18 +26,18 @@ For a brief revision history, see `Changes.log` in the repo.
* Clone your fork locally
* If you are working on generic or old-version updates, create a branch off master.
* If you are working on an example for a release candidate for version #.#, create a branch off work_#.#.
1.) `git clone --branch <master|work_#.#> https://github.com/<my_account>/examples-internal`
2.) `git checkout -b <branch_name>`
3.) ... `add`, `commit`
4.) `git push -u origin <branch_name>`
5.) `make` or `make diff` will create a full-document pdf or just a pdf with differences (do this at any point).
1) `git clone --branch <master|work_#.#> https://github.com/<my_account>/examples-internal`
2) `git checkout -b <branch_name>`
3) ... `add`, `commit`
4) `git push -u origin <branch_name>`
5) `make` or `make diff` will create a full-document pdf or just a pdf with differences (do this at any point).
* `git status` and `git branch -a` are your friends
* Submit an issue for your work (usually with a diff pdf), and then you will be asked to submit a pull request
* Create an issue by selecting the (issue tab)[https://github.com/openmp/examples-internal/issues] and clicking on `new issue`.
* Use this MarkDown Cheatsheet for (issue formatting)[https://wordpress.com/support/markdown-quick-reference/]
* More MarkDown details are available (here)[https://markdown-it.github.io]
* You can cut and paste markdown formatted text in a (reader)[https://dillinger.io] to see formatting effects.
* Forced spaces are available in Markdown. On a Mac is is "option+space".
* Forced spaces are available in Markdown. On a Mac it is "option+space".
* Polling is available. Go to (gh-poll)[https://app.gh-polls.com/]. Type an option on each line, then click `copy markdown`, and paste the contents into the issue. (Use preview to check your poll, and then submit it.)
* Create a pull request
@ -45,8 +45,8 @@ For a brief revision history, see `Changes.log` in the repo.
## Processing source code
* Prepare source code (C/C++ and Fortran) and a text description (use similar styles found in recent examples)
* Determine the *example* name `<ename>`, *sequence* number `<seq-no>` and *compiler* suffix `<csuffix>` for the example
* The syntax is: `<ename>.<seq-no>.<csuffix>` (e.g. `affinity_display.1.f90`)
* Determine the *example* name `<ename>`, *sequence* identifier `<seq-id>` and *compiler* suffix `<csuffix>` for the example
* The syntax is: `<ename>.<seq-id>.<csuffix>` (e.g. `affinity_display.1.f90`)
* The example name may be a Section name (e.g. affinity), or a Subsection name (affinity_display)
* If you are creating a new Chapter, it may be the chapter name.
* New examples are usually added at the end of a Section or Subsection. Number it as the next number in the sequence numbers for examples in that Section or Subsection.
@ -56,29 +56,42 @@ For a brief revision history, see `Changes.log` in the repo.
```
@@name: <ename>.<seq-no>
@@type: C|C++|F-fixed|F-free
@@requires: preprocessing
@@compilable: yes|no|maybe
@@linkable: yes|no|maybe
@@expect: success|compile-time-error|runtime-error|undefined-behavior
@@version: omp_<verno>
@@operation: view|compile|link|run
@@expect: success|ct-error|rt-error|unspecified
@@version: [pre_]omp_<verno>
@@env: <environment_variables>
@@depend: <source_code_name>
```
* **name**
is the name of an example
* **type**
is the source code type, which can be translated into or from proper file extension (C:c,C++:cpp,F-fixed:f,F-free:f90)
* **requires**
any additional requirements, currently `preprocessing` for requiring preprocessing
* **compilable**
indicates whether the source code is compilable
* **linkable**
indicates whether the source code is linkable
* **operation**
indicates how the source code is treated. Possible values are:
`view` - code for illustration only, not compilable;
`compile` - incomplete program, such as function or subroutine;
`link` - complete program, but no verification value;
`run` - complete program with verification value.
* **expect**
indicates some expected result for testing purpose "`success|compile-time-error|ct-error`" applies
to the result of code compilation; "`runtime-error|rt-error`" is for a case where compilation may be
successful, but the code contains potential runtime issues (such as race condition); `undefined-behavior` could result from a non-conforming code.
Alternative would be to just use "`conforming`" or "`non-conforming`".
indicates some expected result for testing purpose.
`success` means no issue;
`ct-error` applies to the result of code compilation;
`rt-error` is for a case where compilation may be successful, but the code
contains potential runtime issues (including race condition);
`unspecified` could result from a non-conforming code or is for code
that is viewable only.
* **version**
indicates features for a specific OpenMP version, such as "`omp_5.0`"
indicates that the example uses features in a specific OpenMP version, such as "`omp_5.0`"
The prefix `pre_` indicates that the example uses features prior to a specific version, such as "`pre_omp_3.0`".
* **env**
specifies any environment variables needed to run the code.
This tag is optional and can be repeated.
* **depend**
specifies a source code file on which the current code depends.
This tag is optional and can be repeated.
* For **env** and **depend**, make sure to specify
a proper skipping number `<s>` in the LaTeX macros described below
to match with the number of `env` and `depend` tags.
## Process for text
@ -134,7 +147,7 @@ The following describes LaTeX macros defined specifically for examples.
to this macro is the file extension (such as `h`, `hpp`, `inc`).
The `<s>` option to each macro allows finer-control of any additional lines
to be skipped due to addition of new `@@` tags, such as `@@requires`.
to be skipped due to addition of new `@@` tags, such as `@@env`.
The default value for `<s>` is 0.
### Language h-rules
@ -173,4 +186,4 @@ if it is different.
## License
For copyright information, please see `omp_copyright.txt`.
For copyright information, please see [omp_copyright.txt](omp_copyright.txt).

View File

@ -1,21 +0,0 @@
\bchapter{Deprecated Features}
\label{chap:deprecated_features}
Deprecation of features began in OpenMP 5.0.
Examples that use a deprecated feature have been updated with an equivalent replacement feature.
Deprecations affecting examples are the following:
\begin{description}[labelindent=5mm,font=\normalfont]
\item[5.1] -- \ \scode{masked} construct replaces \scode{master} construct.
\item[5.1] -- \ \scode{primary} affinity policy replaces \scode{master} affinity policy.
\item[5.0] -- \ \scode{omp_sync_hint_*} constants replace \scode{omp_lock_hint_*} constants.
\end{description}
These replacements appear in examples that illustrate, otherwise, earlier features.
When using a compiler that is compliant with a version prior to
the indicated version, the earlier form of
an example is restored by a C-style conditional compilation using the \scode{_OPENMP} macro.
Since Fortran compilers do not preprocess codes by default, a Fortran preprocessor
flag will be required to compile Fortran examples with the C-style conditional
compilation statements.

View File

@ -1,24 +0,0 @@
\bchapter{Examples}
\label{chap:examples}
The following are examples of the OpenMP API directives, constructs, and routines.
\ccppspecificstart
A statement following a directive is compound only when necessary, and a
non-compound statement is indented with respect to a directive preceding it.
\ccppspecificend
Each example is labeled as \plc{ename.seqno.ext}, where \plc{ename} is
the example name, \plc{seqno} is the sequence number in a section, and
\plc{ext} is the source file extension to indicate the code type and
source form. \plc{ext} is one of the following:
\begin{description}[noitemsep,labelindent=5mm,widest=f90]
\item[\plc{c}] -- \ C code,
\item[\plc{cpp}] -- \ C++ code,
\item[\plc{f}] -- \ Fortran code in fixed form, and
\item[\plc{f90}] -- \ Fortran code in free form.
\end{description}
Some of the example labels may include version information
(\code{\small{}omp\_\plc{verno}}) to indicate features that are illustrated
by an example for a specific OpenMP version, such as ``\plc{scan.1.c}
\;(\code{\small{}omp\_5.0}).''

View File

@ -2,16 +2,16 @@
\label{chap:foreword}
The OpenMP Examples document has been updated with new features
found in the OpenMP \VER\ Specification. The additional examples and updates
found in the OpenMP \PVER\ Specification. The additional examples and updates
are referenced in the Document Revision History of the Appendix on page~\pageref{chap:history}.
Text describing an example with a \VER\ feature specifically states
that the feature support begins in the OpenMP \VER\ Specification. Also,
an \code{\small omp\_\VER} keyword is included in the metadata of the source code.
These distinctions are presented to remind readers that a \VER\ compliant
Text describing an example with a \PVER\ feature specifically states
that the feature support begins in the OpenMP \PVER\ Specification. Also,
an \code{\small omp\_\PVER} keyword is included in the metadata of the source code.
These distinctions are presented to remind readers that a \PVER\ compliant
OpenMP implementation is necessary to use these features in codes.
Examples for most of the \VER\ features are included in this document,
Examples for most of the \PVER\ features are included in this document,
and incremental releases will become available as more feature examples
and updates are submitted and approved by the OpenMP Examples Subcommittee.
@ -28,6 +28,6 @@ actively participated and contributed in weekly meetings over the years.
\bigskip
Examples Subcommittee Co-chairs: \smallskip\linebreak
Henry Jin (\textsc{NASA} Ames Research Center) \linebreak
Kent Milfeld (\textsc{TACC}, Texas Advanced Computing Center)
Swaroop Pophale (Oak Ridge National Labortory)

View File

@ -1,6 +1,54 @@
\cchapter{Document Revision History}{history}
\label{chap:history}
%=====================================
\section{Changes from 5.2 to 5.2.1}
\label{sec:history_52_to_521}
\begin{itemize}
\item General changes:
\begin{itemize}
\item Updated source metadata tags for all examples to use an improved form
(see \href{https://github.com/OpenMP/Examples/blob/v\VER/Contributions.md}%
{https://github.com/OpenMP/Examples/blob/v\VER/Contributions.md})
\item Explicitly included the version tag \verlabel[pre\_]{3.0} in those
examples that did not contain a version tag previously
\end{itemize}
\item Added the following examples for the 5.2 features:
\begin{itemize}
\item \scode{uses_allocators} clause for the use of allocators in
\code{target} regions (\specref{sec:allocators})
\end{itemize}
\item Added the following examples for the 5.1 features:
\begin{itemize}
\item The \scode{inoutset} dependence type (\specref{subsec:task_concurrent_depend})
\item Atomic compare and capture (\specref{sec:cas})
\end{itemize}
\item Added other examples:
\begin{itemize}
\item \scode{omp_pause_resource} and \scode{omp_pause_resource_all}
routines (\specref{sec:pause_resource})
\end{itemize}
\item Miscellaneous fixes:
\begin{itemize}
\item Fixed an inconsistent use of mapper in \splc{Example target_mapper.3.f90}
(\specref{sec:declare_mapper})
\item Fixed mismatched argument list in \splc{Example fort_sa_private.5.f}
(\specref{sec:fort_sa_private})
\item Moved the placement of \code{declare}~\code{target}~\code{enter}
directive after function declaration
(\specref{subsec:target_task_reduction})
\item Fixed an incorrect use of \scode{omp_in_parallel} routine in
\splc{Example metadirective.4}
(\specref{sec:metadirective})
\item Fixed an incorrect value for \code{at} clause
(\specref{subsec:error})
\end{itemize}
\end{itemize}
%=====================================
\section{Changes from 5.1 to 5.2}
\label{sec:history_51_to_52}

View File

@ -1,71 +0,0 @@
% This is the introduction for the OpenMP Examples document.
% This is an included file. See the main file (openmp-examples.tex) for more information.
%
% When editing this file:
%
% 1. To change formatting, appearance, or style, please edit openmp.sty.
%
% 2. Custom commands and macros are defined in openmp.sty.
%
% 3. Be kind to other editors -- keep a consistent style by copying-and-pasting to
% create new content.
%
% 4. We use semantic markup, e.g. (see openmp.sty for a full list):
% \code{} % for bold monospace keywords, code, operators, etc.
% \plc{} % for italic placeholder names, grammar, etc.
%
% 5. Other recommendations:
% Use the convenience macros defined in openmp.sty for the minor headers
% such as Comments, Syntax, etc.
%
% To keep items together on the same page, prefer the use of
% \begin{samepage}.... Avoid \parbox for text blocks as it interrupts line numbering.
% When possible, avoid \filbreak, \pagebreak, \newpage, \clearpage unless that's
% what you mean. Use \needspace{} cautiously for troublesome paragraphs.
%
% Avoid absolute lengths and measures in this file; use relative units when possible.
% Vertical space can be relative to \baselineskip or ex units. Horizontal space
% can be relative to \linewidth or em units.
%
% Prefer \emph{} to italicize terminology, e.g.:
% This is a \emph{definition}, not a placeholder.
% This is a \plc{var-name}.
%
\bchapter{Introduction}
\label{chap:introduction}
This collection of programming examples supplements the OpenMP API for Shared
Memory Parallelization specifications, and is not part of the formal specifications. It
assumes familiarity with the OpenMP specifications, and shares the typographical
conventions used in that document.
The OpenMP API specification provides a model for parallel programming that is
portable across shared memory architectures from different vendors. Compilers from
numerous vendors support the OpenMP API.
The directives, library routines, and environment variables demonstrated in this
document allow users to create and manage parallel programs while permitting
portability. The directives extend the C, C++ and Fortran base languages with single
program multiple data (SPMD) constructs, tasking constructs, device constructs,
worksharing constructs, and synchronization constructs, and they provide support for
sharing and privatizing data. The functionality to control the runtime environment is
provided by library routines and environment variables. Compilers that support the
OpenMP API often include a command line option to the compiler that activates and
allows interpretation of all OpenMP directives.
The latest source codes for OpenMP Examples can be downloaded from the \code{sources}
directory at
\href{https://github.com/OpenMP/Examples}{https://github.com/OpenMP/Examples}.
The codes for this OpenMP \VER{} Examples document have the tag \plc{v\VER}.
%\href{https://github.com/OpenMP/Examples/tree/main/sources}{https://github.com/OpenMP/Examples/sources}.
Complete information about the OpenMP API and a list of the compilers that support
the OpenMP API can be found at the OpenMP.org web site
\code{http://www.openmp.org}
% This is the end of introduction.tex of the OpenMP Examples document.

View File

@ -1,13 +1,13 @@
# Makefile for the OpenMP Examples document in LaTex format.
# For more information, see the main document, openmp-examples.tex.
version=5.2
version=5.2.1
default: openmp-examples.pdf
diff: openmp-diff-abridged.pdf
book: BOOK_BUILD="\\\\def\\\\bookbuild{1}"
book: clean openmp-examples.pdf
cp openmp-examples-${version}.pdf openmp-examples-${version}-book.pdf
mv openmp-examples-${version}.pdf openmp-examples-${version}-book.pdf
CHAPTERS=Title_Page.tex \
Foreword_Chapt.tex \
@ -53,6 +53,7 @@ clean:
rm -f openmp-diff-full.pdf openmp-diff-abridged.pdf
rm -rf *.tmpdir
cd util; make clean
rm -f chk_tags.log sources/*.log
realclean: clean
rm -f openmp-examples-${version}.pdf openmp-examples-${version}-book.pdf
@ -83,6 +84,7 @@ VC_DIFF_MINIMAL_OPTS:= --only-changes --force
generated-include.tex:
echo "$(BOOK_BUILD)"
echo "$(BOOK_BUILD)" > $@
util/list_tags -vtag */sources/* >> $@
%.tmpdir: $(wildcard *.sty) $(wildcard *.png) $(wildcard *.aux) openmp-examples.pdf
mkdir -p $@/sources

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.1
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.1
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
subroutine star(a,b,c,n,ioff_ptr)

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.2
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@operation: link
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.2
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: link
! @@expect: success
! @@version: omp_4.0
program main

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.3
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.3
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
subroutine work( a, b, n, sum )

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.4
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.4
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
subroutine work( b, n, m )

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.5
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.5
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
subroutine work( a, b, c, n )

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.6
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.6
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
function foo(p) result(r)

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.7
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: omp_4.0
*/
@ -33,6 +32,6 @@ int main(void)
for (i=0; i < N; i++) {
a[i] = fib(b[i]);
}
printf("Done a[%d] = %d\n", N-1, a[N-1]);
printf("Done a[%d] = %d\n", N-1, a[N-1]); //Done a[44] = 701408733
return 0;
}

View File

@ -1,7 +1,6 @@
! @@name: SIMD.7
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: omp_4.0
program fibonacci

View File

@ -1,8 +1,7 @@
/*
* @@name: SIMD.8
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: SIMD.8
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: omp_4.0
module work

View File

@ -1,10 +1,9 @@
/*
* @@name: linear_modifier.1
* @@type: C++
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: omp_5.1
* @@version: omp_5.2
*/
#include <stdio.h>

View File

@ -1,7 +1,6 @@
! @@name: linear_modifier.1
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: omp_5.2
module m
@ -10,8 +9,9 @@ module m
contains
subroutine add_one2(p)
!$omp declare simd(add_one2) linear(p: ref) simdlen(8)
implicit none
!$omp declare simd(add_one2) linear(p: ref) simdlen(8)
integer :: p
p = p + 1
@ -45,4 +45,3 @@ program main
end do
print *, "passed"
end program

View File

@ -1,8 +1,7 @@
/*
* @@name: linear_modifier.2
* @@type: C++
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: omp_5.2
*/

View File

@ -1,7 +1,6 @@
! @@name: linear_modifier.2
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: omp_5.2
module m
@ -10,8 +9,9 @@ module m
contains
subroutine add_one2(p, i)
!$omp declare simd(add_one2) linear(p: ref) linear(i: uval)
implicit none
!$omp declare simd(add_one2) linear(p: ref) linear(i: uval)
integer :: p
integer, intent(in) :: i

View File

@ -1,8 +1,7 @@
/*
* @@name: linear_modifier.3
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: omp_5.2
*/

View File

@ -1,14 +1,14 @@
! @@name: linear_modifier.3
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: omp_5.2
module func_mod
contains
real(8) function func(x, y, i)
implicit none
!$omp declare simd(func) simdlen(4) uniform(x, y) linear(i:val,step(1))
implicit none
real(8), intent(in) :: x(*), y(*)
integer, intent(in) :: i

View File

@ -17,13 +17,13 @@
\vspace{1.0in}
\textbf{Version \PVER{} -- \VERDATE}
\textbf{Version \VER{} -- \VERDATE}
\end{center}
\end{adjustwidth}
\vspace{2.3in} %was 3.0
Source codes for OpenMP \VER{} Examples are available at
Source codes for OpenMP Examples \VER{} are available at
\href{https://github.com/OpenMP/Examples/tree/v\VER}%
{github (https://github.com/OpenMP/Examples/tree/v\VER)}.\\

View File

@ -236,9 +236,9 @@ The following example shows the result of the \code{primary} affinity policy on
the partition list for the machine architecture depicted above. The place partition
is not changed by the primary policy.
\cexample[4.0]{affinity}{5}
\cexample[5.1]{affinity}{5}
\fexample[4.0]{affinity}{5}
\fexample[5.1]{affinity}{5}
\clearpage
It is unspecified on which place the primary thread is initially started. If the

View File

@ -37,9 +37,9 @@ not changed, so affinity is NOT reported.
In the last parallel region, the thread affinities are reported
because the thread affinity has changed.
\cexample[5.0]{affinity_display}{1}
\cexample[5.0]{affinity_display}{1}[1]
\ffreeexample[5.0]{affinity_display}{1}
\ffreeexample[5.0]{affinity_display}{1}[1]
In the following example 2 threads are forked, and each executes on a socket. Next,
@ -69,10 +69,11 @@ the parallel nesting level (\%L), the ancestor thread number (\%a), the thread n
and the thread affinity (\%A). In the nested parallel region within the \plc{socket\_work} routine
the affinities for the threads on each socket are printed according to this format.
\cexample[5.0]{affinity_display}{2}
\cexample[5.0]{affinity_display}{2}[3]
\ffreeexample[5.0]{affinity_display}{2}
\ffreeexample[5.0]{affinity_display}{2}[3]
%\newpage
\index{affinity display!omp_get_affinity_format routine@\scode{omp_get_affinity_format} routine}
\index{routines!omp_get_affinity_format@\scode{omp_get_affinity_format}}
\index{omp_get_affinity_format routine@\scode{omp_get_affinity_format} routine}
@ -87,14 +88,14 @@ Next, the \code{omp\_set\_affinity\_format()} API routine sets a user-defined
format: \plc{host=\%20H thrd\_num=\%0.4n binds\_to=\%A}.
The host, thread number and affinity fields are specified by \plc{\%20H},
\plc{\%0.4n} and \plc{\%A}: \plc{H}, \plc{n} and \plc{A} are single character "short names"
\plc{\%0.4n} and \plc{\%A}: \plc{H}, \plc{n} and \plc{A} are single character ``short names''
for the host, thread\_num and thread\_affinity data to be printed,
with format sizes of \plc{20}, \plc{4}, and "size as needed".
with format sizes of \plc{20}, \plc{4}, and ``size as needed''.
The period (.) indicates that the field is displayed right-justified (default is left-justified)
and the "0" indicates that any unused space is to be prefixed with zeros
(e.g. instead of "1", "0001" is displayed for the field size of 4).
and the ``0'' indicates that any unused space is to be prefixed with zeros
(e.g. instead of ``1'', ``0001'' is displayed for the field size of 4).
%The period (.) indicates that the field is displayed left-justified and the "0" indicates
%The period (.) indicates that the field is displayed left-justified and the ``0'' indicates
%that leading zeros are to be added so that the total length for the display of this “n” (thread_num) field is 4.
%The period (\plc{.}) indicates right justified and \plc{0} leading zeros.
@ -118,7 +119,6 @@ The maximum value for the number of characters (\plc{nchars}) returned by
clause and the \plc{if(nchars >= max\_req\_store) max\_req\_store=nchars} statement.
It is used to report possible truncation (if \plc{max\_req\_store} > \plc{buffer\_store}).
\newpage
\cexample[5.0]{affinity_display}{3}
\ffreeexample[5.0]{affinity_display}{3}

View File

@ -1,3 +1,4 @@
\newpage
\section{Affinity Query Functions}
\label{sec: affinity_query}
\index{affinity query!omp_get_num_places routine@\scode{omp_get_num_places} routine}

View File

@ -1,12 +1,10 @@
/*
* @@name: affinity.1
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/
void work();
int main()

View File

@ -1,7 +1,6 @@
! @@name: affinity.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
PROGRAM EXAMPLE

View File

@ -1,8 +1,7 @@
/*
* @@name: affinity.2
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: affinity.2
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
subroutine foo

View File

@ -1,8 +1,7 @@
/*
* @@name: affinity.3
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: affinity.3
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
PROGRAM EXAMPLE

View File

@ -1,8 +1,7 @@
/*
* @@name: affinity.4
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/

View File

@ -1,7 +1,6 @@
! @@name: affinity.4
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_4.0
subroutine foo

View File

@ -1,8 +1,7 @@
/*
* @@name: affinity.5
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_5.1
*/

View File

@ -1,7 +1,6 @@
! @@name: affinity.5
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_5.1
PROGRAM EXAMPLE

View File

@ -1,10 +1,9 @@
/*
* @@name: affinity.6
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_5.0
* @@name: affinity.6
* @@type: C
* @@operation: compile
* @@expect: success
* @@version: omp_5.0
*/
double * alloc_init_B(double *A, int N);
void compute_on_B(double *B, int N);
@ -24,4 +23,3 @@ void task_affinity(double *A, int N)
#pragma omp taskwait
}

View File

@ -1,8 +1,7 @@
! @@name: affinity.6
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@expect: success
! @@name: affinity.6
! @@type: F-free
! @@operation: compile
! @@expect: success
! @@version: omp_5.0
subroutine task_affinity(A, N)
@ -21,4 +20,3 @@ subroutine task_affinity(A, N)
!$omp taskwait
end subroutine

View File

@ -1,10 +1,10 @@
/*
* @@name: affinity_display.1
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
* @@name: affinity_display.1
* @@type: C
* @@operation: run
* @@expect: success
* @@version: omp_5.0
* @@env: OMP_DISPLAY_AFFINITY=TRUE OMP_NUM_THREADS=8
*/
#include <stdio.h>
#include <omp.h>

View File

@ -1,9 +1,9 @@
! @@name: affinity_display.1
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@expect: success
! @@version: omp_5.0
! @@name: affinity_display.1
! @@type: F-free
! @@operation: run
! @@expect: success
! @@version: omp_5.0
! @@env: OMP_DISPLAY_AFFINITY=TRUE OMP_NUM_THREADS=8
program affinity_display ! MAX threads = 8, single socket system
use omp_lib

View File

@ -1,10 +1,12 @@
/*
* @@name: affinity_display.2
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@name: affinity_display.2
* @@type: C
* @@operation: run
* @@expect: success
* @@version: omp_5.0
* @@env: OMP_PROC_BIND=TRUE OMP_NUM_THREADS="2,4"
* @@env: OMP_PLACES="{0,2,4,6},{1,3,5,7}"
* @@env: OMP_AFFINITY_FORMAT="nest_level= %L, parent_thrd_num= %a, thrd_num= %n, thrd_affinity= %A"
*/
#include <stdio.h>
#include <stdlib.h>
@ -57,8 +59,8 @@ void socket_work(int socket_num, int n_thrds)
printf(" LEVEL 2 AFFINITIES, %d threads on socket %d\n",
n_thrds, socket_num);
// not needed if OMP_DISPLAY_AFFINITY=TRUE
omp_display_affinity(NULL);
// not needed if OMP_DISPLAY_AFFINITY=TRUE
omp_display_affinity(NULL);
// OUTPUT:
// LEVEL 2 AFFINITIES, 4 threads on socket 0

View File

@ -1,9 +1,11 @@
! @@name: affinity_display.2
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@expect: success
! @@version: omp_5.0
! @@name: affinity_display.2
! @@type: F-free
! @@operation: run
! @@expect: success
! @@version: omp_5.0
! @@env: OMP_PROC_BIND=TRUE OMP_NUM_THREADS="2,4"
! @@env: OMP_PLACES="{0,2,4,6},{1,3,5,7}"
! @@env: OMP_AFFINITY_FORMAT="nest_level= %L, parent_thrd_num= %a, thrd_num= %n, thrd_affinity= %A"
program affinity_display
use omp_lib

View File

@ -1,10 +1,9 @@
/*
* @@name: affinity_display.3
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
* @@name: affinity_display.3
* @@type: C
* @@operation: run
* @@expect: success
* @@version: omp_5.0
*/
#include <stdio.h>
#include <stdlib.h> // also null is in <stddef.h>

View File

@ -1,9 +1,8 @@
! @@name: affinity_display.3
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@expect: success
! @@version: omp_5.0
! @@name: affinity_display.3
! @@type: F-free
! @@operation: run
! @@expect: success
! @@version: omp_5.0
program affinity_display
use omp_lib
implicit none

View File

@ -1,8 +1,7 @@
/*
* @@name: affinity_query.1
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: run
* @@expect: success
* @@version: omp_4.5
*/

View File

@ -1,7 +1,6 @@
! @@name: affinity_query.1
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: run
! @@expect: success
! @@version: omp_4.5
subroutine socket_init(socket_num)

View File

@ -9,7 +9,7 @@ The next example illustrates the use of the \code{affinity}
clause with a \code{task} construct.
The variables in the \code{affinity} clause provide a
hint to the runtime that the task should execute
"close" to the physical storage location of the variables. For example,
``close'' to the physical storage location of the variables. For example,
on a two-socket platform with a local memory component
close to each processor socket, the runtime will attempt to
schedule the task execution on the socket where the storage is located.
@ -27,7 +27,7 @@ the \code{affinity} clause \plc{affinity(B[:N])} on the second \code{task} const
However, the storage behind \plc{B} is created in the first task, and the
array section reference may not be valid when the second task is generated.
The use of the \plc{A} array is sufficient for this case, because one
would expect the storage for \plc{A} and \plc{B} would be physically "close"
would expect the storage for \plc{A} and \plc{B} would be physically ``close''
(as provided by the hint in the first task).
\cexample[5.0]{affinity}{6}

View File

@ -305,7 +305,7 @@ In the OpenMP 5.0 Specification, \code{reduction} clauses for the
\index{taskloop simd construct@\code{taskloop}~\code{simd} construct}
The examples below compare reductions for the \code{taskloop} and the \code{taskloop}~\code{simd} constructs.
These examples illustrate the use of \code{reduction} clauses within
"stand-alone" \code{taskloop} constructs, and the use of \code{in\_reduction} clauses for tasks of taskloops to participate
``stand-alone'' \code{taskloop} constructs, and the use of \code{in\_reduction} clauses for tasks of taskloops to participate
with other reductions within the scope of a parallel region.
\textbf{taskloop reductions:}

View File

@ -1,8 +1,7 @@
! @@name: associate.1
! @@type: F-fixed
! @@compilable: no
! @@linkable: no
! @@expect: failure
! @@operation: compile
! @@expect: ct-error
! @@version: omp_4.0
program example_broken
real :: a, c

View File

@ -1,7 +1,6 @@
! @@name: associate.2
! @@type: F-fixed
! @@compilable: yes
! @@linkable: yes
! @@operation: link
! @@expect: success
! @@version: omp_4.0
program example

View File

@ -1,7 +1,6 @@
! @@name: associate.3
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: omp_4.0
program example
@ -10,8 +9,8 @@ program example
associate(u => v)
!$omp parallel private(v)
v = -1
print *, v ! private v=-1
print *, u ! original v=15
print *, "v=", v ! private v=-1
print *, "u=", u ! original v=15
!$omp end parallel
end associate
end program

View File

@ -1,7 +1,6 @@
! @@name: associate.4
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@operation: link
! @@expect: success
! @@version: omp_5.1
program main
@ -18,7 +17,7 @@ program main
!$omp target !! TARGET 2
a_aray = [4,5,6]
!$omp end target
print *, a_aray, aray !! 4 5 6 4 5 6
print *, a_aray, aray !! 4 5 6 4 5 6
!!!$omp target !! TARGET 3
!! !! mapping, in this case implicit,
@ -31,7 +30,7 @@ program main
!$omp target !! TARGET 4
scalr = 1 !! scalr is firstprivate
!$omp end target
print *, a_scalr, scalr !! -1 -1
print *, a_scalr, scalr !! -1 -1
!$omp target !! TARGET 5
a_scalr = 2 !! a_scalr implicitly mapped

View File

@ -1,9 +1,9 @@
/*
* @@name: carrays_fpriv.1
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: pre_omp_3.0
*/
#include <assert.h>

View File

@ -1,9 +1,9 @@
/*
* @@name: copyin.1
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: pre_omp_3.0
*/
#include <stdlib.h>

View File

@ -1,8 +1,8 @@
! @@name: copyin.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
MODULE M
REAL, POINTER, SAVE :: WORK(:)
INTEGER :: SIZE

View File

@ -1,9 +1,9 @@
/*
* @@name: copyprivate.1
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: pre_omp_3.0
*/
#include <stdio.h>
float x, y;

View File

@ -1,8 +1,8 @@
! @@name: copyprivate.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE INIT(A,B)
REAL A, B
COMMON /XY/ X,Y

View File

@ -1,10 +1,9 @@
/*
* @@name: copyprivate.2
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_5.1
* @@version: omp_5.1
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,9 +1,8 @@
! @@name: copyprivate.2
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_5.1
! @@version: omp_5.1
REAL FUNCTION READ_NEXT()
REAL, POINTER :: TMP

View File

@ -1,9 +1,9 @@
/*
* @@name: copyprivate.3
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: pre_omp_3.0
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,8 +1,8 @@
! @@name: copyprivate.3
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
FUNCTION NEW_LOCK()
USE OMP_LIB ! or INCLUDE "omp_lib.h"
INTEGER(OMP_LOCK_KIND), POINTER :: NEW_LOCK

View File

@ -1,8 +1,8 @@
! @@name: copyprivate.4
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE S(N)
INTEGER N

View File

@ -1,12 +1,10 @@
/*
* @@name: cpp_reference.1
* @@type: C++
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_4.5
*/
void task_body (int &);
void gen_task (int &x) { // on orphaned task construct reference argument
#pragma omp task // x is implicitly determined firstprivate(x)
@ -23,4 +21,3 @@ void test (int &y, int &z) {
gen_task (y);
}
}

View File

@ -1,9 +1,9 @@
/*
* @@name: default_none.1
* @@type: C
* @@compilable: no
* @@linkable: no
* @@expect: failure
* @@operation: compile
* @@expect: ct-error
* @@version: pre_omp_3.0
*/
#include <omp.h>
int x, y, z[1000];

View File

@ -1,8 +1,8 @@
! @@name: default_none.1
! @@type: F-fixed
! @@compilable: no
! @@linkable: no
! @@expect: failure
! @@operation: compile
! @@expect: ct-error
! @@version: pre_omp_3.0
SUBROUTINE DEFAULT_NONE(A)
INCLUDE "omp_lib.h" ! or USE OMP_LIB

View File

@ -1,8 +1,8 @@
! @@name: fort_loopvar.1
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE PLOOP_1(A,N)
INCLUDE "omp_lib.h" ! or USE OMP_LIB

View File

@ -1,8 +1,8 @@
! @@name: fort_loopvar.2
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE PLOOP_2(A,B,N,I1,I2)
REAL A(*), B(*)
INTEGER I1, I2, N

View File

@ -1,8 +1,8 @@
! @@name: fort_sa_private.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: yes
! @@expect: rt-error
! @@operation: run
! @@expect: unspecified
! @@version: pre_omp_3.0
SUBROUTINE SUB()
COMMON /BLOCK/ X
PRINT *,X ! X is undefined

View File

@ -1,8 +1,8 @@
! @@name: fort_sa_private.2
! @@type: F-fixed
! @@compilable: maybe
! @@linkable: maybe
! @@expect: rt-error
! @@operation: run
! @@expect: unspecified
! @@version: pre_omp_3.0
PROGRAM PRIV_RESTRICT2
COMMON /BLOCK2/ X
X = 1.0

View File

@ -1,8 +1,8 @@
! @@name: fort_sa_private.3
! @@type: F-fixed
! @@compilable: maybe
! @@linkable: maybe
! @@expect: rt-error
! @@operation: run
! @@expect: unspecified
! @@version: pre_omp_3.0
PROGRAM PRIV_RESTRICT3
EQUIVALENCE (X,Y)
X = 1.0

View File

@ -1,8 +1,8 @@
! @@name: fort_sa_private.4
! @@type: F-fixed
! @@compilable: maybe
! @@linkable: maybe
! @@expect: rt-error
! @@operation: run
! @@expect: unspecified
! @@version: pre_omp_3.0
PROGRAM PRIV_RESTRICT4
INTEGER I, J
INTEGER A(100), B(100)

View File

@ -1,11 +1,10 @@
! @@name: fort_sa_private.5
! @@type: F-fixed
! @@compilable: maybe
! @@linkable: maybe
! @@expect: rt-error
! @@version: omp_5.1
! @@operation: run
! @@expect: unspecified
! @@version: omp_5.1
SUBROUTINE SUB1(X)
DIMENSION X(10)
DIMENSION X(*)
! This use of X does not conform to the
! specification. It would be legal Fortran 90,
@ -19,7 +18,7 @@
PROGRAM PRIV_RESTRICT5
COMMON /BLOCK5/ A
DIMENSION B(10)
DIMENSION A(1),B(10)
EQUIVALENCE (A,B(1))
! the common block has to be at least 10 words
@ -39,3 +38,4 @@
!$OMP END MASKED
!$OMP END PARALLEL
END PROGRAM PRIV_RESTRICT5

View File

@ -1,8 +1,8 @@
! @@name: fort_sp_common.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE COMMON_GOOD()
COMMON /C/ X,Y
REAL X, Y

View File

@ -1,8 +1,8 @@
! @@name: fort_sp_common.2
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE COMMON_GOOD2()
COMMON /C/ X,Y
REAL X, Y

View File

@ -1,8 +1,8 @@
! @@name: fort_sp_common.3
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE COMMON_GOOD3()
COMMON /C/ X,Y
!$OMP PARALLEL PRIVATE (/C/)

View File

@ -1,8 +1,8 @@
! @@name: fort_sp_common.4
! @@type: F-fixed
! @@compilable: no
! @@linkable: no
! @@expect: failure
! @@operation: compile
! @@expect: ct-error
! @@version: pre_omp_3.0
SUBROUTINE COMMON_WRONG()
COMMON /C/ X,Y
! Incorrect because X is a constituent element of C

View File

@ -1,8 +1,8 @@
! @@name: fort_sp_common.5
! @@type: F-fixed
! @@compilable: no
! @@linkable: no
! @@expect: failure
! @@operation: compile
! @@expect: ct-error
! @@version: pre_omp_3.0
SUBROUTINE COMMON_WRONG2()
COMMON /C/ X,Y
! Incorrect: common block C cannot be declared both

View File

@ -1,9 +1,9 @@
/*
* @@name: lastprivate.1
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: pre_omp_3.0
*/
void lastpriv (int n, float *a, float *b)
{

View File

@ -1,8 +1,8 @@
! @@name: lastprivate.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: pre_omp_3.0
SUBROUTINE LASTPRIV(N, A, B)
INTEGER N

View File

@ -1,10 +1,9 @@
/*
* @@name: lastprivate.2
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@operation: compile
* @@expect: success
* @@version: omp_5.0
* @@version: omp_5.0
*/
#include <math.h>

View File

@ -1,9 +1,8 @@
! @@name: lastprivate.2
! @@type: F-free
! @@compilable: yes
! @@linkable: no
! @@operation: compile
! @@expect: success
! @@version: omp_5.0
! @@version: omp_5.0
function condlastprivate(a, n) result(x)
implicit none
real a(*), x

View File

@ -1,9 +1,9 @@
/*
* @@name: private.1
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@operation: run
* @@expect: success
* @@version: pre_omp_3.0
*/
#include <stdio.h>
#include <assert.h>

View File

@ -1,8 +1,8 @@
! @@name: private.1
! @@type: F-fixed
! @@compilable: yes
! @@linkable: yes
! @@operation: run
! @@expect: success
! @@version: pre_omp_3.0
PROGRAM PRIV_EXAMPLE
INTEGER I, J

View File

@ -1,9 +1,9 @@
/*
* @@name: private.2
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@operation: compile
* @@expect: unspecified
* @@version: pre_omp_3.0
*/
int a;

View File

@ -1,8 +1,8 @@
! @@name: private.2
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@expect: success
! @@operation: compile
! @@expect: unspecified
! @@version: pre_omp_3.0
MODULE PRIV_EXAMPLE2
REAL A

Some files were not shown because too many files have changed in this diff Show More