public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Marcel Vollweiler <marcel@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH] OpenMP, Fortran: Bugfix for omp_set_num_teams.
Date: Wed, 16 Mar 2022 14:36:37 +0100	[thread overview]
Message-ID: <YjHn5XqL/HdtFO9K@tucnak> (raw)
In-Reply-To: <02535b12-184f-02ff-ea02-becd75c5a097@codesourcery.com>

On Wed, Mar 16, 2022 at 02:06:16PM +0100, Marcel Vollweiler wrote:
> libgomp/ChangeLog:
> 
> 	* fortran.c (omp_set_num_teams_8_): Fix bug.
> 	* testsuite/libgomp.fortran/icv-8.f90: New test.

Ok, with a minor nit.  Please use
Call omp_set_num_teams instead of omp_set_max_active_levels.
instead of
Fix bug.
in the ChangeLog.

> diff --git a/libgomp/fortran.c b/libgomp/fortran.c
> index 8c1cfd1..d984ce5 100644
> --- a/libgomp/fortran.c
> +++ b/libgomp/fortran.c
> @@ -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
> diff --git a/libgomp/testsuite/libgomp.fortran/icv-8.f90 b/libgomp/testsuite/libgomp.fortran/icv-8.f90
> new file mode 100644
> index 0000000..9478c15
> --- /dev/null
> +++ b/libgomp/testsuite/libgomp.fortran/icv-8.f90
> @@ -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


	Jakub


      reply	other threads:[~2022-03-16 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 17:05 Marcel Vollweiler
2022-03-15 17:28 ` Jakub Jelinek
2022-03-16 13:06   ` Marcel Vollweiler
2022-03-16 13:36     ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YjHn5XqL/HdtFO9K@tucnak \
    --to=jakub@redhat.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcel@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).