gcc/libgomp/testsuite
Tobias Burnus ad0f80d945 libgomp: Honor OpenMP's nteams-var ICV as upper limit on num teams [PR109875]
The nteams-var ICV exists per device and can be set either via the routine
omp_set_num_teams or as environment variable (OMP_NUM_TEAMS with optional
_ALL/_DEV/_DEV_<num> suffix); it is default-initialized to zero. The number
of teams created is described under the num_teams clause. If the clause is
absent, the number of teams is implementation defined but at least
one team must exist and, if nteams-var is positive, at most nteams-var
teams may exist.

The latter condition was not honored in a target region before this
commit, such that too many teams were created.

Already before this commit, both the num_teams([lower:]upper) clause
(on the host and in target regions) and, only on the host, the nteams-var
ICV were honored. And as only one teams is created for host fallback,
unless the clause specifies otherwise, the nteams-var ICV was and is
effectively honored.

libgomp/ChangeLog:

	PR libgomp/109875
	* config/gcn/target.c (GOMP_teams4): Honor nteams-var ICV.
	* config/nvptx/target.c (GOMP_teams4): Likewise.
	* testsuite/libgomp.c-c++-common/teams-nteams-icv-1.c: New test.
	* testsuite/libgomp.c-c++-common/teams-nteams-icv-2.c: New test.
	* testsuite/libgomp.c-c++-common/teams-nteams-icv-3.c: New test.
	* testsuite/libgomp.c-c++-common/teams-nteams-icv-4.c: New test.
2023-05-21 20:37:15 +02:00
..
config Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
lib Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
libgomp.c libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] 2023-05-15 12:11:17 +02:00
libgomp.c++ libgomp testsuite: As appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884] 2023-05-15 12:11:18 +02:00
libgomp.c-c++-common libgomp: Honor OpenMP's nteams-var ICV as upper limit on num teams [PR109875] 2023-05-21 20:37:15 +02:00
libgomp.fortran Fortran/OpenMP: Fix mapping of array descriptors and deferred-length strings 2023-05-17 12:28:14 +02:00
libgomp.graphite libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] 2023-05-15 12:11:17 +02:00
libgomp.oacc-c libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] 2023-05-15 12:11:17 +02:00
libgomp.oacc-c++ libgomp testsuite: As appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884] 2023-05-15 12:11:18 +02:00
libgomp.oacc-c-c++-common testsuite: Fix weak_undefined handling on Darwin 2023-03-28 10:40:05 +02:00
libgomp.oacc-fortran libgomp testsuite: As appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884] 2023-05-15 12:11:18 +02:00
libgomp-site-extra.exp.in Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
libgomp-test-support.exp.in libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option 2022-06-10 17:08:57 +02:00
Makefile.am Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
Makefile.in Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00