OpenMP, Fortran: Bugfix for omp_set_num_teams.
This patch fixes a small bug in the omp_set_num_teams implementation. libgomp/ChangeLog: * fortran.c (omp_set_num_teams_8_): Call omp_set_num_teams instead of omp_set_max_active_levels. * testsuite/libgomp.fortran/icv-8.f90: New test.
This commit is contained in:
parent
3117ffce4c
commit
be093b8dcc
2 changed files with 11 additions and 1 deletions
|
@ -491,7 +491,7 @@ omp_set_num_teams_ (const int32_t *num_teams)
|
|||
void
|
||||
omp_set_num_teams_8_ (const int64_t *num_teams)
|
||||
{
|
||||
omp_set_max_active_levels (TO_INT (*num_teams));
|
||||
omp_set_num_teams (TO_INT (*num_teams));
|
||||
}
|
||||
|
||||
int32_t
|
||||
|
|
10
libgomp/testsuite/libgomp.fortran/icv-8.f90
Normal file
10
libgomp/testsuite/libgomp.fortran/icv-8.f90
Normal file
|
@ -0,0 +1,10 @@
|
|||
! This tests 'set_num_teams_8' function.
|
||||
|
||||
program set_num_teams_8
|
||||
use omp_lib
|
||||
use, intrinsic :: iso_fortran_env
|
||||
integer(int64) :: x
|
||||
x = 42
|
||||
call omp_set_num_teams (x)
|
||||
if (omp_get_max_teams () .ne. 42) stop 1
|
||||
end program
|
Loading…
Add table
Reference in a new issue